summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-07-09 11:19:13 +0800
committerYe.Li <B37916@freescale.com>2015-07-13 14:44:02 +0800
commitae7ffee7fe9f9b2e217d051971a98e1f28290cb1 (patch)
tree606c01ebff4e867637f20b1040a553ebd977fc01 /common/cmd_bootm.c
parent93e01750558e1ba2a1dfdb0cca24ed38326db091 (diff)
downloadu-boot-imx-ae7ffee7fe9f9b2e217d051971a98e1f28290cb1.zip
u-boot-imx-ae7ffee7fe9f9b2e217d051971a98e1f28290cb1.tar.gz
u-boot-imx-ae7ffee7fe9f9b2e217d051971a98e1f28290cb1.tar.bz2
MLK-11228-1 android: Integrate community fastboot with FSL i.MX fastboot
1. Replace the UDC driver with community's USB gadget d_dnl driver. 2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and EFI partitions are not support by i.MX. 3. Add FDT support to community's android image. 4. Change the booti command to boota, due to the booti has been used for ARM64 image boot. 5. Modify boota implementation to load ramdisk and fdt to their loading addresses specified in boot.img header, while bootm won't do it for android image. 6. Modify the android image HAB implementation. Authenticate the boot.img on the "load_addr" for both SD and NAND. 7. Enable new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot with relevant header file "fsl_fastboot.h". While disabling the configuration, the community fastboot is used. 8. Use community's way to combine cmdline in boot.img and u-boot environment, not overwrite the cmdline in boot.img Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index c4e8d58..b64eddc 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -130,9 +130,24 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const 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");
+
+ switch (genimg_get_format(load_addr)) {
+#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+ case IMAGE_FORMAT_LEGACY:
+ if (authenticate_image(load_addr,
+ image_get_image_size((image_header_t *)load_addr)) == 0) {
+ printf("Authenticate uImage Fail, Please check\n");
+ return 1;
+ }
+ break;
+#endif
+#ifdef CONFIG_ANDROID_BOOT_IMAGE
+ case IMAGE_FORMAT_ANDROID:
+ /* Do this authentication in boota command */
+ break;
+#endif
+ default:
+ printf("Not valid image format for Authentication, Please check\n");
return 1;
}
#endif
@@ -651,7 +666,6 @@ U_BOOT_CMD(
);
#endif /* CONFIG_CMD_BOOTZ */
-#if 0
#ifdef CONFIG_CMD_BOOTI
/* See Documentation/arm64/booting.txt in the Linux kernel */
struct Image_header {
@@ -800,4 +814,3 @@ U_BOOT_CMD(
"boot arm64 Linux Image image from memory", booti_help_text
);
#endif /* CONFIG_CMD_BOOTI */
-#endif