]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
image: fix Android ramdisk support when dtb is specified
authorRob Herring <robh@kernel.org>
Fri, 17 Jul 2015 15:57:17 +0000 (10:57 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:24:12 +0000 (08:24 +0200)
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>
common/image.c

index c3616e2c44f1b37dd13f5f056c9a502d7d5c5f87..ca721c5401c29df4907576e3765b7c647afa0c5c 100644 (file)
@@ -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
@@ -1004,6 +1005,12 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
                        images->fit_uname_rd = fit_uname_ramdisk;
                        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
@@ -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
                 */