Mike Garrett | 02b54b3 | 2021-08-27 16:39:03 -0500 | [diff] [blame] | 1 | require u-boot-common-gxp_2020.10.inc |
| 2 | |
| 3 | SRC_URI += "file://fw_env.config" |
| 4 | SRC_URI += "file://alt_fw_env.config" |
| 5 | |
Mike Garrett | 02b54b3 | 2021-08-27 16:39:03 -0500 | [diff] [blame] | 6 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
| 7 | DEPENDS += "mtd-utils" |
| 8 | |
| 9 | PROVIDES += "u-boot-fw-utils" |
| 10 | |
| 11 | INSANE_SKIP:${PN} = "already-stripped" |
| 12 | EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' |
| 13 | EXTRA_OEMAKE:class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
| 14 | |
| 15 | inherit uboot-config |
| 16 | |
| 17 | do_compile () { |
| 18 | oe_runmake ${UBOOT_MACHINE} |
| 19 | oe_runmake envtools |
| 20 | } |
| 21 | |
| 22 | do_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 | |
| 32 | do_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 | |
| 38 | SYSROOT_DIRS:append:class-cross = " ${bindir_cross}" |
| 39 | |
| 40 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 41 | BBCLASSEXTEND = "cross" |
| 42 | |
| 43 | RDEPENDS:${PN} = "udev-gxp-mtd-partitions" |