summaryrefslogtreecommitdiff
path: root/common/image-fdt.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-07-09 11:19:13 +0800
committerMax Krummenacher <max.krummenacher@toradex.com>2016-03-09 14:42:42 +0100
commitb4aee5fb22f4a7ddb2ddb8e6c32021c10f8fee48 (patch)
tree34c5dc199290995034db51a1cab0f704e1167876 /common/image-fdt.c
parent677458b22aed4135077f0ded901d6ad3b176005b (diff)
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/image-fdt.c')
-rw-r--r--common/image-fdt.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 4dc43d6a15..3aa63a667d 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -416,7 +416,34 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
debug("## No Flattened Device Tree\n");
goto no_fdt;
}
- } else {
+ }
+#ifdef CONFIG_ANDROID_BOOT_IMAGE
+ else if (genimg_get_format((void *)images->os.start) ==
+ IMAGE_FORMAT_ANDROID) {
+ ulong fdt_data, fdt_len;
+ android_image_get_fdt((void *)images->os.start,
+ &fdt_data, &fdt_len);
+
+ if (fdt_len) {
+ fdt_blob = (char *)fdt_data;
+ printf(" Booting using the fdt at 0x%p\n", fdt_blob);
+
+ if (fdt_check_header(fdt_blob) != 0) {
+ fdt_error("image is not a fdt");
+ goto error;
+ }
+
+ if (fdt_totalsize(fdt_blob) != fdt_len) {
+ fdt_error("fdt size != image size");
+ goto error;
+ }
+ } else {
+ debug("## No Flattened Device Tree\n");
+ goto no_fdt;
+ }
+ }
+#endif
+ else {
debug("## No Flattened Device Tree\n");
goto no_fdt;
}