Benjamin Fair | 44f6b4d | 2019-01-22 14:34:28 -0800 | [diff] [blame^] | 1 | require u-boot-common-nuvoton.inc |
| 2 | |
Tomer Maimon | dbd6fa1 | 2018-01-29 17:36:16 +0200 | [diff] [blame] | 3 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
Tomer Maimon | dbd6fa1 | 2018-01-29 17:36:16 +0200 | [diff] [blame] | 4 | DEPENDS = "mtd-utils" |
| 5 | |
| 6 | PROVIDES += "u-boot-fw-utils" |
| 7 | |
Tomer Maimon | dbd6fa1 | 2018-01-29 17:36:16 +0200 | [diff] [blame] | 8 | INSANE_SKIP_${PN} = "already-stripped" |
| 9 | |
| 10 | EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" HOSTCC="${BUILD_CC} ${BUILD_FLAGS} ${BUILD_LDFLAGS}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1' |
| 11 | EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
| 12 | |
| 13 | inherit uboot-config |
| 14 | |
| 15 | do_compile () { |
| 16 | oe_runmake ${UBOOT_MACHINE} |
| 17 | oe_runmake env |
| 18 | } |
| 19 | |
| 20 | do_install () { |
| 21 | install -d ${D}${base_sbindir} |
| 22 | install -d ${D}${sysconfdir} |
| 23 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv |
| 24 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv |
| 25 | install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config |
| 26 | } |
| 27 | |
| 28 | do_install_class-cross () { |
| 29 | install -d ${D}${bindir_cross} |
| 30 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv |
| 31 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv |
| 32 | } |
| 33 | |
| 34 | SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" |
| 35 | uboot_fw_utils_cross() { |
| 36 | sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} |
| 37 | } |
| 38 | |
| 39 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 40 | BBCLASSEXTEND = "cross" |