diff options
| author | Ming Liu <ming.liu@toradex.com> | 2020-06-03 13:56:01 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-07 23:15:09 +0100 |
| commit | 29513a7d1cda1b82969085f7c3c0d021d2725a7e (patch) | |
| tree | 4a8b57f82518d3ec7493982ea9bc6d4bd6a78a88 | |
| parent | 009735549b78196d9ccd9abf84a7b6c918fd6f77 (diff) | |
| download | poky-29513a7d1cda1b82969085f7c3c0d021d2725a7e.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: cd7ca887f79f67f2cf0499481a4032825c3077f2)
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>
(cherry picked from commit ce3de00d41791fa5e9557c5e93a99fbe368311f5)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 21 |
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 cbe15cb3c8..f905dfed4e 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 | ||
| 83 | do_configure () { | 83 | do_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); |
