diff options
author | Tom Rini <trini@ti.com> | 2014-05-22 12:56:15 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-22 12:56:15 -0400 |
commit | c9afa7cea84c9b7346fcd2710577bcc386631aba (patch) | |
tree | 6b167eb7bd0ab10fff37259467e07feba24ba843 /common/image.c | |
parent | d7782d06534fe4fa47a49fa7c106de5ba85a9687 (diff) | |
parent | fc25fa27e5f439705e9ca42182014e2d75d9f0ae (diff) | |
download | u-boot-imx-c9afa7cea84c9b7346fcd2710577bcc386631aba.zip u-boot-imx-c9afa7cea84c9b7346fcd2710577bcc386631aba.tar.gz u-boot-imx-c9afa7cea84c9b7346fcd2710577bcc386631aba.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/common/image.c b/common/image.c index fcc5a9c..fa4864d 100644 --- a/common/image.c +++ b/common/image.c @@ -660,10 +660,12 @@ int genimg_get_format(const void *img_addr) if (image_check_magic(hdr)) format = IMAGE_FORMAT_LEGACY; #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) - else { - if (fdt_check_header(img_addr) == 0) - format = IMAGE_FORMAT_FIT; - } + else if (fdt_check_header(img_addr) == 0) + format = IMAGE_FORMAT_FIT; +#endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + else if (android_image_check_header(img_addr) == 0) + format = IMAGE_FORMAT_ANDROID; #endif return format; @@ -933,7 +935,15 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, (ulong)images->legacy_hdr_os); image_multi_getimg(images->legacy_hdr_os, 1, &rd_data, &rd_len); - } else { + } +#ifdef CONFIG_ANDROID_BOOT_IMAGE + else if ((genimg_get_format(images) == IMAGE_FORMAT_ANDROID) && + (!android_image_get_ramdisk((void *)images->os.start, + &rd_data, &rd_len))) { + /* empty */ + } +#endif + else { /* * no initrd image */ |