blob: e9f724df2e7317a066d95045f8b8ad796402bab1 [file] [log] [blame]
Brad Bishop80990772018-03-24 01:03:18 -04001require u-boot-common-aspeed_${PV}.inc
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002
3SRC_URI += "file://default-gcc.patch"
Brad Bishop9c8c9852018-03-23 17:24:31 -04004SRC_URI += "file://fw_env.config"
5SRC_URI += "file://alt_fw_env.config"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006
Brad Bishopd4d38762016-06-07 16:25:54 -04007SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
Brad Bishop63e4d0a2018-11-28 10:50:31 -05008DEPENDS += "mtd-utils"
Brad Bishopd4d38762016-06-07 16:25:54 -04009
Brad Bishop80990772018-03-24 01:03:18 -040010PROVIDES += "u-boot-fw-utils"
11
Brad Bishopd4d38762016-06-07 16:25:54 -040012INSANE_SKIP_${PN} = "already-stripped"
Brad Bishop6e60e8b2018-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 Bishopd4d38762016-06-07 16:25:54 -040014EXTRA_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 Bishopd4d38762016-06-07 16:25:54 -040025 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 Bishop9c8c9852018-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 Bishopd4d38762016-06-07 16:25:54 -040031}
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
Brad Bishope7f25522018-02-08 16:12:57 -050039SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
Brad Bishopd4d38762016-06-07 16:25:54 -040040
41PACKAGE_ARCH = "${MACHINE_ARCH}"
42BBCLASSEXTEND = "cross"
Brad Bishop0bbfb3e2018-03-23 15:28:16 -040043
44RDEPENDS_${PN} = "udev-aspeed-mtd-partitions"