Message ID | 20240304153253.732708-2-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Dario, All, On 2024-03-04 16:32 +0100, Dario Binacchi spake thusly: > Using PLATFORM=k3 can leads to a runtime boot crash on some K3 SoC (e.g. > j721e) because the optee flavor is missing. > > We could use BR2_TARGET_OPTEE_OS_PLATFORM=k3 and > BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR=am62x but we actually can use > BR2_TARGET_OPTEE_OS_PLATFORM=k3-am62x as explained in the optee-os > Makefile [1]: > > # If $(PLATFORM) is defined and contains a hyphen, parse it as > # $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience > > This is how meta-ti set the optee-os platform: > > meta-ti]$ git grep OPTEEMACHINE > meta-ti-bsp/conf/machine/am437x-hs-evm.conf:OPTEEMACHINE = "ti-am43xx" > meta-ti-bsp/conf/machine/am57xx-hs-evm.conf:OPTEEMACHINE = "ti-am57xx" > meta-ti-bsp/conf/machine/beagleplay.conf:OPTEEMACHINE = "k3-am62x" > meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf:OPTEEMACHINE = "ti-dra7xx" > meta-ti-bsp/conf/machine/include/am62axx.inc:OPTEEMACHINE = "k3-am62x" > meta-ti-bsp/conf/machine/include/am62pxx.inc:OPTEEMACHINE = "k3-am62x" > meta-ti-bsp/conf/machine/include/am62xx.inc:OPTEEMACHINE = "k3-am62x" > meta-ti-bsp/conf/machine/include/am64xx.inc:OPTEEMACHINE = "k3-am64x" > meta-ti-bsp/conf/machine/include/am65xx.inc:OPTEEMACHINE = "k3-am65x" > meta-ti-bsp/conf/machine/include/j7200.inc:OPTEEMACHINE = "k3-j721e" > meta-ti-bsp/conf/machine/include/j721e.inc:OPTEEMACHINE = "k3-j721e" > meta-ti-bsp/conf/machine/include/j721s2.inc:OPTEEMACHINE = "k3-j784s4" > meta-ti-bsp/conf/machine/include/j722s.inc:OPTEEMACHINE = "k3-am62x" > meta-ti-bsp/conf/machine/include/j784s4.inc:OPTEEMACHINE = "k3-j784s4" > > meta-ti uses the OPTEEMACHINE to set optee-os platform [2]. > > [1] https://github.com/OP-TEE/optee_os/blob/4.0.0/Makefile#L37 > [2] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23 > > Suggested-by: Romain Naour <romain.naour@smile.fr> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Applied to master, thanks. Regards, Yann E. MORIN. > --- > > Changes in v6: > - Update commit message > > Changes in v5 > - Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option > > Added in v4 > > configs/ti_am62x_sk_defconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig > index f88252a89c68..c3ad555a8184 100644 > --- a/configs/ti_am62x_sk_defconfig > +++ b/configs/ti_am62x_sk_defconfig > @@ -21,7 +21,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" > BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" > BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y > BR2_TARGET_OPTEE_OS=y > -BR2_TARGET_OPTEE_OS_PLATFORM="k3" > +BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" > BR2_TARGET_TI_K3_IMAGE_GEN=y > BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y > BR2_TARGET_TI_K3_R5_LOADER=y > -- > 2.43.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig index f88252a89c68..c3ad555a8184 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -21,7 +21,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y -BR2_TARGET_OPTEE_OS_PLATFORM="k3" +BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y
Using PLATFORM=k3 can leads to a runtime boot crash on some K3 SoC (e.g. j721e) because the optee flavor is missing. We could use BR2_TARGET_OPTEE_OS_PLATFORM=k3 and BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR=am62x but we actually can use BR2_TARGET_OPTEE_OS_PLATFORM=k3-am62x as explained in the optee-os Makefile [1]: # If $(PLATFORM) is defined and contains a hyphen, parse it as # $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience This is how meta-ti set the optee-os platform: meta-ti]$ git grep OPTEEMACHINE meta-ti-bsp/conf/machine/am437x-hs-evm.conf:OPTEEMACHINE = "ti-am43xx" meta-ti-bsp/conf/machine/am57xx-hs-evm.conf:OPTEEMACHINE = "ti-am57xx" meta-ti-bsp/conf/machine/beagleplay.conf:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf:OPTEEMACHINE = "ti-dra7xx" meta-ti-bsp/conf/machine/include/am62axx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62pxx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62xx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am64xx.inc:OPTEEMACHINE = "k3-am64x" meta-ti-bsp/conf/machine/include/am65xx.inc:OPTEEMACHINE = "k3-am65x" meta-ti-bsp/conf/machine/include/j7200.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721e.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721s2.inc:OPTEEMACHINE = "k3-j784s4" meta-ti-bsp/conf/machine/include/j722s.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/j784s4.inc:OPTEEMACHINE = "k3-j784s4" meta-ti uses the OPTEEMACHINE to set optee-os platform [2]. [1] https://github.com/OP-TEE/optee_os/blob/4.0.0/Makefile#L37 [2] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23 Suggested-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- Changes in v6: - Update commit message Changes in v5 - Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option Added in v4 configs/ti_am62x_sk_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)