From: Hollis Blanchard <hollisb@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Hollis Blanchard <hollisb@us.ibm.com>
Subject: [Qemu-devel] [PATCH 5/5] uImage: only try to load 'kernel' images
Date: Thu, 20 Nov 2008 13:34:42 -0600 [thread overview]
Message-ID: <c8f3de8c235fc2ce412af636cd6a90cb1f892ddb.1227209336.git.hollisb@us.ibm.com> (raw)
In-Reply-To: <1227209682-28842-1-git-send-email-hollisb@us.ibm.com>
In-Reply-To: <c1153df10703669572fedd831c752d248df330cb.1227209336.git.hollisb@us.ibm.com>
Loading other image types (e.g. IH_TYPE_MULTI, IH_TYPE_FLATDT) is not
implemented.
IH_TYPE_STANDALONE images could be loaded, but would unexpectedly fail if they
tried to use any uboot services.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
loader.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/loader.c b/loader.c
index f9f37b2..cca9d3b 100644
--- a/loader.c
+++ b/loader.c
@@ -479,9 +479,9 @@ int load_uimage(const char *filename, target_ulong *ep, target_ulong *loadaddr,
if (hdr->ih_magic != IH_MAGIC)
goto out;
- /* TODO: Implement Multi-File images. */
- if (hdr->ih_type == IH_TYPE_MULTI) {
- fprintf(stderr, "Unable to load multi-file u-boot images\n");
+ /* TODO: Implement other image types. */
+ if (hdr->ih_type != IH_TYPE_KERNEL) {
+ fprintf(stderr, "Can only load u-boot image type \"kernel\"\n");
goto out;
}
@@ -498,7 +498,7 @@ int load_uimage(const char *filename, target_ulong *ep, target_ulong *loadaddr,
/* TODO: Check CPU type. */
if (is_linux) {
- if (hdr->ih_type == IH_TYPE_KERNEL && hdr->ih_os == IH_OS_LINUX)
+ if (hdr->ih_os == IH_OS_LINUX)
*is_linux = 1;
else
*is_linux = 0;
--
1.5.6.5
next prev parent reply other threads:[~2008-11-20 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 19:34 [Qemu-devel] [v2] improvements in uImage loading Hollis Blanchard
2008-11-20 19:34 ` [Qemu-devel] [PATCH 1/5] uImage: don't leak file data or file descriptor Hollis Blanchard
2008-11-20 19:34 ` [Qemu-devel] [PATCH 2/5] uImage: implement gzip support Hollis Blanchard
2008-11-20 19:34 ` [Qemu-devel] [PATCH 3/5] uImage: return base load address Hollis Blanchard
2008-11-20 22:05 ` Anthony Liguori
2008-11-20 22:13 ` Hollis Blanchard
2008-11-20 19:34 ` [Qemu-devel] [PATCH 4/5] uImage: rename load_uboot() to load_uimage() Hollis Blanchard
2008-11-20 19:34 ` Hollis Blanchard [this message]
2008-11-20 20:27 ` [Qemu-devel] [v2] improvements in uImage loading Jean-Christophe PLAGNIOL-VILLARD
2008-11-20 22:15 ` Anthony Liguori
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=c8f3de8c235fc2ce412af636cd6a90cb1f892ddb.1227209336.git.hollisb@us.ibm.com \
--to=hollisb@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).