summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2025-10-07 11:22:56 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-09 10:58:07 +0100
commit66c528b9c52e1fcbaa5667c7e7bd72ecf23e1319 (patch)
tree7c0b381b5a9d34214c9dfc20dc09ac7052325333 /meta/recipes-bsp
parent83e523af784d567a24a96615cca13c17d8f7c9e3 (diff)
downloadpoky-66c528b9c52e1fcbaa5667c7e7bd72ecf23e1319.tar.gz
u-boot: Add specifying make options as part the config looping
There is a need to generate alternative versions of the uboot files using the existing config looping system, but we need to add additional settings to the make call rather simply specifying a different config. Specifically we have two use cases: 1) We want to sign the same uboot files with two different keys where the key will be passed on the make call. 2) We want to include the alternative defconfigs from a different repository and need to add the path to this new location on the make command line. This introduces a fourth value for the UBOOT_CONFIG settings: config,images,binary,make_opts The values are placed into a new generated variable UBOOT_CONFIG_MAKE_OPTS which is a '?' separated list since space can be present if you need to specify multiple options. This is handled by changing IFS in the shell code when looping over the variable. Additionally, add in a new variable UBOOT_MAKE_OPTS which is added to the make calls in the various do_compile functions that do the actual compiling. (From OE-Core rev: 3338330e0c46b83e33c7e982c012459c89a7ec5c) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-configure.inc18
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc16
2 files changed, 29 insertions, 5 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc b/meta/recipes-bsp/u-boot/u-boot-configure.inc
index a15511f8b2..bada506b66 100644
--- a/meta/recipes-bsp/u-boot/u-boot-configure.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc
@@ -33,7 +33,19 @@ uboot_configure_config () {
33 config=$1 33 config=$1
34 type=$2 34 type=$2
35 35
36 oe_runmake -C ${S} O=${B}/${config} ${config} 36 unset k
37 IFS="?"
38 uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
39 for config_make_opts in $uboot_config_make_opts; do
40 k=$(expr $k + 1);
41 if [ $k -eq $i ]; then
42 break
43 fi
44 done
45 unset IFS
46 unset k
47
48 oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${config}
37 if [ -n "${@' '.join(find_cfgs(d))}" ]; then 49 if [ -n "${@' '.join(find_cfgs(d))}" ]; then
38 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} 50 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
39 oe_runmake -C ${S} O=${B}/${config} oldconfig 51 oe_runmake -C ${S} O=${B}/${config} oldconfig
@@ -42,9 +54,9 @@ uboot_configure_config () {
42 54
43uboot_configure () { 55uboot_configure () {
44 if [ -n "${UBOOT_MACHINE}" ]; then 56 if [ -n "${UBOOT_MACHINE}" ]; then
45 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} 57 oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} ${UBOOT_MACHINE}
46 else 58 else
47 oe_runmake -C ${S} O=${B} oldconfig 59 oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} oldconfig
48 fi 60 fi
49 merge_config.sh -m .config ${@" ".join(find_cfgs(d))} 61 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
50 cml1_do_configure 62 cml1_do_configure
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index b7242de5de..e0a69e740e 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -75,7 +75,19 @@ uboot_compile_config () {
75 config=$2 75 config=$2
76 type=$3 76 type=$3
77 77
78 oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} 78 unset k
79 IFS="?"
80 uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
81 for config_make_opts in $uboot_config_make_opts; do
82 k=$(expr $k + 1);
83 if [ $k -eq $i ]; then
84 break
85 fi
86 done
87 unset IFS
88 unset k
89
90 oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
79 91
80 unset k 92 unset k
81 for binary in ${UBOOT_BINARIES}; do 93 for binary in ${UBOOT_BINARIES}; do
@@ -102,7 +114,7 @@ uboot_compile_config_copy_binary () {
102} 114}
103 115
104uboot_compile () { 116uboot_compile () {
105 oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} 117 oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
106 118
107 # Generate the uboot-initial-env 119 # Generate the uboot-initial-env
108 if [ -n "${UBOOT_INITIAL_ENV}" ]; then 120 if [ -n "${UBOOT_INITIAL_ENV}" ]; then