summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-06-20 20:09:07 -0700
committerYe Li <ye.li@nxp.com>2020-04-26 23:26:42 -0700
commit6868fbccaaaafc0a13e833ae4da60a77e7635a23 (patch)
treef2c62fe960e67bbe7b0947065bac111c784cd5fb /common
parent1fb266508ddf3c66f959cb9c90d0253e210e4a85 (diff)
MLK-22078 romapi: Fix issue for stream mode with secure boot enabled
When download image through ROM API for stream mode (USB, eMMC fastboot). We uses tricky way to get the total image size: The spl_load_simple_fit is called but the data reading is invalid, so the image data is not really downloaded. We should not call HAB authenticate in this tricky way. Otherwise it will alway fail. This patch add a new flag SPL_FIT_BYPASS_POST_LOAD to skip the authentication only for this tricky using. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 47b0cf6de06ff9b3e2b2755d5c8203210378b26a) (cherry picked from commit 3e50573a7007771586e737b343bdde4d98c21c23)
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_fit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 1bf9760667..5955e9fc85 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -709,7 +709,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
spl_image->flags |= SPL_FIT_FOUND;
#ifdef CONFIG_IMX_HAB
- board_spl_fit_post_load((ulong)fit, size);
+ if (!(spl_image->flags & SPL_FIT_BYPASS_POST_LOAD))
+ board_spl_fit_post_load((ulong)fit, size);
#endif
return 0;