1require u-boot-common-aspeed-sdk_${PV}.inc
2
3SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
4DEPENDS += "mtd-utils"
5
6PROVIDES += "u-boot-fw-utils"
7
8SRC_URI += "file://fw_env_ast2600_nor.config"
9
10INSANE_SKIP_${PN} = "already-stripped"
11EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
12EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
13
14inherit uboot-config
15
16do_compile () {
17	oe_runmake ${UBOOT_MACHINE}
18	oe_runmake envtools
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 644 ${WORKDIR}/fw_env_ast2600_nor.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_DIRS_append_class-cross = " ${bindir_cross}"
36
37PACKAGE_ARCH = "${MACHINE_ARCH}"
38BBCLASSEXTEND = "cross"
39