Brad Bishop | 8099077 | 2018-03-24 01:03:18 -0400 | [diff] [blame] | 1 | require u-boot-common-aspeed_${PV}.inc |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 | 63e4d0a | 2018-11-28 10:50:31 -0500 | [diff] [blame] | 8 | DEPENDS += "mtd-utils" |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 9 | |
Brad Bishop | 8099077 | 2018-03-24 01:03:18 -0400 | [diff] [blame] | 10 | PROVIDES += "u-boot-fw-utils" |
| 11 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 12 | INSANE_SKIP:${PN} = "already-stripped" |
| 13 | EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' |
| 14 | EXTRA_OEMAKE:class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 15 | |
| 16 | inherit uboot-config |
| 17 | |
| 18 | do_compile () { |
| 19 | oe_runmake ${UBOOT_MACHINE} |
| 20 | oe_runmake env |
| 21 | } |
| 22 | |
| 23 | do_install () { |
| 24 | install -d ${D}${base_sbindir} |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 25 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv |
| 26 | 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] | 27 | |
| 28 | install -d ${D}${sysconfdir} |
| 29 | install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config |
| 30 | 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] | 31 | } |
| 32 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 33 | do_install:class-cross () { |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 34 | install -d ${D}${bindir_cross} |
| 35 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv |
| 36 | install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv |
| 37 | } |
| 38 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 39 | SYSROOT_DIRS:append:class-cross = " ${bindir_cross}" |
Brad Bishop | d4d3876 | 2016-06-07 16:25:54 -0400 | [diff] [blame] | 40 | |
| 41 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 42 | BBCLASSEXTEND = "cross" |
Brad Bishop | 0bbfb3e | 2018-03-23 15:28:16 -0400 | [diff] [blame] | 43 | |
Patrick Williams | b9799be | 2021-08-06 09:13:33 -0500 | [diff] [blame] | 44 | RDEPENDS:${PN} = "udev-aspeed-mtd-partitions" |