[Buildroot] [PATCH v8 20/23] package/ti-k3: fix BR2_PACKAGE_TI_K3_SOC setting for am64x SOC

Dario Binacchi dario.binacchi at amarulasolutions.com
Sat Mar 2 14:21:40 UTC 2024


Hi Romain, All,

On Sat, Mar 2, 2024 at 12:06 PM Romain Naour <romain.naour at smile.fr> wrote:
>
> Hi Dario,
>
> Le 01/03/2024 à 14:36, Dario Binacchi a écrit :
> > In the case of SOC am64x, ti-k3-r5-loader creates the following
> > tiboot3.bin files:
> > - GP    -> tiboot3_am64x-gp-evm.bin
> > - HS    -> tiboot3_am64x_sr2-hs-evm.bin
> > - HS_FS -> tiboot3_am64x_sr2-hs-fs-evm.bin
> >
> > The patch allows you to identify the correct file based on the SEC_TYPE
> > option.
>
> It seems this patch should be merged with the AM64x u-boot version bump since
> ti-k3-r5 (aka u-boot) now provide tiboot3.bin.

I will squash it to [PATCH 21/23] configs/ti_am64x_sk_defconfig: bump
U-Boot version to 2024.01

>
> Also other TI K3 SoC variant like AM65 provide a sr2 binary:
>
> tiboot3-am62ax-hs-fs-evm.bin
> tiboot3-am62ax-gp-evm.bin
> tiboot3-am62ax-hs-evm.bin
>
> tiboot3-am62px-hs-fs-evm.bin
>
> tiboot3-am62x-hs-fs-evm.bin
> tiboot3-am62x-gp-evm.bin
> tiboot3-am62x-hs-evm.bin
>
> tiboot3-am64x_sr2-hs-fs-evm.bin
> tiboot3-am64x-gp-evm.bin
> tiboot3-am64x_sr2-hs-evm.bin
>
> tiboot3-am65x_sr2-gp-evm.bin
> tiboot3-am65x_sr2-hs-evm.bin
>
> tiboot3-j7200-gp-evm.bin
> tiboot3-j7200_sr2-hs-fs-evm.bin
> tiboot3-j7200_sr2-hs-evm.bin
>
> tiboot3-j721e-gp-evm.bin
> tiboot3-j721e_sr2-hs-fs-evm.bin
> tiboot3-j721e_sr1_1-hs-evm.bin
>
> tiboot3-j721s2-gp-evm.bin
> tiboot3-j721s2-hs-fs-evm.bin
>
> tiboot3-j722s-hs-fs-evm.bin
>
> tiboot3-j784s4-gp-evm.bin
> tiboot3-j784s4-hs-fs-evm.bin
>
> Maybe we need to introduce TI_K3_R5_LOADER_SOC_SUFFIX to handle sr2, sr1_1 or "" ?
>
At first, I also thought about a new configuration to specify an
additional suffix, but after verifying
that BR2_PACKAGE_TI_K3_SOC is only used in
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk, the
adopted solution:

-       default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
+       default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X &&
BR2_PACKAGE_TI_K3_SECTYPE_GP
+       default "am64x_sr2"  if BR2_PACKAGE_TI_K3_SOC_AM64X &&
!BR2_PACKAGE_TI_K3_SECTYPE_GP

seemed the simplest to me.

And I think this approach can also be used for the variants you
listed, since for each {SOC,SEC_TYPE} pair
there exists one and only one tiboot3.bin.

Furthermore, if I'm not missing anything, this remains the only
adjustment we need to make since there are no
other configurations in buildroot among those you listed. So, in my
humble opinion, for now, this should be fine.

So, please let me know if, in addition to squashing this patch into
"[21/23] configs/ti_am64x_sk_defconfig:
bump U-Boot version to 2024.01", I need to make any other adjustments
for version 9.

Thanks and regards,
Dario

> Best regards,
> Romain
>
>
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> >
> > ---
> >
> > Added in v8
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> > ---
> >  package/ti-k3/Config.in | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
> > index b8545b7bca62..9c61f8880a15 100644
> > --- a/package/ti-k3/Config.in
> > +++ b/package/ti-k3/Config.in
> > @@ -43,7 +43,8 @@ config BR2_PACKAGE_TI_K3_SOC
> >       string
> >       default "am62ax" if BR2_PACKAGE_TI_K3_SOC_AM62AX
> >       default "am62x"  if BR2_PACKAGE_TI_K3_SOC_AM62X
> > -     default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
> > +     default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X && BR2_PACKAGE_TI_K3_SECTYPE_GP
> > +     default "am64x_sr2"  if BR2_PACKAGE_TI_K3_SOC_AM64X && !BR2_PACKAGE_TI_K3_SECTYPE_GP
> >       default "am65x"  if BR2_PACKAGE_TI_K3_SOC_AM65X
> >
> >  config BR2_PACKAGE_TI_K3_SECTYPE
>


-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi at amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info at amarulasolutions.com

www.amarulasolutions.com



More information about the buildroot mailing list