Skip to contentSkip to conversation

cmd_bootm.c: Do not load a ramdisk when not booting a kernel.

PATCH New Detlev Zundel 2 participants 4 messages Dec 22, 2009 – Jan 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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.

---
 common/cmd_bootm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
common/cmd_bootm.c +2 -1
index 94ddac3..26cae97 100644
@@ -297,7 +297,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);
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 2/2 cmd_bootm.c: Change interpretation of standalone image parameters.

Current code uses the second argument to bootm for standalone images to override the load address specified in the image instead of passing all parameters as is to the application. This behaviour is not documented and not in line with how the go command works for standalone applications, so we simply drop it.

---
 common/cmd_bootm.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
common/cmd_bootm.c +0 -3
index 26cae97..4d55023 100644
@@ -889,9 +889,6 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]
 			image_multi_getimg (hdr, 0, os_data, os_len);
 			break;
 		case IH_TYPE_STANDALONE:
-			if (argc >2) {
-				hdr->ih_load = htonl(simple_strtoul(argv[2], NULL, 16));
-			}
 			*os_data = image_get_data (hdr);
 			*os_len = image_get_data_size (hdr);
 			break;
Signature · 1 line
1.6.2.5
#2 lore raw

PATCH 2/2 cmd_bootm.c: Change interpretation of standalone image parameters.

Dear Detlev Zundel,

Quoted 10 lines · In message <[email protected]> you wrote:

Current code uses the second argument to bootm for standalone images to override the load address specified in the image instead of passing all parameters as is to the application. This behaviour is not documented and not in line with how the go command works for standalone applications, so we simply drop it.

---
 common/cmd_bootm.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 9 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The project was large enough and management communication poor enough
to prompt many members of the team to see themselves  as  contestants
making  brownie  points,  rather  than as builders making programming
products. Each suboptimized  his  piece  to  meet  his  targets;  few
stopped to think about the total effect on the customer.
                              - Fred Brooks, "The Mythical Man Month"
#3 lore raw

PATCH 1/2 cmd_bootm.c: Do not load a ramdisk when not booting a kernel.

In reply to Detlev Zundel

Dear Detlev Zundel,

Quoted 7 lines · In message <[email protected]> you wrote:

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

---
 common/cmd_bootm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
PUBLIC NOTICE AS REQUIRED BY LAW:  Any Use of This  Product,  in  Any
Manner  Whatsoever,  Will  Increase  the  Amount  of  Disorder in the
Universe. Although No Liability Is Implied Herein,  the  Consumer  Is
Warned  That  This  Process Will Ultimately Lead to the Heat Death of
the Universe.