Skip to contentSkip to conversation

MPC8260ADS: Add nfsboot/ramboot to default environment.

PATCH New Scott Wood 2 participants 2 messages Apr 2, 2009 – Apr 4, 2009

lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH v2 1/1 MPC8260ADS: Add nfsboot/ramboot to default environment.

This brings it in line with other Freescale boards.

---
This time with ttyCPM0, not ttyS0.

 include/configs/MPC8260ADS.h |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
include/configs/MPC8260ADS.h +42 -0
index 42fbe90..21210eb 100644
@@ -17,6 +17,8 @@
  * Vitaly Bordug <[email protected]>
  * Added support for PCI bridge on MPC8272ADS
  *
+ * Copyright (C) Freescale Semiconductor, Inc. 2006-2009.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -512,4 +514,44 @@
 #define CONFIG_HAS_ETH1
 #endif
 
+#define CONFIG_NETDEV eth0
+#define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */
+
+#define XMK_STR(x)	#x
+#define MK_STR(x)	XMK_STR(x)
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"netdev=" MK_STR(CONFIG_NETDEV) "\0"				\
+	"tftpflash=tftpboot $loadaddr $uboot; "				\
+		"protect off " MK_STR(TEXT_BASE) " +$filesize; "	\
+		"erase " MK_STR(TEXT_BASE) " +$filesize; "		\
+		"cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; "	\
+		"protect on " MK_STR(TEXT_BASE) " +$filesize; "		\
+		"cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0"	\
+	"fdtaddr=400000\0"						\
+	"console=ttyCPM0\0"						\
+	"setbootargs=setenv bootargs "					\
+		"root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
+	"setipargs=setenv bootargs nfsroot=$serverip:$rootpath "	 \
+		"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+		"root=$rootdev rw console=$console,$baudrate $othbootargs\0"
+
+#define CONFIG_NFSBOOTCOMMAND						\
+	"setenv rootdev /dev/nfs;"					\
+	"run setipargs;"						\
+	"tftp $loadaddr $bootfile;"					\
+	"tftp $fdtaddr $fdtfile;"					\
+	"bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_RAMBOOTCOMMAND						\
+	"setenv rootdev /dev/ram;"					\
+	"run setbootargs;"						\
+	"tftp $ramdiskaddr $ramdiskfile;"				\
+	"tftp $loadaddr $bootfile;"					\
+	"tftp $fdtaddr $fdtfile;"					\
+	"bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#undef MK_STR
+#undef XMK_STR
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.5.6.rc1.6.gc53ad
#1 lore raw

PATCH v2 1/1 MPC8260ADS: Add nfsboot/ramboot to default environment.

Dear Scott Wood,

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

This brings it in line with other Freescale boards.

---
This time with ttyCPM0, not ttyS0.

 include/configs/MPC8260ADS.h |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

OK, applied this one instead ov V1. Thanks.

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
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month"