summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorNitin Garg <nitin.garg@freescale.com>2014-05-27 08:37:44 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-05-27 08:37:44 -0500
commit0802947cfb94789cdb6b8a402a7c4523549c2a12 (patch)
treef7db7449e67346b334cc87573134dafe9d40b00b /common/cmd_bootm.c
parentb3b8da14c9469551991b09e24520eeed8240bafe (diff)
downloadu-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.zip
u-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.tar.gz
u-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.tar.bz2
ENGR00315499-3: Support i.MX6 HAB authentication of kernel image
Support HAB authentication of kernel or secondary images via bootm or hab_auth_img u-boot command. Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 9751edc..6cd9242 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -813,6 +813,16 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return do_bootm_subcommand(cmdtp, flag, argc, argv);
}
+#ifdef CONFIG_SECURE_BOOT
+ extern uint32_t authenticate_image(
+ uint32_t ddr_start, uint32_t image_size);
+ if (authenticate_image(load_addr,
+ image_get_image_size((image_header_t *)load_addr)) == 0) {
+ printf("Authenticate uImage Fail, Please check\n");
+ return 1;
+ }
+#endif
+
return do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_START |
BOOTM_STATE_FINDOS | BOOTM_STATE_FINDOTHER |
BOOTM_STATE_LOADOS |