aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-09-23 10:18:48 +0800
committerStefano Babic <sbabic@denx.de>2019-10-08 16:36:36 +0200
commit3bc4f1df033bdad3c1dbd89c1714886a0b075fac (patch)
treee77728494201a267c4b474e3c876034db67b587e /common
parentd9bd2f4a4efa15b129749978ca48675633a13668 (diff)
downloadu-boot-3bc4f1df033bdad3c1dbd89c1714886a0b075fac.zip
u-boot-3bc4f1df033bdad3c1dbd89c1714886a0b075fac.tar.gz
u-boot-3bc4f1df033bdad3c1dbd89c1714886a0b075fac.tar.bz2
spl: nor: 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 <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_nor.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 0f8afa6..7df708d 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -6,7 +6,6 @@
#include <common.h>
#include <spl.h>
-#ifdef CONFIG_SPL_LOAD_FIT
static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
ulong count, void *buf)
{
@@ -16,7 +15,6 @@ static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
return count;
}
-#endif
unsigned long __weak spl_nor_get_uboot_base(void)
{
@@ -97,6 +95,13 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,
return ret;
}
#endif
+ if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) {
+ load.bl_len = 1;
+ load.read = spl_nor_load_read;
+ return spl_load_imx_container(spl_image, &load,
+ spl_nor_get_uboot_base());
+ }
+
ret = spl_parse_image_header(spl_image,
(const struct image_header *)spl_nor_get_uboot_base());
if (ret)