diff options
author | Ye Li <ye.li@nxp.com> | 2017-11-30 01:32:39 -0600 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:21:44 -0700 |
commit | a20a5ee3c0652b7e53d8335d90c92e441d01595b (patch) | |
tree | 7f37345a6b93884a9b70ee5933ba7b3171e01445 /cmd/booti.c | |
parent | e0bf55cfb730db1623920a78544ae3f7c0eef95c (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)
Diffstat (limited to 'cmd/booti.c')
-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 de5058236e0..dbcd84a272b 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -42,6 +42,16 @@ static int booti_start(cmd_tbl_t *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) { debug("Moving Image from 0x%lx to 0x%lx\n", ld, relocated_addr); |