[U-Boot] [PATCH V2 7/9] spl: nand: support loading i.MX container format file

peng.fan at nxp.com peng.fan at nxp.com
Mon Sep 23 02:18:46 UTC 2019


From: Peng Fan <peng.fan at nxp.com>

i.MX8 only support AHAB secure boot with Container format image,
we could not use FIT to support secure boot, so introduce container
support to let SPL could load container images.

Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
Cc: Tien Fong Chee <tien.fong.chee at intel.com>
Cc: York Sun <york.sun at nxp.com>
Cc: Marek Vasut <marex at denx.de>
Cc: Alex Kiernan <alex.kiernan at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
Cc: Kever Yang <kever.yang at rock-chips.com>
Cc: Heiko Schocher <hs at denx.de>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---

V2:
 New

 common/spl/spl_nand.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index d3185dc017..5f8a111a2f 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -68,6 +68,15 @@ static int spl_nand_load_element(struct spl_image_info *spl_image,
 		load.bl_len = 1;
 		load.read = spl_nand_fit_read;
 		return spl_load_simple_fit(spl_image, &load, offset, header);
+	} else if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) {
+		struct spl_load_info load;
+
+		load.dev = NULL;
+		load.priv = NULL;
+		load.filename = NULL;
+		load.bl_len = 1;
+		load.read = spl_nand_fit_read;
+		return spl_load_imx_container(spl_image, &load, offset);
 	} else {
 		err = spl_parse_image_header(spl_image, header);
 		if (err)
-- 
2.16.4



More information about the U-Boot mailing list