MLK-22078 romapi: Fix issue for stream mode with secure boot enabled
authorYe Li <ye.li@nxp.com>
Fri, 21 Jun 2019 03:09:07 +0000 (20:09 -0700)
committerYe Li <ye.li@nxp.com>
Tue, 9 Jul 2019 07:22:40 +0000 (00:22 -0700)
commit3e50573a7007771586e737b343bdde4d98c21c23
treee93b5f970759795b3c53b5aac58839823235d272
parent192016dc33d2ab3a8e1e7c8348ce02d69416e290
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)
common/spl/spl_fit.c
common/spl/spl_imx_romapi.c
include/spl.h