From: Rob Herring <robh@kernel.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] image: fix Android ramdisk support when dtb is specified
Date: Fri, 17 Jul 2015 10:57:17 -0500 [thread overview]
Message-ID: <1437148637-2984-1-git-send-email-robh@kernel.org> (raw)
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 | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/common/image.c b/common/image.c
index f0f0135..73fc288 100644
--- a/common/image.c
+++ b/common/image.c
@@ -896,6 +896,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
@@ -995,6 +996,12 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
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
end = NULL;
@@ -1025,16 +1032,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
*/
--
2.1.0
next reply other threads:[~2015-07-17 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 15:57 Rob Herring [this message]
2015-08-13 13:18 ` [U-Boot] image: fix Android ramdisk support when dtb is specified Tom Rini
2015-08-27 18:22 ` [U-Boot] [PATCH] " Paul Kocialkowski
2015-08-27 19:43 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437148637-2984-1-git-send-email-robh@kernel.org \
--to=robh@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox