summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2020-06-03 13:56:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-09 13:13:59 +0100
commit4fde8c8f479f5acd24fb6e0d0b9b4dc94d6f560b (patch)
tree683457bf07ab05afc317dc7dd6831b52b4cca287 /meta/recipes-bsp
parent53fff50cbc363fbf6213587ef30bb4cb0c610add (diff)
downloadpoky-4fde8c8f479f5acd24fb6e0d0b9b4dc94d6f560b.tar.gz
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. (From OE-Core rev: ce3de00d41791fa5e9557c5e93a99fbe368311f5) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ming Liu <ming.liu@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc21
1 files changed, 17 insertions, 4 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 6fa2d0820c..f6a68da0f6 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -81,7 +81,23 @@ def find_cfgs(d):
81 return sources_list 81 return sources_list
82 82
83do_configure () { 83do_configure () {
84 if [ -z "${UBOOT_CONFIG}" ]; then 84 if [ -n "${UBOOT_CONFIG}" ]; then
85 unset i j
86 for config in ${UBOOT_MACHINE}; do
87 i=$(expr $i + 1);
88 for type in ${UBOOT_CONFIG}; do
89 j=$(expr $j + 1);
90 if [ $j -eq $i ]; then
91 oe_runmake -C ${S} O=${B}/${config} ${config}
92 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
93 oe_runmake -C ${S} O=${B}/${config} oldconfig
94 fi
95 done
96 unset j
97 done
98 unset i
99 DEVTOOL_DISABLE_MENUCONFIG=true
100 else
85 if [ -n "${UBOOT_MACHINE}" ]; then 101 if [ -n "${UBOOT_MACHINE}" ]; then
86 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} 102 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
87 else 103 else
@@ -89,8 +105,6 @@ do_configure () {
89 fi 105 fi
90 merge_config.sh -m .config ${@" ".join(find_cfgs(d))} 106 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
91 cml1_do_configure 107 cml1_do_configure
92 else
93 DEVTOOL_DISABLE_MENUCONFIG=true
94 fi 108 fi
95} 109}
96 110
@@ -118,7 +132,6 @@ do_compile () {
118 j=$(expr $j + 1); 132 j=$(expr $j + 1);
119 if [ $j -eq $i ] 133 if [ $j -eq $i ]
120 then 134 then
121 oe_runmake -C ${S} O=${B}/${config} ${config}
122 oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} 135 oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
123 for binary in ${UBOOT_BINARIES}; do 136 for binary in ${UBOOT_BINARIES}; do
124 k=$(expr $k + 1); 137 k=$(expr $k + 1);