Brad Bishop | 6c2fd81 | 2019-07-21 18:08:31 -0400 | [diff] [blame] | 1 | require u-boot-common-aspeed-sdk_${PV}.inc |
| 2 | |
| 3 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
| 4 | DEPENDS += "mtd-utils" |
| 5 | |
| 6 | PROVIDES += "u-boot-fw-utils" |
| 7 | |
Joel Stanley | 52db5ae | 2020-03-20 12:17:07 +1030 | [diff] [blame] | 8 | SRC_URI += "file://fw_env_ast2600_nor.config" |
Adriana Kobylak | e477865 | 2020-07-07 13:31:51 -0500 | [diff] [blame] | 9 | SRC_URI += "file://fw_env_ast2600_mmc.config" |
| 10 | |
| 11 | ENV_CONFIG_FILE = "fw_env_ast2600_nor.config" |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 12 | ENV_CONFIG_FILE:df-phosphor-mmc = "fw_env_ast2600_mmc.config" |
Joel Stanley | 52db5ae | 2020-03-20 12:17:07 +1030 | [diff] [blame] | 13 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 14 | INSANE_SKIP:${PN} = "already-stripped" |
| 15 | EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' |
| 16 | EXTRA_OEMAKE:class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
Brad Bishop | 6c2fd81 | 2019-07-21 18:08:31 -0400 | [diff] [blame] | 17 | |
| 18 | inherit uboot-config |
| 19 | |
| 20 | do_compile () { |
| 21 | oe_runmake ${UBOOT_MACHINE} |
| 22 | oe_runmake envtools |
| 23 | } |
| 24 | |
| 25 | do_install () { |
| 26 | install -d ${D}${base_sbindir} |
| 27 | install -d ${D}${sysconfdir} |
| 28 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv |
| 29 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv |
Adriana Kobylak | e477865 | 2020-07-07 13:31:51 -0500 | [diff] [blame] | 30 | |
| 31 | install -m 644 ${WORKDIR}/${ENV_CONFIG_FILE} ${D}${sysconfdir}/fw_env.config |
Brad Bishop | 6c2fd81 | 2019-07-21 18:08:31 -0400 | [diff] [blame] | 32 | } |
| 33 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 34 | do_install:class-cross () { |
Brad Bishop | 6c2fd81 | 2019-07-21 18:08:31 -0400 | [diff] [blame] | 35 | install -d ${D}${bindir_cross} |
| 36 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv |
| 37 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv |
| 38 | } |
| 39 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 40 | SYSROOT_DIRS:append:class-cross = " ${bindir_cross}" |
Brad Bishop | 6c2fd81 | 2019-07-21 18:08:31 -0400 | [diff] [blame] | 41 | |
| 42 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 43 | BBCLASSEXTEND = "cross" |