]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/image.c
karo: tx6: further cleanups
[karo-tx-uboot.git] / common / image.c
index c3616e2c44f1b37dd13f5f056c9a502d7d5c5f87..678588d2e330f3b151a89e1cdb0cb338fffe4c20 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
                 */
@@ -1217,10 +1215,10 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
                conf_noffset = fit_conf_get_node(buf, images->fit_uname_cfg);
 
                for (loadables_index = 0;
-                    !fdt_get_string_index(buf, conf_noffset,
+                    fdt_get_string_index(buf, conf_noffset,
                                FIT_LOADABLE_PROP,
                                loadables_index,
-                               (const char **)&uname) > 0;
+                               (const char **)&uname) == 0;
                     loadables_index++)
                {
                        fit_img_result = fit_image_load(images,