summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2019-09-23 10:18:46 +0800
committerStefano Babic <[email protected]>2019-10-08 16:36:36 +0200
commit00e180cc513ee8ea4f2a3c17758772e710deb4df (patch)
tree30514da3c9197c4cb632294a6ebe1d7bb62ec6d5 /common
parent62f0bfc016d25d22425fc24cd34684d8030f919b (diff)
spl: nand: support loading i.MX container format file
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 <[email protected]> Cc: Tien Fong Chee <[email protected]> Cc: York Sun <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Alex Kiernan <[email protected]> Cc: Simon Glass <[email protected]> Cc: Philipp Tomsich <[email protected]> Cc: Kever Yang <[email protected]> Cc: Heiko Schocher <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_nand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index d3185dc0170..5f8a111a2f0 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)