[U-Boot] apparent(?) flaw in recent patch "am335x_evm: Switch to zImage as default rather

Robert P. J. Day rpjday at crashcourse.ca
Sat Sep 28 12:25:40 CEST 2013


than uImage"

  (i already tossed the original post so i can't reply to it directly,
sorry.)

  this recent patch by tom rini to make zImage rather than uImage the
default kernel format for am335x_evm:

http://lists.denx.de/pipermail/u-boot/2013-September/163365.html

seems flawed as the loading will work fine, but the boot will fail as
the "bootm" command will still be used rather than "bootz". i just
tested it building for my beaglebone black and that's exactly what
happens:

...
3250520 bytes read in 552 ms (5.6 MiB/s)
24493 bytes read in 17 ms (1.4 MiB/s)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
...

so all i did as a quick hack was to add the (very specific for my test
case) changes to replace "bootm" with "bootz" for only what i needed:

@@ -105,21 +105,21 @@
 		"root=${ramroot} " \
 		"rootfstype=${ramrootfstype}\0" \
 	"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
-	"loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
 	"mmcloados=run mmcargs; " \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 			"if run loadfdt; then " \
-				"bootm ${loadaddr} - ${fdtaddr}; " \
+				"bootz ${loadaddr} - ${fdtaddr}; " \
 			"else " \
 				"if test ${boot_fdt} = try; then " \
-					"bootm; " \
+					"bootz; " \
 				"else " \
 					"echo WARN: Cannot load the DT; " \
 				"fi; " \
 			"fi; " \
 		"else " \
-			"bootm; " \
+			"bootz; " \
 		"fi;\0" \
 	"mmcboot=mmc dev ${mmcdev}; " \
 		"if mmc rescan; then " \

and the kernel boot worked fine. is this an actual flaw in the patch?
or am i doing something silly?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the U-Boot mailing list