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