diff options
author | Ye.Li <B37916@freescale.com> | 2015-07-09 11:19:13 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2015-07-13 14:44:02 +0800 |
commit | ae7ffee7fe9f9b2e217d051971a98e1f28290cb1 (patch) | |
tree | 606c01ebff4e867637f20b1040a553ebd977fc01 /common/image-fdt.c | |
parent | 93e01750558e1ba2a1dfdb0cca24ed38326db091 (diff) | |
download | u-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/image-fdt.c')
-rw-r--r-- | common/image-fdt.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c index d9e4728..a52f7a8 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; } |