summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-04-13 19:59:35 +0000
committerKever Yang <[email protected]>2025-05-06 15:58:25 +0800
commit2febe31d6672dfbd02cbcaf1873ed049eaa2d249 (patch)
tree364c5afdd3615daac4641bacce5e2f555c75e07d /arch
parent3810ce1b47a2a65d962c6dc14e8e4ef2c799d2d0 (diff)
rockchip: binman: Create a template for the FIT
Move the FIT description into a template so that it can be used in both the simple-bin and the simple-bin-spi images. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/dts/rockchip-u-boot.dtsi64
1 files changed, 36 insertions, 28 deletions
diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index 943d7d87a06..0c074c0ec6b 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -19,6 +19,10 @@
#define FIT_UBOOT_COMP "none"
#endif
+#if defined(CONFIG_SPL_FIT) && (defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE))
+#define HAS_FIT
+#endif
+
/ {
binman: binman {
multiple-images;
@@ -27,28 +31,9 @@
#ifdef CONFIG_SPL
&binman {
- simple-bin {
- filename = "u-boot-rockchip.bin";
- pad-byte = <0xff>;
-
- mkimage {
- filename = "idbloader.img";
- args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
- multiple-data-files;
-
-#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
- rockchip-tpl {
- };
-#elif defined(CONFIG_TPL)
- u-boot-tpl {
- };
-#endif
- u-boot-spl {
- };
- };
-
-#if defined(CONFIG_SPL_FIT) && (defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE))
- fit: fit {
+#ifdef HAS_FIT
+ fit_template: template-1 {
+ type = "fit";
#ifdef CONFIG_ARM64
description = "FIT image for U-Boot with bl31 (TF-A)";
#else
@@ -56,10 +41,8 @@
#endif
#address-cells = <1>;
fit,fdt-list = "of-list";
- filename = "u-boot.itb";
fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
fit,align = <512>;
- offset = <CONFIG_SPL_PAD_TO>;
images {
u-boot {
description = "U-Boot";
@@ -164,12 +147,38 @@
fit,loadables;
};
};
+ };
+#endif /* HAS_FIT */
+
+ simple-bin {
+ filename = "u-boot-rockchip.bin";
+ pad-byte = <0xff>;
+
+ mkimage {
+ filename = "idbloader.img";
+ args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
+ multiple-data-files;
+
+#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
+ rockchip-tpl {
+ };
+#elif defined(CONFIG_TPL)
+ u-boot-tpl {
+ };
+#endif
+ u-boot-spl {
+ };
};
+
+#ifdef HAS_FIT
+ fit {
+ filename = "u-boot.itb";
+ insert-template = <&fit_template>;
#else
u-boot-img {
+#endif
offset = <CONFIG_SPL_PAD_TO>;
};
-#endif
};
#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
@@ -193,10 +202,9 @@
};
};
-#if defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE)
+#ifdef HAS_FIT
fit {
- type = "blob";
- filename = "u-boot.itb";
+ insert-template = <&fit_template>;
#else
u-boot-img {
#endif