public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
@ 2012-05-10 13:27 Fabio Estevam
  2012-05-10 13:27 ` [U-Boot] [PATCH 2/2] MX28: Fix a typo in mx28_reg_8 macro Fabio Estevam
  2012-05-10 17:23 ` [U-Boot] [PATCH 1/2] mx28evk: extend default environment Marek Vasut
  0 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2012-05-10 13:27 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

The environment has been based on mx53loco but keeping the possibility
to easy change the default console device as Freescale and mainline
kernels differ on the device name.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 include/configs/mx28evk.h |   44 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 6 deletions(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 02f3366..b165285 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -222,7 +222,7 @@
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_BOOTDELAY	3
 #define CONFIG_BOOTFILE	"uImage"
-#define CONFIG_BOOTCOMMAND	"run bootcmd_net"
+
 #define CONFIG_LOADADDR	0x42000000
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
 
@@ -230,13 +230,45 @@
  * Extra Environments
  */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"console_fsl=console=ttyAM0" \
-	"console_mainline=console=ttyAMA0" \
-	"netargs=setenv bootargs console=${console_mainline}" \
+	"script=boot.scr\0" \
+	"uimage=uImage\0" \
+	"console_fsl=ttyAM0\0" \
+	"console_mainline=ttyAMA0\0" \
+	"console=${console_mainline}\0" \
+	"mmcdev=0\0" \
+	"mmcpart=2\0" \
+	"mmcroot=/dev/mmcblk0p3 rw\0" \
+	"mmcrootfstype=ext3 rootwait\0" \
+	"mmcargs=setenv bootargs console=${console},${baudrate} " \
+		"root=${mmcroot} " \
+		"rootfstype=${mmcrootfstype}\0" \
+	"loadbootscript=" \
+		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+	"bootscript=echo Running bootscript from mmc ...; " \
+		"source\0" \
+	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+	"mmcboot=echo Booting from mmc ...; " \
+		"run mmcargs; " \
+		"bootm\0" \
+	"netargs=setenv bootargs console=${console},${baudrate} " \
 		"root=/dev/nfs " \
-		"ip=dhcp nfsroot=${serverip}:${nfsroot}\0" \
-	"bootcmd_net=echo Booting from net ...; " \
+		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
+	"netboot=echo Booting from net ...; " \
 		"run netargs; " \
 		"dhcp ${uimage}; bootm\0" \
+/*
+ * Default Boot command
+ */
+#define CONFIG_BOOTCOMMAND \
+	"if mmc rescan ${mmcdev}; then " \
+		"if run loadbootscript; then " \
+			"run bootscript; " \
+		"else " \
+			"if run loaduimage; then " \
+				"run mmcboot; " \
+			"else run netboot; " \
+			"fi; " \
+		"fi; " \
+	"else run netboot; fi"
 
 #endif /* __CONFIG_H */
-- 
1.7.10

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

* [U-Boot] [PATCH 2/2] MX28: Fix a typo in mx28_reg_8 macro
  2012-05-10 13:27 [U-Boot] [PATCH 1/2] mx28evk: extend default environment Fabio Estevam
@ 2012-05-10 13:27 ` Fabio Estevam
  2012-05-10 17:23 ` [U-Boot] [PATCH 1/2] mx28evk: extend default environment Marek Vasut
  1 sibling, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2012-05-10 13:27 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

The macro mistakenly referred to 32bit struct instead of 8bit one.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
---
 arch/arm/include/asm/arch-mx28/regs-common.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-mx28/regs-common.h b/arch/arm/include/asm/arch-mx28/regs-common.h
index 94b512d..d2e1953 100644
--- a/arch/arm/include/asm/arch-mx28/regs-common.h
+++ b/arch/arm/include/asm/arch-mx28/regs-common.h
@@ -70,7 +70,7 @@ struct mx28_register_32 {
 #define	mx28_reg_8(name)				\
 	union {						\
 		struct { __mx28_reg_8(name) };		\
-		struct mx28_register_32 name##_reg;	\
+		struct mx28_register_8 name##_reg;	\
 	};
 
 #define	mx28_reg_32(name)				\
-- 
1.7.10

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-10 13:27 [U-Boot] [PATCH 1/2] mx28evk: extend default environment Fabio Estevam
  2012-05-10 13:27 ` [U-Boot] [PATCH 2/2] MX28: Fix a typo in mx28_reg_8 macro Fabio Estevam
@ 2012-05-10 17:23 ` Marek Vasut
  2012-05-11 13:54   ` Otavio Salvador
  1 sibling, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-05-10 17:23 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> From: Otavio Salvador <otavio@ossystems.com.br>
> 
> The environment has been based on mx53loco but keeping the possibility
> to easy change the default console device as Freescale and mainline
> kernels differ on the device name.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>

Can we possibly unify it with what's already in m28evk? Also, it'd be cool if we 
had some default -- very generic -- env. Can we go in that direction?

> ---
>  include/configs/mx28evk.h |   44
> ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38
> insertions(+), 6 deletions(-)
> 
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index 02f3366..b165285 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -222,7 +222,7 @@
>  #define CONFIG_SETUP_MEMORY_TAGS
>  #define CONFIG_BOOTDELAY	3
>  #define CONFIG_BOOTFILE	"uImage"
> -#define CONFIG_BOOTCOMMAND	"run bootcmd_net"
> +
>  #define CONFIG_LOADADDR	0x42000000
>  #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
> 
> @@ -230,13 +230,45 @@
>   * Extra Environments
>   */
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> -	"console_fsl=console=ttyAM0" \
> -	"console_mainline=console=ttyAMA0" \
> -	"netargs=setenv bootargs console=${console_mainline}" \
> +	"script=boot.scr\0" \
> +	"uimage=uImage\0" \
> +	"console_fsl=ttyAM0\0" \
> +	"console_mainline=ttyAMA0\0" \
> +	"console=${console_mainline}\0" \
> +	"mmcdev=0\0" \
> +	"mmcpart=2\0" \
> +	"mmcroot=/dev/mmcblk0p3 rw\0" \
> +	"mmcrootfstype=ext3 rootwait\0" \
> +	"mmcargs=setenv bootargs console=${console},${baudrate} " \
> +		"root=${mmcroot} " \
> +		"rootfstype=${mmcrootfstype}\0" \
> +	"loadbootscript=" \
> +		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
> +	"bootscript=echo Running bootscript from mmc ...; " \
> +		"source\0" \
> +	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
> +	"mmcboot=echo Booting from mmc ...; " \
> +		"run mmcargs; " \
> +		"bootm\0" \
> +	"netargs=setenv bootargs console=${console},${baudrate} " \
>  		"root=/dev/nfs " \
> -		"ip=dhcp nfsroot=${serverip}:${nfsroot}\0" \
> -	"bootcmd_net=echo Booting from net ...; " \
> +		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
> +	"netboot=echo Booting from net ...; " \
>  		"run netargs; " \
>  		"dhcp ${uimage}; bootm\0" \
> +/*
> + * Default Boot command
> + */
> +#define CONFIG_BOOTCOMMAND \
> +	"if mmc rescan ${mmcdev}; then " \
> +		"if run loadbootscript; then " \
> +			"run bootscript; " \
> +		"else " \
> +			"if run loaduimage; then " \
> +				"run mmcboot; " \
> +			"else run netboot; " \
> +			"fi; " \
> +		"fi; " \
> +	"else run netboot; fi"
> 
>  #endif /* __CONFIG_H */

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-10 17:23 ` [U-Boot] [PATCH 1/2] mx28evk: extend default environment Marek Vasut
@ 2012-05-11 13:54   ` Otavio Salvador
  2012-05-11 14:10     ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2012-05-11 13:54 UTC (permalink / raw)
  To: u-boot

On Thu, May 10, 2012 at 2:23 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Fabio Estevam,
>
>> From: Otavio Salvador <otavio@ossystems.com.br>
>>
>> The environment has been based on mx53loco but keeping the possibility
>> to easy change the default console device as Freescale and mainline
>> kernels differ on the device name.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>
> Can we possibly unify it with what's already in m28evk? Also, it'd be cool if we
> had some default -- very generic -- env. Can we go in that direction?

I have prepared a set of commits in this direction. Please take a look at:

https://github.com/otavio/u-boot/commit/5745dfbfa1bd69b23c73dc3d2b2c2932c338e750
https://github.com/otavio/u-boot/commit/d8b1ea575177038f6e37f28563f00c9260016ac9

Is that what you expect? I want to put sdcard based update commands
before sending it for merging.


-- 
Otavio Salvador? ? ? ? ? ? ? ? ? ? ? ? ? ? ?O.S. Systems
E-mail: otavio at ossystems.com.br? http://www.ossystems.com.br
Mobile: +55 53 9981-7854? ? ? ?? ? ? ?http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-11 13:54   ` Otavio Salvador
@ 2012-05-11 14:10     ` Otavio Salvador
  2012-05-11 14:15       ` Marek Vasut
  2012-05-11 14:25       ` Stefano Babic
  0 siblings, 2 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-05-11 14:10 UTC (permalink / raw)
  To: u-boot

On Fri, May 11, 2012 at 10:54 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
>> Can we possibly unify it with what's already in m28evk? Also, it'd be cool if we
>> had some default -- very generic -- env. Can we go in that direction?
>
> I have prepared a set of commits in this direction. Please take a look at:
>
> https://github.com/otavio/u-boot/commit/5745dfbfa1bd69b23c73dc3d2b2c2932c338e750
> https://github.com/otavio/u-boot/commit/d8b1ea575177038f6e37f28563f00c9260016ac9
>
> Is that what you expect? I want to put sdcard based update commands
> before sending it for merging.

Fabio has pointed a example for me of 'magnesium' board config. Is it
what you expect? it does make sense for me to make a common header
file for both boards and others that might come later.

-- 
Otavio Salvador? ? ? ? ? ? ? ? ? ? ? ? ? ? ?O.S. Systems
E-mail: otavio at ossystems.com.br? http://www.ossystems.com.br
Mobile: +55 53 9981-7854? ? ? ?? ? ? ?http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-11 14:10     ` Otavio Salvador
@ 2012-05-11 14:15       ` Marek Vasut
  2012-05-11 14:25       ` Stefano Babic
  1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-05-11 14:15 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Fri, May 11, 2012 at 10:54 AM, Otavio Salvador
> 
> <otavio@ossystems.com.br> wrote:
> >> Can we possibly unify it with what's already in m28evk? Also, it'd be
> >> cool if we had some default -- very generic -- env. Can we go in that
> >> direction?
> > 
> > I have prepared a set of commits in this direction. Please take a look
> > at:
> > 
> > https://github.com/otavio/u-boot/commit/5745dfbfa1bd69b23c73dc3d2b2c2932c
> > 338e750
> > https://github.com/otavio/u-boot/commit/d8b1ea575177038f6e37f28563f00c92
> > 60016ac9
> > 
> > Is that what you expect? I want to put sdcard based update commands
> > before sending it for merging.
> 
> Fabio has pointed a example for me of 'magnesium' board config. Is it
> what you expect? it does make sense for me to make a common header
> file for both boards and others that might come later.

Something like that, but you're missing update_sd_firmware ;-)

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-11 14:10     ` Otavio Salvador
  2012-05-11 14:15       ` Marek Vasut
@ 2012-05-11 14:25       ` Stefano Babic
  2012-05-11 14:31         ` Otavio Salvador
  1 sibling, 1 reply; 8+ messages in thread
From: Stefano Babic @ 2012-05-11 14:25 UTC (permalink / raw)
  To: u-boot

On 11/05/2012 16:10, Otavio Salvador wrote:
> On Fri, May 11, 2012 at 10:54 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>>> Can we possibly unify it with what's already in m28evk? Also, it'd be cool if we
>>> had some default -- very generic -- env. Can we go in that direction?
>>
>> I have prepared a set of commits in this direction. Please take a look at:
>>
>> https://github.com/otavio/u-boot/commit/5745dfbfa1bd69b23c73dc3d2b2c2932c338e750
>> https://github.com/otavio/u-boot/commit/d8b1ea575177038f6e37f28563f00c9260016ac9
>>
>> Is that what you expect? I want to put sdcard based update commands
>> before sending it for merging.
> 

Hi Otavio,

> Fabio has pointed a example for me of 'magnesium' board config. Is it
> what you expect? it does make sense for me to make a common header
> file for both boards and others that might come later.

This is an example, but the imx27lite and the magnesium are very close.
Of course, you could prepare some kind of mx28-common, that all boards
can include.

Another example is amcc-common.h  for PowerPC 4xx. Up now we have not a
real "common" environment, that spreads among boards. Each board defines
its own set - it is not bad to define some common scripts, that a board
maintainer can use.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* [U-Boot] [PATCH 1/2] mx28evk: extend default environment
  2012-05-11 14:25       ` Stefano Babic
@ 2012-05-11 14:31         ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-05-11 14:31 UTC (permalink / raw)
  To: u-boot

On Fri, May 11, 2012 at 11:25 AM, Stefano Babic <sbabic@denx.de> wrote:
> Another example is amcc-common.h ?for PowerPC 4xx. Up now we have not a
> real "common" environment, that spreads among boards. Each board defines
> its own set - it is not bad to define some common scripts, that a board
> maintainer can use.

Right; I will work on that.

-- 
Otavio Salvador? ? ? ? ? ? ? ? ? ? ? ? ? ? ?O.S. Systems
E-mail: otavio at ossystems.com.br? http://www.ossystems.com.br
Mobile: +55 53 9981-7854? ? ? ?? ? ? ?http://projetos.ossystems.com.br

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

end of thread, other threads:[~2012-05-11 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 13:27 [U-Boot] [PATCH 1/2] mx28evk: extend default environment Fabio Estevam
2012-05-10 13:27 ` [U-Boot] [PATCH 2/2] MX28: Fix a typo in mx28_reg_8 macro Fabio Estevam
2012-05-10 17:23 ` [U-Boot] [PATCH 1/2] mx28evk: extend default environment Marek Vasut
2012-05-11 13:54   ` Otavio Salvador
2012-05-11 14:10     ` Otavio Salvador
2012-05-11 14:15       ` Marek Vasut
2012-05-11 14:25       ` Stefano Babic
2012-05-11 14:31         ` Otavio Salvador

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox