spl: Kconfig: Fix SPL_OPTEE_IMAGE dependency
Subsystems (2)
PATCH 1/3 spl: Kconfig: Fix SPL_OPTEE_IMAGE dependency
fdt_addr will build as part of SPL_LOAD_FIT or SPL_LOAD_FIT_FULL which is indeed required to build optee image support in SPL.
common/spl/spl.c: In function ‘jump_to_image_optee’:common/spl/spl.c:220:46: error: ‘struct spl_image_info’ has no member named ‘fdt_addr’
220 | spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
Fix the dependency support.
--- common/spl/Kconfig | 1 + 1 file changed, 1 insertion(+)
common/spl/Kconfig +1 -0
@@ -1479,6 +1479,7 @@ config SPL_AM33XX_ENABLE_RTC32K_OSC config SPL_OPTEE_IMAGE bool "Support OP-TEE Trusted OS image in SPL" depends on ARM + depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL help OP-TEE is an open source Trusted OS which is loaded by SPL. More detail at: https://github.com/OP-TEE/optee_os
Signature · 1 line
2.25.1
PATCH 2/3 arm: dts: rockchip: Separate rockchip-binman.dtsi
rockchip-u-boot.dtsi has the FIT image for the final stage of binman image creation.
If the actual binman node is part of this dtsi then there are build issues to use optee as input to this final stage binman image since optee is built via another binman image creation unlike ATF built via tools like make_fit_atf.py.
binman: Filename 'u-boot.itb' not found in input path
Fix this by separating binman FIT image in rockchip-binman.dtsi
rockchip-u-boot.dtsi: binman noderockchip-binman.dtsi: binman FIT image node
The inclusion of rockchip-binman.dtsi is always to be last in included files as it has a FIT image node for final image creation.
Sample example of optee used rk3288 looks like
b/arch/arm/dts/rk3288-u-boot.dtsi
#include "rockchip-u-boot.dtsi"
#include "rockchip-optee.dtsi"
#include "rockchip-binman.dtsi"
--- arch/arm/dts/px30-u-boot.dtsi | 1 + arch/arm/dts/rk3036-u-boot.dtsi | 1 + arch/arm/dts/rk3066a-u-boot.dtsi | 1 + arch/arm/dts/rk3188-u-boot.dtsi | 1 + arch/arm/dts/rk322x-u-boot.dtsi | 1 + arch/arm/dts/rk3288-u-boot.dtsi | 1 + arch/arm/dts/rk3308-u-boot.dtsi | 1 + arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi | 1 + arch/arm/dts/rk3328-u-boot.dtsi | 1 + arch/arm/dts/rk3368-u-boot.dtsi | 1 + arch/arm/dts/rk3399-u-boot.dtsi | 1 + arch/arm/dts/rk356x-u-boot.dtsi | 1 + arch/arm/dts/rockchip-binman.dtsi | 67 ++++++++++++++++++++++ arch/arm/dts/rockchip-u-boot.dtsi | 61 -------------------- arch/arm/dts/rv1108-u-boot.dtsi | 1 + arch/arm/dts/rv1126-u-boot.dtsi | 1 + 16 files changed, 81 insertions(+), 61 deletions(-) create mode 100644 arch/arm/dts/rockchip-binman.dtsi
arch/arm/dts/px30-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rk3036-u-boot.dtsi +1 -0
@@ -4,3 +4,4 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi"
arch/arm/dts/rk3066a-u-boot.dtsi +1 -0
@@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" #include "rk3xxx-u-boot.dtsi"
arch/arm/dts/rk3188-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" #include "rk3xxx-u-boot.dtsi" &global_timer {
arch/arm/dts/rk322x-u-boot.dtsi +1 -0
@@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { bus_intmem@10080000 {
arch/arm/dts/rk3288-u-boot.dtsi +1 -0
@@ -5,6 +5,7 @@ #include "rockchip-u-boot.dtsi" #include "rockchip-optee.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rk3308-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { chosen {
arch/arm/dts/rk3328-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rk3368-u-boot.dtsi +1 -0
@@ -5,6 +5,7 @@ #include <dt-bindings/memory/rk3368-dmc.h> #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { dmc: dmc@ff610000 {
arch/arm/dts/rk3399-u-boot.dtsi +1 -0
@@ -5,6 +5,7 @@ #define USB_CLASS_HUB 9 #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rk356x-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { aliases {
arch/arm/dts/rockchip-binman.dtsi new file +67 -0
67 lines not on this page · raw message
arch/arm/dts/rockchip-u-boot.dtsi +0 -61
64 lines not on this page · raw message
arch/arm/dts/rv1108-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" &grf { u-boot,dm-pre-reloc;
arch/arm/dts/rv1126-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "rockchip-u-boot.dtsi" +#include "rockchip-binman.dtsi" / { chosen {
Signature · 1 line
2.25.1
PATCH 3/3 arm: dts: rockchip: Build binman image for SPL_OPTEE_IMAGE
In reply to Jagan TekiLike ARM64 the u-boot.itb is also built when SPL_OPTEE_IMAGE is defined.
So, add SPL_OPTEE_IMAGE check for u-boot.itb blob so-that OPTEE is part of u-boot-rockchip.bin.
--- arch/arm/dts/rockchip-binman.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/rockchip-binman.dtsi +1 -1
@@ -24,7 +24,7 @@ }; }; -#ifdef CONFIG_ARM64 +#if defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE) blob { filename = "u-boot.itb"; #else
Signature · 1 line
2.25.1