qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/5] uImage: only try to load 'kernel' images


From: Hollis Blanchard
Subject: [Qemu-devel] [PATCH 5/5] uImage: only try to load 'kernel' images
Date: Thu, 20 Nov 2008 13:34:42 -0600

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 <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]