diff options
author | Peter Hoyes <Peter.Hoyes@arm.com> | 2021-10-13 15:50:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-16 17:41:59 +0100 |
commit | a3d3c2d4ac421a0dde2a20825eab4434f16b2452 (patch) | |
tree | 80b5150624004486e435b0c9afffa8570eca80a3 /meta | |
parent | 7300618171c6e22a4fbc2eaf8d8362fe5b3b4b92 (diff) | |
download | poky-a3d3c2d4ac421a0dde2a20825eab4434f16b2452.tar.gz |
u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr
* Add extra SRC variables to uboot-config.class for source cmd file
* Add DEPENDS on u-boot-mkimage-native if UBOOT_ENV_SUFFIX is scr
* Compile cmd -> scr in do_compile if UBOOT_ENV_SUFFIX is scr
(From OE-Core rev: 0ea02ca5c1fc4e15f640b1c26c0a5ce34fc08c05)
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/uboot-config.bbclass | 2 | ||||
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass index 07a303d0a0..b9ad35821a 100644 --- a/meta/classes/uboot-config.bbclass +++ b/meta/classes/uboot-config.bbclass | |||
@@ -53,6 +53,8 @@ SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}" | |||
53 | # include it in the SRC_URI and set the UBOOT_ENV parameter. | 53 | # include it in the SRC_URI and set the UBOOT_ENV parameter. |
54 | UBOOT_ENV_SUFFIX ?= "txt" | 54 | UBOOT_ENV_SUFFIX ?= "txt" |
55 | UBOOT_ENV ?= "" | 55 | UBOOT_ENV ?= "" |
56 | UBOOT_ENV_SRC_SUFFIX ?= "cmd" | ||
57 | UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}" | ||
56 | UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" | 58 | UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" |
57 | UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" | 59 | UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" |
58 | UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" | 60 | UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" |
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index f27fdd5998..ec4a3d201d 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc | |||
@@ -4,6 +4,7 @@ PROVIDES = "virtual/bootloader" | |||
4 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 4 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
5 | 5 | ||
6 | DEPENDS += "kern-tools-native" | 6 | DEPENDS += "kern-tools-native" |
7 | DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}" | ||
7 | 8 | ||
8 | inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch | 9 | inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch |
9 | 10 | ||
@@ -106,6 +107,11 @@ do_compile () { | |||
106 | oe_runmake -C ${S} O=${B} u-boot-initial-env | 107 | oe_runmake -C ${S} O=${B} u-boot-initial-env |
107 | fi | 108 | fi |
108 | fi | 109 | fi |
110 | |||
111 | if [ -n "${UBOOT_ENV}" && "${UBOOT_ENV_SUFFIX}" = "scr" ] | ||
112 | then | ||
113 | ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY} | ||
114 | fi | ||
109 | } | 115 | } |
110 | 116 | ||
111 | do_install () { | 117 | do_install () { |