blob: 90e12067716a59b46b7f02b115563a9d15331f5b [file] [log] [blame]
Brad Bishop6c2fd812019-07-21 18:08:31 -04001require u-boot-common-aspeed-sdk_${PV}.inc
2
3SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
4DEPENDS += "mtd-utils"
5
6PROVIDES += "u-boot-fw-utils"
Andrei Kartashevb60b7b12021-07-29 09:01:35 +03007RPROVIDES:${PN} += "u-boot-fw-utils"
Brad Bishop6c2fd812019-07-21 18:08:31 -04008
Joel Stanley52db5ae2020-03-20 12:17:07 +10309SRC_URI += "file://fw_env_ast2600_nor.config"
Adriana Kobylake4778652020-07-07 13:31:51 -050010SRC_URI += "file://fw_env_ast2600_mmc.config"
11
12ENV_CONFIG_FILE = "fw_env_ast2600_nor.config"
Patrick Williamsb9799be2021-08-06 09:13:33 -050013ENV_CONFIG_FILE:df-phosphor-mmc = "fw_env_ast2600_mmc.config"
Joel Stanley52db5ae2020-03-20 12:17:07 +103014
Patrick Williamsb9799be2021-08-06 09:13:33 -050015INSANE_SKIP:${PN} = "already-stripped"
16EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
17EXTRA_OEMAKE:class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
Brad Bishop6c2fd812019-07-21 18:08:31 -040018
19inherit uboot-config
20
21do_compile () {
Andrei Kartashevc5b413f2021-10-08 00:14:45 +030022 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
Brad Bishop6c2fd812019-07-21 18:08:31 -040023 oe_runmake envtools
24}
25
26do_install () {
27 install -d ${D}${base_sbindir}
Andrei Kartashevc5b413f2021-10-08 00:14:45 +030028 install -m 755 ${B}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
29 ln -sf fw_printenv ${D}${base_sbindir}/fw_setenv
Adriana Kobylake4778652020-07-07 13:31:51 -050030
Andrei Kartashevc5b413f2021-10-08 00:14:45 +030031 install -d ${D}${sysconfdir}
Adriana Kobylake4778652020-07-07 13:31:51 -050032 install -m 644 ${WORKDIR}/${ENV_CONFIG_FILE} ${D}${sysconfdir}/fw_env.config
Brad Bishop6c2fd812019-07-21 18:08:31 -040033}
34
Patrick Williamsb9799be2021-08-06 09:13:33 -050035do_install:class-cross () {
Brad Bishop6c2fd812019-07-21 18:08:31 -040036 install -d ${D}${bindir_cross}
Andrei Kartashevc5b413f2021-10-08 00:14:45 +030037 install -m 755 ${B}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
38 ln -sf fw_printenv ${D}${bindir_cross}/fw_setenv
Brad Bishop6c2fd812019-07-21 18:08:31 -040039}
40
Patrick Williamsb9799be2021-08-06 09:13:33 -050041SYSROOT_DIRS:append:class-cross = " ${bindir_cross}"
Brad Bishop6c2fd812019-07-21 18:08:31 -040042
43PACKAGE_ARCH = "${MACHINE_ARCH}"
44BBCLASSEXTEND = "cross"