blob: 8f37dc3ec58103e279637e2ccd0286102b7c8dd1 [file] [log] [blame]
Mike Garrett02b54b32021-08-27 16:39:03 -05001require u-boot-common-gxp_2020.10.inc
2
3SRC_URI += "file://fw_env.config"
4SRC_URI += "file://alt_fw_env.config"
5
Mike Garrett02b54b32021-08-27 16:39:03 -05006SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
7DEPENDS += "mtd-utils"
8
9PROVIDES += "u-boot-fw-utils"
10
11INSANE_SKIP:${PN} = "already-stripped"
12EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
13EXTRA_OEMAKE:class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
14
15inherit uboot-config
16
17do_compile () {
18 oe_runmake ${UBOOT_MACHINE}
19 oe_runmake envtools
20}
21
22do_install () {
23 install -d ${D}${base_sbindir}
24 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
25 ln -sf fw_printenv ${D}${base_sbindir}/fw_setenv
26
27 install -d ${D}${sysconfdir}
28 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
29 install -m 644 ${WORKDIR}/alt_fw_env.config ${D}${sysconfdir}/alt_fw_env.config
30}
31
32do_install:class-cross () {
33 install -d ${D}${bindir_cross}
34 install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
35 ln -sf fw_printenv ${D}${bindir_cross}/fw_setenv
36}
37
38SYSROOT_DIRS:append:class-cross = " ${bindir_cross}"
39
40PACKAGE_ARCH = "${MACHINE_ARCH}"
41BBCLASSEXTEND = "cross"
42
43RDEPENDS:${PN} = "udev-gxp-mtd-partitions"