[PATCH 08/10] include: env: phytec: k3_mmc: Add support for FIT boot

Daniel Schultz d.schultz at phytec.de
Wed Feb 5 09:01:44 CET 2025


From: Nathan Morrisson <nmorrisson at phytec.com>

Our Secure Boot implementation uses a fitimage while our normal
boot flow doesn't. Load and boot a fitimage when
PHYTEC_K3_DOFITBOOT_DEFAULT is enabled. Otherwise, use our normal
k3 mmc boot flow.

Signed-off-by: Nathan Morrisson <nmorrisson at phytec.com>
Signed-off-by: Daniel Schultz <d.schultz at phytec.de>
---
 include/env/phytec/k3_mmc.env | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/env/phytec/k3_mmc.env b/include/env/phytec/k3_mmc.env
index c4354fbb884..d90bf8277c8 100644
--- a/include/env/phytec/k3_mmc.env
+++ b/include/env/phytec/k3_mmc.env
@@ -15,6 +15,7 @@ doraucboot=1
 mmcargs=setenv bootargs console=${console} earlycon=${earlycon}
 	root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw
 mmcloadimage=load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} Image
+mmcloadfitimage=load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} fitImage;
 mmcloadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
 mmcboot=
 #ifdef CONFIG_PHYTEC_K3_EMBED_RAUC_ENV
@@ -23,7 +24,12 @@ mmcboot=
 	run mmcargs;
 	mmc dev ${mmcdev};
 	mmc rescan;
+#ifdef CONFIG_PHYTEC_K3_DOFITBOOT_DEFAULT
+	run mmcloadfitimage;
+	bootm ${fit_addr_r};
+#else
 	run mmcloadimage;
 	run mmcloadfdt;
 	run mmc_apply_overlays;
 	booti ${kernel_addr_r} - ${fdt_addr_r}
+#endif
-- 
2.25.1



More information about the U-Boot mailing list