Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | require u-boot-common_${PV}.inc |
| 2 | |
| 3 | SRC_URI += "file://default-gcc.patch" |
Brad Bishop | 9c8c985 | 2018-03-23 17:24:31 -0400 | [diff] [blame] | 4 | SRC_URI += "file://fw_env.config" |
| 5 | SRC_URI += "file://alt_fw_env.config" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 6 | |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 7 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 8 | DEPENDS = "mtd-utils" |
| 9 | |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 10 | INSANE_SKIP_${PN} = "already-stripped" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 11 | EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 12 | EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
| 13 | |
| 14 | inherit uboot-config |
| 15 | |
| 16 | do_compile () { |
| 17 | oe_runmake ${UBOOT_MACHINE} |
| 18 | oe_runmake env |
| 19 | } |
| 20 | |
| 21 | do_install () { |
| 22 | install -d ${D}${base_sbindir} |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 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 |
Brad Bishop | 9c8c985 | 2018-03-23 17:24:31 -0400 | [diff] [blame] | 25 | |
| 26 | install -d ${D}${sysconfdir} |
| 27 | install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config |
| 28 | install -m 644 ${WORKDIR}/alt_fw_env.config ${D}${sysconfdir}/alt_fw_env.config |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | do_install_class-cross () { |
| 32 | install -d ${D}${bindir_cross} |
| 33 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv |
| 34 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv |
| 35 | } |
| 36 | |
Brad Bishop | e7f2552 | 2018-02-08 16:12:57 -0500 | [diff] [blame] | 37 | SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 38 | |
| 39 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 40 | BBCLASSEXTEND = "cross" |
Brad Bishop | 0bbfb3e | 2018-03-23 15:28:16 -0400 | [diff] [blame] | 41 | |
| 42 | RDEPENDS_${PN} = "udev-aspeed-mtd-partitions" |