blob: e9f724df2e7317a066d95045f8b8ad796402bab1 [file] [log] [blame]
Brad Bishop485c4c02018-03-24 01:03:18 -04001require u-boot-common-aspeed_${PV}.inc
Brad Bishopd7189fd2018-02-01 10:27:11 -05002
3SRC_URI += "file://default-gcc.patch"
Brad Bishop5441d082018-03-23 17:24:31 -04004SRC_URI += "file://fw_env.config"
5SRC_URI += "file://alt_fw_env.config"
Brad Bishopd7189fd2018-02-01 10:27:11 -05006
Brad Bishopce4166d2018-02-08 15:23:05 -05007SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
Brad Bishopff2e4ed2018-11-28 10:50:31 -05008DEPENDS += "mtd-utils"
Brad Bishopce4166d2018-02-08 15:23:05 -05009
Brad Bishop485c4c02018-03-24 01:03:18 -040010PROVIDES += "u-boot-fw-utils"
11
Brad Bishopce4166d2018-02-08 15:23:05 -050012INSANE_SKIP_${PN} = "already-stripped"
Brad Bishopd7189fd2018-02-01 10:27:11 -050013EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
Brad Bishopce4166d2018-02-08 15:23:05 -050014EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
15
16inherit uboot-config
17
18do_compile () {
19 oe_runmake ${UBOOT_MACHINE}
20 oe_runmake env
21}
22
23do_install () {
24 install -d ${D}${base_sbindir}
Brad Bishopce4166d2018-02-08 15:23:05 -050025 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
26 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
Brad Bishop5441d082018-03-23 17:24:31 -040027
28 install -d ${D}${sysconfdir}
29 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
30 install -m 644 ${WORKDIR}/alt_fw_env.config ${D}${sysconfdir}/alt_fw_env.config
Brad Bishopce4166d2018-02-08 15:23:05 -050031}
32
33do_install_class-cross () {
34 install -d ${D}${bindir_cross}
35 install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
36 install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
37}
38
39SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
40
41PACKAGE_ARCH = "${MACHINE_ARCH}"
42BBCLASSEXTEND = "cross"
Brad Bishop0d3988e2018-03-23 15:28:16 -040043
44RDEPENDS_${PN} = "udev-aspeed-mtd-partitions"