Commit 2dd46328fdc50284311908dfb1ca3d5ec1ddcb6e

Authored by Rob Herring
Committed by Tom Rini
1 parent 10d3ac346f

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>

Showing 1 changed file with 8 additions and 10 deletions Side-by-side Diff

... ... @@ -906,6 +906,7 @@
906 906  
907 907 if (argc >= 2)
908 908 select = argv[1];
  909 +
909 910 /*
910 911 * Look for a '-' which indicates to ignore the
911 912 * ramdisk argument
... ... @@ -1005,6 +1006,12 @@
1005 1006 images->fit_noffset_rd = rd_noffset;
1006 1007 break;
1007 1008 #endif
  1009 +#ifdef CONFIG_ANDROID_BOOT_IMAGE
  1010 + case IMAGE_FORMAT_ANDROID:
  1011 + android_image_get_ramdisk((void *)images->os.start,
  1012 + &rd_data, &rd_len);
  1013 + break;
  1014 +#endif
1008 1015 default:
1009 1016 #ifdef CONFIG_SUPPORT_RAW_INITRD
1010 1017 end = NULL;
... ... @@ -1035,16 +1042,7 @@
1035 1042 (ulong)images->legacy_hdr_os);
1036 1043  
1037 1044 image_multi_getimg(images->legacy_hdr_os, 1, &rd_data, &rd_len);
1038   - }
1039   -#ifdef CONFIG_ANDROID_BOOT_IMAGE
1040   - else if ((genimg_get_format((void *)images->os.start)
1041   - == IMAGE_FORMAT_ANDROID) &&
1042   - (!android_image_get_ramdisk((void *)images->os.start,
1043   - &rd_data, &rd_len))) {
1044   - /* empty */
1045   - }
1046   -#endif
1047   - else {
  1045 + } else {
1048 1046 /*
1049 1047 * no initrd image
1050 1048 */