summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2020-05-28 13:29:34 +0200
committerMing Liu <ming.liu@toradex.com>2020-05-28 13:42:13 +0200
commit24a91ebe7f1472d1d4ce101a56cf81f21b30ba85 (patch)
tree302f9ddb67cb2437488c5405370b08b8a94b15f8
parent77e97f0d6e1c131b8039cd62937177b8f9688411 (diff)
u-boot: support merging .cfg files for UBOOT_CONFIG
U-boot recipe supports .cfg files in SRC_URI, but they would be merged to .config during do_configure only when UBOOT_MACHINE is set, we should also support merging .cfg files for UBOOT_CONFIG. Related to: TOR-587, TOR-589, TOR-701, 50811 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ming Liu <ming.liu@toradex.com>
-rw-r--r--recipes-bsp/u-boot/u-boot.inc18
1 files changed, 16 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc
index 9a754fd..f31dc4e 100644
--- a/recipes-bsp/u-boot/u-boot.inc
+++ b/recipes-bsp/u-boot/u-boot.inc
@@ -79,7 +79,22 @@ def find_cfgs(d):
return sources_list
do_configure () {
- if [ -z "${UBOOT_CONFIG}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ unset i j
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]; then
+ oe_runmake -C ${S} O=${B}/${config} ${config}
+ merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
+ oe_runmake -C ${S} O=${B}/${config} oldconfig
+ fi
+ done
+ unset j
+ done
+ unset i
+ else
if [ -n "${UBOOT_MACHINE}" ]; then
oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
else
@@ -114,7 +129,6 @@ do_compile () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- oe_runmake -C ${S} O=${B}/${config} ${config}
oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
for binary in ${UBOOT_BINARIES}; do
k=$(expr $k + 1);