diff options
author | Rob Herring <robh@kernel.org> | 2015-07-17 10:57:17 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:32 -0400 |
commit | 2dd46328fdc50284311908dfb1ca3d5ec1ddcb6e (patch) | |
tree | 561a51d90e8f02501e9bd2cf5f6b5ae67afc5d37 /common/image.c | |
parent | 10d3ac346f54ab9526cd352239a5906ee2b92fee (diff) |
image: fix Android ramdisk support when dtb is specified
If a dtb is specified on the command-line, the Android boot image ramdisk
will not be found. Fix this so that we can specify the ramdisk address and
dtb address. The syntax is to enter the Android boot image address for
both the kernel and ramdisk.
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/common/image.c b/common/image.c index c3616e2c44f..ca721c5401c 100644 --- a/common/image.c +++ b/common/image.c @@ -906,6 +906,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, if (argc >= 2) select = argv[1]; + /* * Look for a '-' which indicates to ignore the * ramdisk argument @@ -1005,6 +1006,12 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, images->fit_noffset_rd = rd_noffset; break; #endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + case IMAGE_FORMAT_ANDROID: + android_image_get_ramdisk((void *)images->os.start, + &rd_data, &rd_len); + break; +#endif default: #ifdef CONFIG_SUPPORT_RAW_INITRD end = NULL; @@ -1035,16 +1042,7 @@ 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); - } -#ifdef CONFIG_ANDROID_BOOT_IMAGE - else if ((genimg_get_format((void *)images->os.start) - == IMAGE_FORMAT_ANDROID) && - (!android_image_get_ramdisk((void *)images->os.start, - &rd_data, &rd_len))) { - /* empty */ - } -#endif - else { + } else { /* * no initrd image */ |