u-boot: backport merging .cfg files for UBOOT_CONFIG
cover u-boot: backport merging .cfg files for UBOOT_CONFIG
From: Ahsan Hussain <[email protected]>
The functionality for merging config fragment files has been available in the U-Boot tree (merge_config.sh) but this was not being used for oe-core's UBOOT_CONFIG flow. These commits would allow the distro maintainers to configure the bootloader using cfg files instead of patching the U-Boot tree
The following changes since commit 1a98936830ba468d63e2e49d766add9e9cb75998:
gstreamer1.0-plugins-bad: add support for vdpau (2020-06-23 04:33:47 -1000)
are available in the Git repository at:
git://github.com/ahsanhussain/openembedded-core u-boot-cfg-dunfell
https://github.com/ahsanhussain/openembedded-core/tree/u-boot-cfg-dunfell
Jens Rehsack (1):
u-boot: avoid blind merging all *.cfg
Ming Liu (1):
u-boot: support merging .cfg files for UBOOT_CONFIG
meta/recipes-bsp/u-boot/u-boot.inc | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 u-boot: support merging .cfg files for UBOOT_CONFIG
From: Ming Liu <[email protected]>
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.
--- meta/recipes-bsp/u-boot/u-boot.inc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +17 -4
@@ -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);
Signature · 1 line
2.25.1
Re: [OE-core] [dunfell][PATCH 1/2] u-boot: support merging .cfg files for UBOOT_CONFIG
Hello Richard,
Can you merge this on Dunfell,
Noor
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hussain, Ahsan
Sent: Monday, June 29, 2020 2:16 PM
To: [email protected]
Subject: [OE-core] [dunfell][PATCH 1/2] u-boot: support merging .cfg files for UBOOT_CONFIG
From: Ming Liu <[email protected]>
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.
--- meta/recipes-bsp/u-boot/u-boot.inc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +17 -4
@@ -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.25.1
Re: [OE-core] [dunfell][PATCH 1/2] u-boot: support merging .cfg files for UBOOT_CONFIG
Quoted 3 lines · Noor Ahsan
Hello Richard,
Can you merge this on Dunfell,
Steve (ccd) is the dunfell maintainer, not me...
Cheers,
Richard
Re: [OE-core] [dunfell][PATCH 1/2] u-boot: support merging .cfg files for UBOOT_CONFIG
In reply to Noor AhsanQuoted 1 line · Noor Ahsan
Can you merge this on Dunfell,
These two patches are in a group currently under test. If all goes well they should be in next week's pull request.
Steve
Quoted 67 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hussain, Ahsan
Sent: Monday, June 29, 2020 2:16 PM
To: [email protected]
Subject: [OE-core] [dunfell][PATCH 1/2] u-boot: support merging .cfg files forUBOOT_CONFIGFrom: Ming Liu <[email protected]>
U-boot recipe supports .cfg files in
SRC_URI, but they would be merged to .config duringdo_configureonly whenUBOOT_MACHINEis set, we should also support merging .cfg files forUBOOT_CONFIG.Signed-off-by Max Krummenacher <[email protected]>Signed-off-by Ming Liu <[email protected]>Signed-off-by Richard Purdie <[email protected]>--- meta/recipes-bsp/u-boot/u-boot.inc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)meta/recipes-bsp/u-boot/u-boot.inc +17
-5@@ -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.25.1
PATCH 2/2 u-boot: avoid blind merging all *.cfg
In reply to ahussainFrom: Jens Rehsack <[email protected]>
This fixes u-boot-qoriq breakage of:
commit 4fde8c8f479f5acd24fb6e0d0b9b4dc94d6f560b
Author: Ming Liu <[email protected]>
Date: Wed Jun 3 13:56:01 2020 +0200
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.
The intension of 4fde8c8 looks more than append delta-config snippets to u-boot config and should probably be rewritten to express that much better than implicitely assume all "*.cfg" are for merging into .config.
--- meta/recipes-bsp/u-boot/u-boot.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +5 -3
@@ -85,8 +85,10 @@ do_configure () { 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 + if [ test -n "${@' '.join(find_cfgs(d))}" ]; then + merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} + oe_runmake -C ${S} O=${B}/${config} oldconfig + fi fi done unset j
@@ -119,7 +121,7 @@ do_compile () { echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion fi - if [ -n "${UBOOT_CONFIG}" ] + if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ] then unset i j k for config in ${UBOOT_MACHINE}; do
Signature · 1 line
2.25.1
Re: [OE-core] [dunfell][PATCH 2/2] u-boot: avoid blind merging all *.cfg
Hello Richard,
Can you merge this on Dunfell.
Noor
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hussain, Ahsan
Sent: Monday, June 29, 2020 2:16 PM
To: [email protected]
Subject: [OE-core] [dunfell][PATCH 2/2] u-boot: avoid blind merging all *.cfg
From: Jens Rehsack <[email protected]>
This fixes u-boot-qoriq breakage of:
commit 4fde8c8f479f5acd24fb6e0d0b9b4dc94d6f560b
Author: Ming Liu <[email protected]>
Date: Wed Jun 3 13:56:01 2020 +0200
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.
The intension of 4fde8c8 looks more than append delta-config snippets to u-boot config and should probably be rewritten to express that much better than implicitely assume all "*.cfg" are for merging into .config.
--- meta/recipes-bsp/u-boot/u-boot.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +5 -3
@@ -85,8 +85,10 @@ do_configure () { 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 + if [ test -n "${@' '.join(find_cfgs(d))}" ]; then + merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} + oe_runmake -C ${S} O=${B}/${config} oldconfig + fi fi done unset j
@@ -119,7 +121,7 @@ do_compile () { echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion fi - if [ -n "${UBOOT_CONFIG}" ] + if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ] then unset i j k for config in ${UBOOT_MACHINE}; do
--
2.25.1