[PATCH v4 11/25] rockchip: Add TPL alternatives
Simon Glass
sjg at chromium.org
Sun May 25 12:47:47 CEST 2025
The TPL image must be built for each board we need to support. It is the
only part of the image which is board-specific.
This helps to save space and reduce the size of TPL, so that it can fit
within the internal 192K IRAM of the RK3399 SoC.
As with other phases, the TPL devicetree is run through fdtgrep to
remove unwanted nodes and properties and reduce its size.
Update the fdtmap so it is at the end of the image, since templates are
added after existing nodes.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v4:
- Put the fdtmap at the end of the image
- Update the comment at the end of the '#ifndef CONFIG_VPL' block
Changes in v2:
- Mention RK3399 with respect to the memory limit
- Move VPL things into a separate file
arch/arm/dts/rockchip-u-boot.dtsi | 3 ++-
arch/arm/dts/rockchip-vpl-u-boot.dtsi | 18 ++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index 18669f73402..905706c68e7 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -171,6 +171,7 @@
filename = "u-boot-rockchip.bin";
pad-byte = <0xff>;
+#ifndef CONFIG_VPL
mkimage {
filename = "idbloader.img";
args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
@@ -196,10 +197,10 @@
#endif
offset = <CONFIG_SPL_PAD_TO>;
};
-#endif
fdtmap {
};
+#endif /* !VPL */
};
#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
diff --git a/arch/arm/dts/rockchip-vpl-u-boot.dtsi b/arch/arm/dts/rockchip-vpl-u-boot.dtsi
index 0d767113408..c5d55b87164 100644
--- a/arch/arm/dts/rockchip-vpl-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-vpl-u-boot.dtsi
@@ -111,6 +111,22 @@
};
simple-bin {
+ alternates-fdt {
+ fdt-list-dir = "dts/upstream/src/arm64/rockchip";
+ filename-pattern = "alt-NAME.bin";
+ fdt-phase = "tpl";
+
+ mkimage {
+ filename = "idbloader.img";
+ args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
+ multiple-data-files;
+
+ u-boot-tpl {
+ symbols-base = <0>;
+ };
+ };
+ };
+
vpl {
type = "fit";
offset = <(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 0x200 + 0x8000)>;
@@ -199,5 +215,7 @@
insert-template = <&fit_template>;
};
# endif /* VBE method */
+ fdtmap {
+ };
};
};
--
2.34.1
More information about the U-Boot
mailing list