blob: 0ec64ce8e3a3190486193ef3e9f8c7d5e7ae3e0a [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
Patrick Williamsb9799be2021-08-06 09:13:33 -050012INSANE_SKIP:${PN} = "already-stripped"
13EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
14EXTRA_OEMAKE:class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
Brad Bishopd4d38762016-06-07 16:25:54 -040015
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
Patrick Williamsb9799be2021-08-06 09:13:33 -050033do_install:class-cross () {
Brad Bishopd4d38762016-06-07 16:25:54 -040034 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
Patrick Williamsb9799be2021-08-06 09:13:33 -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
Patrick Williamsb9799be2021-08-06 09:13:33 -050044RDEPENDS:${PN} = "udev-aspeed-mtd-partitions"