From: "Ming Liu" <liu.ming50@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: stefan.agner@toradex.com, max.krummenacher@toradex.com,
denys@ti.com, Ming Liu <ming.liu@toradex.com>
Subject: [OE-core] [PATCH V3 1/3] u-boot: support merging .cfg files for UBOOT_CONFIG
Date: Thu, 28 May 2020 14:41:27 +0200 [thread overview]
Message-ID: <20200528124129.15100-2-liu.ming50@gmail.com> (raw)
In-Reply-To: <20200528124129.15100-1-liu.ming50@gmail.com>
From: Ming Liu <ming.liu@toradex.com>
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.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
meta/recipes-bsp/u-boot/u-boot.inc | 21 +++++++++++++++++----
1 file 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 80f828df52..8cfd25020c 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -77,7 +77,23 @@ 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
+ DEVTOOL_DISABLE_MENUCONFIG=true
+ else
if [ -n "${UBOOT_MACHINE}" ]; then
oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
else
@@ -85,8 +101,6 @@ do_configure () {
fi
merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
cml1_do_configure
- else
- DEVTOOL_DISABLE_MENUCONFIG=true
fi
}
@@ -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);
--
2.26.2
next prev parent reply other threads:[~2020-05-28 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 12:41 [OE-core] [PATCH V3 0/3] Introduce UBOOT_INITIAL_ENV/cfg files fixes/coding style fixes Ming Liu
2020-05-28 12:41 ` Ming Liu [this message]
2020-05-29 20:09 ` [OE-core] [PATCH V3 1/3] u-boot: support merging .cfg files for UBOOT_CONFIG Denys Dmytriyenko
2020-05-28 12:41 ` [OE-core] [PATCH V3 2/3] u-boot.inc: fix some inconsistent coding style Ming Liu
2020-05-28 12:41 ` [OE-core] [PATCH V3 3/3] u-boot: introduce UBOOT_INITIAL_ENV Ming Liu
2020-05-29 20:11 ` Denys Dmytriyenko
2020-06-01 6:48 ` Ming Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200528124129.15100-2-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=denys@ti.com \
--cc=max.krummenacher@toradex.com \
--cc=ming.liu@toradex.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=stefan.agner@toradex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.