* [OE-core] [PATCH] u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr
@ 2021-10-13 14:50 Peter Hoyes
0 siblings, 0 replies; only message in thread
From: Peter Hoyes @ 2021-10-13 14:50 UTC (permalink / raw)
To: openembedded-core; +Cc: Peter Hoyes
From: Peter Hoyes <Peter.Hoyes@arm.com>
* 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
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
---
meta/classes/uboot-config.bbclass | 2 ++
meta/recipes-bsp/u-boot/u-boot.inc | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 07a303d0a07..b9ad35821ac 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}"
# include it in the SRC_URI and set the UBOOT_ENV parameter.
UBOOT_ENV_SUFFIX ?= "txt"
UBOOT_ENV ?= ""
+UBOOT_ENV_SRC_SUFFIX ?= "cmd"
+UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}"
UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
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 f27fdd5998e..ec4a3d201d1 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"
PACKAGE_ARCH = "${MACHINE_ARCH}"
DEPENDS += "kern-tools-native"
+DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch
@@ -106,6 +107,11 @@ do_compile () {
oe_runmake -C ${S} O=${B} u-boot-initial-env
fi
fi
+
+ if [ -n "${UBOOT_ENV}" && "${UBOOT_ENV_SUFFIX}" = "scr" ]
+ then
+ ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY}
+ fi
}
do_install () {
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-13 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 14:50 [OE-core] [PATCH] u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr Peter Hoyes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.