blob: 251e0449494bfe35b3ce9663f704fec1b1ba1a30 [file] [log] [blame]
Brad Bishopd4d38762016-06-07 16:25:54 -04001SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
2LICENSE = "GPLv2+"
Brad Bishopd4d38762016-06-07 16:25:54 -04003SECTION = "bootloader"
4DEPENDS = "mtd-utils"
5
Patrick Williams62e2c5e2017-06-26 14:49:59 -05006require u-boot.inc
Brad Bishopd4d38762016-06-07 16:25:54 -04007
8S = "${WORKDIR}/git"
9
10INSANE_SKIP_${PN} = "already-stripped"
11EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
12EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
13
14inherit uboot-config
15
16do_compile () {
17 oe_runmake ${UBOOT_MACHINE}
18 oe_runmake env
19}
20
21do_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
29do_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
35SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
36uboot_fw_utils_cross() {
37 sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
38}
39
40PACKAGE_ARCH = "${MACHINE_ARCH}"
41BBCLASSEXTEND = "cross"