All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] wandboard: Set default environment to use zImage
@ 2013-12-31 20:44 Otavio Salvador
  2013-12-31 20:53 ` Fabio Estevam
  2014-01-01  1:23 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Otavio Salvador @ 2013-12-31 20:44 UTC (permalink / raw
  To: u-boot

From: John Weber <rjohnweber@gmail.com>

Change the default environment to use zImage instead of uImage,
because using zImage does not require a LOADADDR assignment when
building the kernel to be consistent with the loadaddr environment
variable in u-boot, decreasing the chance for error.  This requires
changes to the default environment to load a file named zImage
instead of uImage, and to use the 'bootz' command instead of 'bootm'
when booting the kernel.

The zImage works for FSL Linux's kernel fork versions 3.0.35, 3.10.9,
and 3.10.17; this also works fine for mainline kernels.  There is no
reason to continue using uImage for default environment.

Signed-off-by: John Weber <rjohnweber@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 include/configs/wandboard.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 5134b2e..3424124 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -115,7 +115,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"script=boot.scr\0" \
-	"uimage=uImage\0" \
+	"image=zImage\0" \
 	"console=ttymxc0\0" \
 	"splashpos=m,m\0" \
 	"fdt_high=0xffffffff\0" \
@@ -173,22 +173,22 @@
 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source\0" \
-	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
 	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 			"if run loadfdt; then " \
-				"bootm ${loadaddr} - ${fdt_addr}; " \
+				"bootz ${loadaddr} - ${fdt_addr}; " \
 			"else " \
 				"if test ${boot_fdt} = try; then " \
-					"bootm; " \
+					"bootz; " \
 				"else " \
 					"echo WARN: Cannot load the DT; " \
 				"fi; " \
 			"fi; " \
 		"else " \
-			"bootm; " \
+			"bootz; " \
 		"fi;\0" \
 	"netargs=setenv bootargs console=${console},${baudrate} " \
 		"root=/dev/nfs " \
@@ -200,19 +200,19 @@
 		"else " \
 			"setenv get_cmd tftp; " \
 		"fi; " \
-		"${get_cmd} ${uimage}; " \
+		"${get_cmd} ${image}; " \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
-				"bootm ${loadaddr} - ${fdt_addr}; " \
+				"bootz ${loadaddr} - ${fdt_addr}; " \
 			"else " \
 				"if test ${boot_fdt} = try; then " \
-					"bootm; " \
+					"bootz; " \
 				"else " \
 					"echo WARN: Cannot load the DT; " \
 				"fi; " \
 			"fi; " \
 		"else " \
-			"bootm; " \
+			"bootz; " \
 		"fi;\0"
 
 #define CONFIG_BOOTCOMMAND \
@@ -220,7 +220,7 @@
 		   "if run loadbootscript; then " \
 			   "run bootscript; " \
 		   "else " \
-			   "if run loaduimage; then " \
+			   "if run loadimage; then " \
 				   "run mmcboot; " \
 			   "else run netboot; " \
 			   "fi; " \
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] wandboard: Set default environment to use zImage
  2013-12-31 20:44 [U-Boot] [PATCH] wandboard: Set default environment to use zImage Otavio Salvador
@ 2013-12-31 20:53 ` Fabio Estevam
  2014-01-01  1:23 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-12-31 20:53 UTC (permalink / raw
  To: u-boot

On Tue, Dec 31, 2013 at 6:44 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> From: John Weber <rjohnweber@gmail.com>
>
> Change the default environment to use zImage instead of uImage,
> because using zImage does not require a LOADADDR assignment when
> building the kernel to be consistent with the loadaddr environment
> variable in u-boot, decreasing the chance for error.  This requires
> changes to the default environment to load a file named zImage
> instead of uImage, and to use the 'bootz' command instead of 'bootm'
> when booting the kernel.
>
> The zImage works for FSL Linux's kernel fork versions 3.0.35, 3.10.9,
> and 3.10.17; this also works fine for mainline kernels.  There is no
> reason to continue using uImage for default environment.
>
> Signed-off-by: John Weber <rjohnweber@gmail.com>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] wandboard: Set default environment to use zImage
  2013-12-31 20:44 [U-Boot] [PATCH] wandboard: Set default environment to use zImage Otavio Salvador
  2013-12-31 20:53 ` Fabio Estevam
@ 2014-01-01  1:23 ` Wolfgang Denk
  2014-01-01  5:46   ` Otavio Salvador
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-01-01  1:23 UTC (permalink / raw
  To: u-boot

Dear Otavio Salvador,

happy new year...

In message <1388522649-5316-1-git-send-email-otavio@ossystems.com.br> you wrote:
> 
> Change the default environment to use zImage instead of uImage,
> because using zImage does not require a LOADADDR assignment when
> building the kernel to be consistent with the loadaddr environment
> variable in u-boot, decreasing the chance for error.  This requires

This statement makes no sense.  If you use the old legacy uImage
format (which is deprecated, and should be replaced by FIT images),
you specify the entry point address to the kernel, and the load
address (i. e. where in RAM the image should be placed).  These two
parameters to themkimage commansd are registered in the image, and
they are in no way related to any U-Boot environment variables, nor
can any environment variable settings influence these.

Of course you should make sure that memory area where you dowenload
the image does not overlap the area where it gets unpacked / copied
to, but the same issues exist with zImage files.


Please fix the commit message to describe correctly what you want to
acchieve.

Best regards,

Wolfgang Denk

-- 
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 net result is a system that is not only binary  compatible  with
4.3  BSD, but is even bug for bug compatible in almost all features."
- Avadit  Tevanian,  Jr.,  "Architecture-Independent  Virtual  Memory
Management  for  Parallel  and  Distributed  Environments:  The  Mach
Approach"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] wandboard: Set default environment to use zImage
  2014-01-01  1:23 ` Wolfgang Denk
@ 2014-01-01  5:46   ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2014-01-01  5:46 UTC (permalink / raw
  To: u-boot

On Tue, Dec 31, 2013 at 11:23 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Otavio Salvador,
>
> happy new year...

You too! :-)

> In message <1388522649-5316-1-git-send-email-otavio@ossystems.com.br> you wrote:
>>
>> Change the default environment to use zImage instead of uImage,
>> because using zImage does not require a LOADADDR assignment when
>> building the kernel to be consistent with the loadaddr environment
>> variable in u-boot, decreasing the chance for error.  This requires
>
> This statement makes no sense.  If you use the old legacy uImage
> format (which is deprecated, and should be replaced by FIT images),
> you specify the entry point address to the kernel, and the load
> address (i. e. where in RAM the image should be placed).  These two
> parameters to themkimage commansd are registered in the image, and
> they are in no way related to any U-Boot environment variables, nor
> can any environment variable settings influence these.
>
> Of course you should make sure that memory area where you dowenload
> the image does not overlap the area where it gets unpacked / copied
> to, but the same issues exist with zImage files.
>
>
> Please fix the commit message to describe correctly what you want to
> acchieve.

Sent v2 fixing this; this is were more related to OE than U-Boot ;-)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-01  5:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-31 20:44 [U-Boot] [PATCH] wandboard: Set default environment to use zImage Otavio Salvador
2013-12-31 20:53 ` Fabio Estevam
2014-01-01  1:23 ` Wolfgang Denk
2014-01-01  5:46   ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.