* [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG
@ 2020-06-03 11:56 Ming Liu
2020-06-19 7:15 ` Noor Ahsan
0 siblings, 1 reply; 3+ messages in thread
From: Ming Liu @ 2020-06-03 11:56 UTC (permalink / raw)
To: openembedded-core; +Cc: stefan.agner, max.krummenacher, Ming Liu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG
2020-06-03 11:56 [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG Ming Liu
@ 2020-06-19 7:15 ` Noor Ahsan
2020-06-19 15:28 ` Steve Sakoman
0 siblings, 1 reply; 3+ messages in thread
From: Noor Ahsan @ 2020-06-19 7:15 UTC (permalink / raw)
To: Ming Liu, openembedded-core; +Cc: stefan.agner, max.krummenacher, Ming Liu
Can this be ported/merged to dunfell also?
Noor
-----Original Message-----
From: openembedded-core@lists.openembedded.org [mailto:openembedded-core@lists.openembedded.org] On Behalf Of Ming Liu
Sent: Wednesday, June 3, 2020 4:56 PM
To: openembedded-core@lists.openembedded.org
Cc: stefan.agner@toradex.com; max.krummenacher@toradex.com; Ming Liu <ming.liu@toradex.com>
Subject: [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG
2020-06-19 7:15 ` Noor Ahsan
@ 2020-06-19 15:28 ` Steve Sakoman
0 siblings, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2020-06-19 15:28 UTC (permalink / raw)
To: Noor Ahsan
Cc: Ming Liu, openembedded-core, stefan.agner, max.krummenacher, Ming Liu
This is a new feature (as opposed to a bug or cve fix) so we need to
have some list discussion on why it should be taken.
I also see that this patch causes breakage and there is a follow-on
fix patch (u-boot: avoid blind merging all *.cfg)
To get the discussion going please submit a patch series to the list
(tagged with [dunfell]) including a cover letter that makes the case
for adding the feature.
Thanks!
Steve
On Thu, Jun 18, 2020 at 9:15 PM Noor Ahsan <noor_ahsan@mentor.com> wrote:
>
> Can this be ported/merged to dunfell also?
>
> Noor
>
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org [mailto:openembedded-core@lists.openembedded.org] On Behalf Of Ming Liu
> Sent: Wednesday, June 3, 2020 4:56 PM
> To: openembedded-core@lists.openembedded.org
> Cc: stefan.agner@toradex.com; max.krummenacher@toradex.com; Ming Liu <ming.liu@toradex.com>
> Subject: [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG
>
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-19 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 11:56 [OE-core] [PATCH V2] u-boot: support merging .cfg files for UBOOT_CONFIG Ming Liu
2020-06-19 7:15 ` Noor Ahsan
2020-06-19 15:28 ` Steve Sakoman
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.