summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2020-05-28 13:29:34 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2020-06-09 18:55:27 +0200
commitc085559cce3b22bc595f45b692c3edff648ff523 (patch)
treeabbfe03bad83fb33bf12ec19b57dae54094364fd /recipes-bsp
parentcdb56d341f4e275860084cce887d6096ade14f27 (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> (cherry picked from commit 24a91ebe7f1472d1d4ce101a56cf81f21b30ba85)
Diffstat (limited to 'recipes-bsp')
-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 55d8b47..947ecc3 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);