]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/image.c
mmc: omap_hsmmc: enable 8bit interface for eMMC for AM43xx
[karo-tx-uboot.git] / common / image.c
index 9efacf8b89ecb36b0f2c43dd5cd5fa373b648ebe..ca721c5401c29df4907576e3765b7c647afa0c5c 100644 (file)
@@ -54,6 +54,10 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
 #include <u-boot/md5.h>
 #include <time.h>
 #include <image.h>
+
+#ifndef __maybe_unused
+# define __maybe_unused                /* unimplemented */
+#endif
 #endif /* !USE_HOSTCC*/
 
 #include <u-boot/crc.h>
@@ -274,7 +278,7 @@ void image_multi_getimg(const image_header_t *hdr, ulong idx,
 
 static void image_print_type(const image_header_t *hdr)
 {
-       const char *os, *arch, *type, *comp;
+       const char __maybe_unused *os, *arch, *type, *comp;
 
        os = genimg_get_os_name(image_get_os(hdr));
        arch = genimg_get_arch_name(image_get_arch(hdr));
@@ -299,7 +303,7 @@ static void image_print_type(const image_header_t *hdr)
 void image_print_contents(const void *ptr)
 {
        const image_header_t *hdr = (const image_header_t *)ptr;
-       const char *p;
+       const char __maybe_unused *p;
 
        p = IMAGE_INDENT_STRING;
        printf("%sImage Name:   %.*s\n", p, IH_NMLEN, image_get_name(hdr));
@@ -902,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
@@ -1000,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
@@ -1031,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
                 */