diff options
author | Tom Rini <trini@konsulko.com> | 2015-08-27 15:42:41 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-11 17:12:12 -0400 |
commit | 1fec3c5d832d6e0cac10135179016b0640f1a863 (patch) | |
tree | 4a7ada805b5e64ce8f5dd247b96e7c00794eb733 /common | |
parent | 354973076af744882f10311faa6dc0c1ca09d16b (diff) | |
download | u-boot-imx-1fec3c5d832d6e0cac10135179016b0640f1a863.zip u-boot-imx-1fec3c5d832d6e0cac10135179016b0640f1a863.tar.gz u-boot-imx-1fec3c5d832d6e0cac10135179016b0640f1a863.tar.bz2 |
common/image.c: Make boot_get_ramdisk() perform a check for Android images
In 2dd4632 the check for where a ramdisk is found on an Android image
was got moved into the "normal" loop here, causing people to have to
pass the kernel address in the ramdisk address location in order to have
Android boot still. This changed previous behavior so perform a check
early in the function to see if we have an Android image and if so use
that as where to look for the ramdisk (which is what the rest of the
code here expects). We allow for this to still be overridden with an
explicit ramdisk address to be passed as normal.
Cc: Rob Herring <robh@kernel.org>
Reported-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/image.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c index c33749d..e607109 100644 --- a/common/image.c +++ b/common/image.c @@ -908,6 +908,15 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, *rd_start = 0; *rd_end = 0; +#ifdef CONFIG_ANDROID_BOOT_IMAGE + /* + * Look for an Android boot image. + */ + buf = map_sysmem(images->os.start, 0); + if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) + select = argv[0]; +#endif + if (argc >= 2) select = argv[1]; |