blob: 7fc880ffd85996628d31aa84d48cd4daf47f27d6 [file] [log] [blame]
Benjamin Fairf2ffed22019-01-22 14:34:28 -08001require u-boot-common-nuvoton.inc
2
Tomer Maimon757eeed2018-01-29 17:36:16 +02003SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
kwliu02b0bca2019-06-13 13:49:19 +08004DEPENDS = "mtd-utils bison-native"
Tomer Maimon757eeed2018-01-29 17:36:16 +02005
6PROVIDES += "u-boot-fw-utils"
7
Tomer Maimon757eeed2018-01-29 17:36:16 +02008INSANE_SKIP_${PN} = "already-stripped"
9
10EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" HOSTCC="${BUILD_CC} ${BUILD_FLAGS} ${BUILD_LDFLAGS}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
11EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
12
13inherit uboot-config
14
15do_compile () {
16 oe_runmake ${UBOOT_MACHINE}
kwliu02b0bca2019-06-13 13:49:19 +080017 oe_runmake envtools
Tomer Maimon757eeed2018-01-29 17:36:16 +020018}
19
20do_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
28do_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
34SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
35uboot_fw_utils_cross() {
36 sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
37}
38
39PACKAGE_ARCH = "${MACHINE_ARCH}"
40BBCLASSEXTEND = "cross"