From 8b828a8f44b7ee9953c7ba63e64b1e80790139b3 Mon Sep 17 00:00:00 2001
From: Detlev Zundel <dzu@denx.de>
Date: Tue, 22 Dec 2009 12:43:01 +0100
Subject: [PATCH] cmd_bootm.c: Do not load a ramdisk when not booting a kernel.

In case we boot an image marked as 'standalone' and 'linux', the current
code erroneously tried to load a ramdisk.

Signed-off-by: Detlev Zundel <dzu@denx.de>
---
 common/cmd_bootm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 0ef3e5ebc63..dc993d54087 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -293,7 +293,8 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return 1;
 	}
 
-	if (images.os.os == IH_OS_LINUX) {
+	if ((images.os.type == IH_TYPE_KERNEL) &&
+	    (images.os.os == IH_OS_LINUX)) {
 		/* find ramdisk */
 		ret = boot_get_ramdisk (argc, argv, &images, IH_INITRD_ARCH,
 				&images.rd_start, &images.rd_end);
-- 
GitLab