summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-06-20 10:12:36 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 14:52:33 +0800
commit522128e70e98c3eb3fb0ebd4cc23b594dc8bb5fd (patch)
treee442cb6d3a8ce9e2ae301a3af966289c0ef4b5e8 /common/cmd_bootm.c
parente77c1d3dfb05fce2da844f355a7e0f3f2ce8a977 (diff)
downloadu-boot-imx-522128e70e98c3eb3fb0ebd4cc23b594dc8bb5fd.zip
u-boot-imx-522128e70e98c3eb3fb0ebd4cc23b594dc8bb5fd.tar.gz
u-boot-imx-522128e70e98c3eb3fb0ebd4cc23b594dc8bb5fd.tar.bz2
ENGR00319151-2 HAB: Add the HAB image authentication to bootz
Since the zImage is used at default, add the HAB image authentication support in bootz to authenticate zImage. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 591100eec569dd1d54f61e9f49fe995f56a021eb) Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 4f77f22..1825d70 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -723,6 +723,15 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
if (bootm_find_ramdisk_fdt(flag, argc, argv))
return 1;
+#ifdef CONFIG_SECURE_BOOT
+ extern uint32_t authenticate_image(
+ uint32_t ddr_start, uint32_t image_size);
+ if (authenticate_image(images->ep, zi_end - zi_start) == 0) {
+ printf("Authenticate zImage Fail, Please check\n");
+ return 1;
+ }
+#endif
+
return 0;
}