Skip to contentSkip to conversation

mx28evk, m28evk: sync extra environment content

PATCH Superseded Otavio Salvador 2 participants 4 messages May 11, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mx28evk, m28evk: sync extra environment content

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 and inclusing m28evk update commands.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
 include/configs/m28evk.h      |   57 +-----------------
 include/configs/mx28-common.h |  129 +++++++++++++++++++++++++++++++++++++++++
 include/configs/mx28evk.h     |   26 +--------
 3 files changed, 133 insertions(+), 79 deletions(-)
 create mode 100644 include/configs/mx28-common.h
include/configs/m28evk.h +2 -55
index ebf7e39..ed8166a 100644
@@ -271,60 +271,7 @@
 #endif
 #endif
 
-/*
- * Boot Linux
- */
-#define	CONFIG_CMDLINE_TAG
-#define	CONFIG_SETUP_MEMORY_TAGS
-#define	CONFIG_BOOTDELAY	3
-#define	CONFIG_BOOTFILE		"uImage"
-#define	CONFIG_BOOTARGS		"console=ttyAM0,115200n8 "
-#define	CONFIG_BOOTCOMMAND	"run bootcmd_net"
-#define	CONFIG_LOADADDR		0x42000000
-#define	CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
-#define	CONFIG_OF_LIBFDT
-
-/*
- * Extra Environments
- */
-#define	CONFIG_EXTRA_ENV_SETTINGS					\
-	"update_nand_full_filename=u-boot.nand\0"			\
-	"update_nand_firmware_filename=u-boot.sb\0"			\
-	"update_sd_firmware_filename=u-boot.sd\0"			\
-	"update_nand_firmware_maxsz=0x100000\0"				\
-	"update_nand_stride=0x40\0"	/* MX28 datasheet ch. 12.12 */	\
-	"update_nand_count=0x4\0"	/* MX28 datasheet ch. 12.12 */	\
-	"update_nand_get_fcb_size="	/* Get size of FCB blocks */	\
-		"nand device 0 ; "					\
-		"nand info ; "						\
-		"setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
-		"setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
-	"update_nand_full="		/* Update FCB, DBBT and FW */	\
-		"if tftp ${update_nand_full_filename} ; then "		\
-		"run update_nand_get_fcb_size ; "			\
-		"nand scrub -y 0x0 ${filesize} ; "			\
-		"nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; "	\
-		"setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \
-		"setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \
-		"nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \
-		"fi\0"							\
-	"update_nand_firmware="		/* Update only firmware */	\
-		"if tftp ${update_nand_firmware_filename} ; then "	\
-		"run update_nand_get_fcb_size ; "			\
-		"setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \
-		"setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; "	\
-		"setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \
-		"nand erase ${fcb_sz} ${fw_sz} ; "			\
-		"nand write ${loadaddr} ${fcb_sz} ${filesize} ; "	\
-		"nand write ${loadaddr} ${fw_off} ${filesize} ; "	\
-		"fi\0"							\
-	"update_sd_firmware="		/* Update the SD firmware partition */ \
-		"if mmc rescan ; then "					\
-		"if tftp ${update_sd_firmware_filename} ; then "	\
-		"setexpr fw_sz ${filesize} / 0x200 ; "	/* SD block size */ \
-		"setexpr fw_sz ${fw_sz} + 1 ; "				\
-		"mmc write ${loadaddr} 0x800 ${fw_sz} ; "		\
-		"fi ; "							\
-		"fi\0"
+/* Boot configuration and environemnt */
+#include "mx28-common.h"
 
 #endif /* __M28_H__ */
include/configs/mx28-common.h new file +129 -0

129 lines not on this page · raw message

include/configs/mx28evk.h +2 -24
index 5ccfe70..5b51d26 100644
@@ -227,29 +227,7 @@
 #endif
 #endif
 
-/*
- * Boot Linux
- */
-#define CONFIG_CMDLINE_TAG
-#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
-#define CONFIG_OF_LIBFDT
-
-/*
- * Extra Environments
- */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	"console_fsl=console=ttyAM0" \
-	"console_mainline=console=ttyAMA0" \
-	"netargs=setenv bootargs console=${console_mainline}" \
-		"root=/dev/nfs " \
-		"ip=dhcp nfsroot=${serverip}:${nfsroot}\0" \
-	"bootcmd_net=echo Booting from net ...; " \
-		"run netargs; " \
-		"dhcp ${uimage}; bootm\0" \
+/* Boot configuration and environemnt */
+#include "mx28-common.h"
 
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.10
#1 lore raw

PATCH v2 1/1 mx28evk, m28evk: sync extra environment content

Dear Otavio Salvador,

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

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 and inclusing m28evk update commands.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
Quoted 6 lines
---
 include/configs/m28evk.h      |   57 +-----------------
 include/configs/mx28-common.h |  129 +++++++++++++++++++++++++++++++++++++++++
 include/configs/mx28evk.h     |   26 +--------
 3 files changed, 133 insertions(+), 79 deletions(-)
 create mode 100644 include/configs/mx28-common.h

I have to admit that I have other ideas what the environment on the M28 boards should look like. I don't want to see this style enforced (or even encouraged) for this board.

Sorry.

Best regards,

Wolfgang Denk

Signature · 6 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
It became apparent that one reason why the Ice Giants were  known  as
the  Ice  Giants  was  because they were, well, giants. The other was
that they were made of ice.              -Terry Pratchett, _Sourcery_

A message that is not in the archive (sent off-list or not yet received): CAP9ODKq=MEe0UxZmJyFEdkocn0cW+RzkZDnVSjmdTeHfU67auQ@mail.gmail.com

#3 lore raw

PATCH v2 1/1 mx28evk, m28evk: sync extra environment content

Dear Otavio Salvador,

please keep the ML on Cc: - thanks.

Quoted 6 lines · In message <CAP9ODKq=MEe0UxZmJyFEdkocn0cW+RzkZDnVSjmdTeHfU67auQ@mail.gmail.com>…
Quoted 4 lines

I have to admit that I have other ideas what the environment on the M28 boards should look like. ?I don't want to see this style enforced (or even encouraged) for this board.

Can you explain what do you have in mind?

Over the years we have developed our own style for the default environment of DENX maintained boards, and I want to keep this consistently used, especially for our own products. The (Frescale originating?) style you are using here does not fit. [The cuurent default env is not much better, agreed; this needs fixing. But when changing the environment for M28, then in the "right" direction.]

Thanks.

Best regards,

Wolfgang Denk

Signature · 5 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 sight of death frightens them [Earthers].
	-- Kras the Klingon, "Friday's Child", stardate 3497.2
#4 lore raw

PATCH v2 1/1 mx28evk, m28evk: sync extra environment content

Quoted 8 lines · Wolfgang Denk
Quoted 1 line

Can you explain what do you have in mind?

Over the years we have developed our own style for the default environment of DENX maintained boards, and I want to keep this consistently used, especially for our own products. ?The (Frescale originating?) style you are using here ?does not fit. ?[The cuurent default env is not much better, agreed; this needs fixing. ?But when changing the environment for M28, then in the "right" direction.]

In this case I'll send it for mx28evk again. So we can have it there in meanwhile.

Signature · 3 lines
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