diff options
author | Ming Liu <ming.liu@toradex.com> | 2020-04-05 09:50:29 +0200 |
---|---|---|
committer | Ming Liu <ming.liu@toradex.int> | 2020-04-17 14:54:19 +0000 |
commit | 6a74de45bfed1842912b580488f5d82baf4a5621 (patch) | |
tree | 9cb311178748ea6189de10b50d09bcf93813b68f /recipes-bsp | |
parent | 77838d06a7e27b9cc0d9d572d0924a562a634862 (diff) |
u-boot: merge .cfg files for multiple configs
U-boot recipe support .cfg files in SRC_URI, they would be merged to
.config during do_configure, but this is only supported for single
config case (when UBOOT_MACHINE is set), but not supported for multiple
configs case (when UBOOT_CONFIG is set), we shall also support that.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/u-boot/u-boot.inc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc index 55d8b47..9cd4651 100644 --- a/recipes-bsp/u-boot/u-boot.inc +++ b/recipes-bsp/u-boot/u-boot.inc @@ -79,7 +79,21 @@ 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 + KCONFIG_CONFIG=${S}/configs/${config%_*}_defconfig merge_config.sh -m ${S}/configs/${config%_*}_defconfig ${@" ".join(find_cfgs(d))} + oe_runmake -C ${S} O=${B}/${config} ${config} + fi + done + unset j + done + unset i + else if [ -n "${UBOOT_MACHINE}" ]; then oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} else @@ -114,7 +128,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); |