Brad Bishop | 80fac6d | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 1 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
| 2 | LICENSE = "GPLv2+" |
Brad Bishop | 80fac6d | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 3 | SECTION = "bootloader" |
| 4 | DEPENDS = "mtd-utils" |
| 5 | |
Patrick Williams | 395dcbc | 2017-06-26 14:49:59 -0500 | [diff] [blame^] | 6 | require u-boot.inc |
Brad Bishop | 80fac6d | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 7 | |
| 8 | S = "${WORKDIR}/git" |
| 9 | |
| 10 | INSANE_SKIP_${PN} = "already-stripped" |
| 11 | EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
| 12 | EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
| 13 | |
| 14 | inherit uboot-config |
| 15 | |
| 16 | do_compile () { |
| 17 | oe_runmake ${UBOOT_MACHINE} |
| 18 | oe_runmake env |
| 19 | } |
| 20 | |
| 21 | do_install () { |
| 22 | install -d ${D}${base_sbindir} |
| 23 | install -d ${D}${sysconfdir} |
| 24 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv |
| 25 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv |
| 26 | install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config |
| 27 | } |
| 28 | |
| 29 | do_install_class-cross () { |
| 30 | install -d ${D}${bindir_cross} |
| 31 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv |
| 32 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv |
| 33 | } |
| 34 | |
| 35 | SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" |
| 36 | uboot_fw_utils_cross() { |
| 37 | sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} |
| 38 | } |
| 39 | |
| 40 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 41 | BBCLASSEXTEND = "cross" |