diff options
author | Ye Li <ye.li@nxp.com> | 2017-11-30 01:32:39 -0600 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-04-06 14:31:10 +0800 |
commit | 15ccbe603705450d53928badf33abec56d093c40 (patch) | |
tree | 4192ede8702f3ee73ec45ae3b32ea9ad3fc35b10 /cmd | |
parent | 3b09ef6ef88baad21e10799dd5a02f206b3c7258 (diff) |
MLK-17044-3 booti: Add kernel image authentication for secure boot
When secure boot is enabled, add authenticate_image in booti to authenticate
kernel image.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f29a143cdb8c74566113737e9be7e1bcd8c625f4)
(cherry picked from commit 1e33f493a55dad7e016f948b932000ec295c6df4)
(cherry picked from commit 677c332120eff7161532288685c58f246d1f00ff)
(cherry picked from commit 2cd26c924355e6bcf88899d559235bab121837ab)
(cherry picked from commit bf4c51707fdf1b2760f84f051e88c3c3a326ac88)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/booti.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/booti.c b/cmd/booti.c index 397d4b8323..3839de9554 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -78,6 +78,16 @@ static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc, if (ret != 0) return 1; +#ifdef CONFIG_IMX_HAB + extern int authenticate_image( + uint32_t ddr_start, uint32_t raw_image_size); + if (authenticate_image(ld, image_size) != 0) { + printf("Authenticate Image Fail, Please check\n"); + return 1; + } + +#endif + /* Handle BOOTM_STATE_LOADOS */ if (relocated_addr != ld) { printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", ld, |