blob: 42bc7a306a17e3e2b5593552b9972be09675032a [file] [log] [blame]
Benjamin Fair44f6b4d2019-01-22 14:34:28 -08001require u-boot-common-nuvoton.inc
2
Tomer Maimondbd6fa12018-01-29 17:36:16 +02003SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
Tomer Maimondbd6fa12018-01-29 17:36:16 +02004DEPENDS = "mtd-utils"
5
6PROVIDES += "u-boot-fw-utils"
7
Tomer Maimondbd6fa12018-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}
17 oe_runmake env
18}
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"