* [master/kirkstone][PATCH] machine:k3r5:Handle UBOOT_CONFIG for multiple R5 defconfigs
@ 2023-10-02 21:16 ggiordano
2023-10-03 13:01 ` [meta-ti] " Denys Dmytriyenko
0 siblings, 1 reply; 3+ messages in thread
From: ggiordano @ 2023-10-02 21:16 UTC (permalink / raw)
To: meta-ti
From: Garrett Giordano <ggiordano@phytec.com>
Currently the do_compile step fails if we try to implement UBOOT_CONFIG
in an attempt to build U-Boot with multiple R5 defconfigs.
This commit adds a condition to handle linking the UBOOT_BINARY if
UBOOT_CONFIG is used in place of UBOOT_MACHINE.
Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
---
meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 22 ++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
index 2c4ddcc2..327a31d8 100644
--- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
@@ -103,8 +103,26 @@ UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}"
UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}"
do_compile:append:k3r5 () {
- if ! [ -f ${B}/${UBOOT_BINARY} ]; then
- ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
+ if [ -n "${UBOOT_CONFIG}" ];
+ then
+ 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
+ if ! [ -L ${B}/${config}/${UBOOT_BINARY} ] && ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then
+ ln -s ${B}/${config}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${config}/${UBOOT_BINARY}
+ fi
+ fi
+ done
+ unset j
+ done
+ unset i
+ else
+ if ! [ -f ${B}/${UBOOT_BINARY} ]; then
+ ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
+ fi
fi
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH] machine:k3r5:Handle UBOOT_CONFIG for multiple R5 defconfigs
2023-10-02 21:16 [master/kirkstone][PATCH] machine:k3r5:Handle UBOOT_CONFIG for multiple R5 defconfigs ggiordano
@ 2023-10-03 13:01 ` Denys Dmytriyenko
2023-10-04 15:41 ` Garrett Giordano
0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2023-10-03 13:01 UTC (permalink / raw)
To: Garrett Giordano; +Cc: meta-ti
The prefix in the Subject indicates the area being changed, so should
rather be u-boot: instead of machine:k3r5:
On Mon, Oct 02, 2023 at 02:16:16PM -0700, Garrett Giordano wrote:
> From: Garrett Giordano <ggiordano@phytec.com>
>
> Currently the do_compile step fails if we try to implement UBOOT_CONFIG
> in an attempt to build U-Boot with multiple R5 defconfigs.
>
> This commit adds a condition to handle linking the UBOOT_BINARY if
> UBOOT_CONFIG is used in place of UBOOT_MACHINE.
Are you sure you don't need any corresponding changes in do_install
and do_deploy to handle UBOOT_CONFIG for k3r5? Have you tested that
all binaries and symlinks are being installed and deployed properly
from ${B}/${config} location?
And I've already mentioned this before, but UBOOT_CONFIG won't work
with recently introduced UBOOT_CONFIG_FRAGMENTS - see the list from
last month for previous discussions on this, e.g.:
https://lists.yoctoproject.org/g/meta-ti/topic/101245468
At least UBOOT_CONFIG_FRAGMENTS will still work if UBOOT_CONFIG is
not set, due to the else condition below.
> Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
> ---
> meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 22 ++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> index 2c4ddcc2..327a31d8 100644
> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> @@ -103,8 +103,26 @@ UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}"
> UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}"
>
> do_compile:append:k3r5 () {
> - if ! [ -f ${B}/${UBOOT_BINARY} ]; then
> - ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
> + if [ -n "${UBOOT_CONFIG}" ];
> + then
> + 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
> + if ! [ -L ${B}/${config}/${UBOOT_BINARY} ] && ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then
> + ln -s ${B}/${config}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${config}/${UBOOT_BINARY}
> + fi
> + fi
> + done
> + unset j
> + done
> + unset i
> + else
> + if ! [ -f ${B}/${UBOOT_BINARY} ]; then
> + ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
> + fi
> fi
> }
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-ti] [master/kirkstone][PATCH] machine:k3r5:Handle UBOOT_CONFIG for multiple R5 defconfigs
2023-10-03 13:01 ` [meta-ti] " Denys Dmytriyenko
@ 2023-10-04 15:41 ` Garrett Giordano
0 siblings, 0 replies; 3+ messages in thread
From: Garrett Giordano @ 2023-10-04 15:41 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-ti
On 10/3/23 06:01, Denys Dmytriyenko wrote:
> The prefix in the Subject indicates the area being changed, so should
> rather be u-boot: instead of machine:k3r5:
Thanks, understood.
> On Mon, Oct 02, 2023 at 02:16:16PM -0700, Garrett Giordano wrote:
>> From: Garrett Giordano <ggiordano@phytec.com>
>>
>> Currently the do_compile step fails if we try to implement UBOOT_CONFIG
>> in an attempt to build U-Boot with multiple R5 defconfigs.
>>
>> This commit adds a condition to handle linking the UBOOT_BINARY if
>> UBOOT_CONFIG is used in place of UBOOT_MACHINE.
> Are you sure you don't need any corresponding changes in do_install
> and do_deploy to handle UBOOT_CONFIG for k3r5? Have you tested that
> all binaries and symlinks are being installed and deployed properly
> from ${B}/${config} location?
>
> And I've already mentioned this before, but UBOOT_CONFIG won't work
> with recently introduced UBOOT_CONFIG_FRAGMENTS - see the list from
> last month for previous discussions on this, e.g.:
> https://lists.yoctoproject.org/g/meta-ti/topic/101245468
>
> At least UBOOT_CONFIG_FRAGMENTS will still work if UBOOT_CONFIG is
> not set, due to the else condition below.
Yes, the UBOOT_CONFIG logic is based on the do_install and do_deploy
already included in the file, it seems to have gotten missed in the
do_compile:k3r5.
We tested this patch using the UBOOT_CONFIG setup from the
am335x-hs-evm.conf. A tiboot3.bin was deployed properly for each
included defconfig.
Regards,
Garrett Giordano
>> Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
>> ---
>> meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 22 ++++++++++++++++++--
>> 1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> index 2c4ddcc2..327a31d8 100644
>> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> @@ -103,8 +103,26 @@ UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}"
>> UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}"
>>
>> do_compile:append:k3r5 () {
>> - if ! [ -f ${B}/${UBOOT_BINARY} ]; then
>> - ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
>> + if [ -n "${UBOOT_CONFIG}" ];
>> + then
>> + 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
>> + if ! [ -L ${B}/${config}/${UBOOT_BINARY} ] && ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then
>> + ln -s ${B}/${config}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${config}/${UBOOT_BINARY}
>> + fi
>> + fi
>> + done
>> + unset j
>> + done
>> + unset i
>> + else
>> + if ! [ -f ${B}/${UBOOT_BINARY} ]; then
>> + ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
>> + fi
>> fi
>> }
>>
>> --
>> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-04 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 21:16 [master/kirkstone][PATCH] machine:k3r5:Handle UBOOT_CONFIG for multiple R5 defconfigs ggiordano
2023-10-03 13:01 ` [meta-ti] " Denys Dmytriyenko
2023-10-04 15:41 ` Garrett Giordano
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.