Skip to contentSkip to conversation

85xx: add the nfsboot/ramboot to default environment

PATCH New Dave Liu 2 participants 3 messages Apr 3, 2009 – Nov 22, 2009

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH 2/2 85xx: add the nfsboot/ramboot to default environment

Give the MPC8569MDS board one default environment var.

---
 include/configs/MPC8569MDS.h |   72 ++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 31 deletions(-)
include/configs/MPC8569MDS.h +41 -31
index b0af5dc..7fd2b56 100644
@@ -409,46 +409,56 @@ extern unsigned long get_clock_freq(void);
  * Environment Configuration
  */
 #define CONFIG_HOSTNAME mpc8569mds
-#define CONFIG_ROOTPATH  /nfsroot
-#define CONFIG_BOOTFILE  your.uImage
+#define CONFIG_ROOTPATH  /tftpboot
+#define CONFIG_BOOTFILE  uImage.8569
 
+#define CONFIG_HAS_ETH0
+#define CONFIG_ETHADDR	00:E0:0C:85:69:01
+#define CONFIG_HAS_ETH1
+#define CONFIG_ETH1ADDR	00:E0:0C:85:69:02
+
+#define CONFIG_IPADDR    192.168.1.100
 #define CONFIG_SERVERIP  192.168.1.1
-#define CONFIG_GATEWAYIP 192.168.1.1
+#define CONFIG_GATEWAYIP 192.168.1.254
 #define CONFIG_NETMASK   255.255.255.0
 
-#define CONFIG_LOADADDR  200000   /*default location for tftp and bootm*/
+#define CONFIG_LOADADDR  1000000   /*default location for tftp and bootm*/
 
 #define CONFIG_BOOTDELAY 10       /* -1 disables auto-boot */
 #undef  CONFIG_BOOTARGS           /* the boot command will set bootargs*/
 
 #define CONFIG_BAUDRATE	115200
 
-#define	CONFIG_EXTRA_ENV_SETTINGS					\
-	"netdev=eth0\0"							\
-	"consoledev=ttyS0\0"						\
-	"ramdiskaddr=600000\0"						\
-	"ramdiskfile=your.ramdisk.u-boot\0"				\
-	"fdtaddr=400000\0"						\
-	"fdtfile=your.fdt.dtb\0"					\
-	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
-	"nfsroot=$serverip:$rootpath "					\
-	"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
-	"console=$consoledev,$baudrate $othbootargs\0"			\
-	"ramargs=setenv bootargs root=/dev/ram rw "			\
-	"console=$consoledev,$baudrate $othbootargs\0"			\
-
-#define CONFIG_NFSBOOTCOMMAND						\
-	"run nfsargs;"							\
-	"tftp $loadaddr $bootfile;"					\
-	"tftp $fdtaddr $fdtfile;"					\
-	"bootm $loadaddr - $fdtaddr"
-
-#define CONFIG_RAMBOOTCOMMAND						\
-	"run ramargs;"							\
-	"tftp $ramdiskaddr $ramdiskfile;"				\
-	"tftp $loadaddr $bootfile;"					\
-	"bootm $loadaddr $ramdiskaddr"
-
-#define CONFIG_BOOTCOMMAND  CONFIG_NFSBOOTCOMMAND
+#define	CONFIG_EXTRA_ENV_SETTINGS				\
+ "netdev=eth0\0"						\
+ "uboot=u-boot.8569\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"	\
+ "consoledev=ttyS0\0"			\
+ "ramdiskaddr=2000000\0"		\
+ "ramdiskfile=ramdisk.8569\0"		\
+ "fdtaddr=c00000\0"			\
+ "fdtfile=dtb.8569\0"
+
+#define CONFIG_NFSBOOTCOMMAND		\
+ "setenv bootargs root=/dev/nfs rw "	\
+ "nfsroot=$serverip:$rootpath "		\
+ "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+ "console=$consoledev,$baudrate $othbootargs;"	\
+ "tftp $loadaddr $bootfile;"		\
+ "tftp $fdtaddr $fdtfile;"		\
+ "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_RAMBOOTCOMMAND		\
+ "setenv bootargs root=/dev/ram rw "	\
+ "console=$consoledev,$baudrate $othbootargs;"	\
+ "tftp $ramdiskaddr $ramdiskfile;"	\
+ "tftp $loadaddr $bootfile;"		\
+ "tftp $fdtaddr $fdtfile;"		\
+ "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
 #endif	/* __CONFIG_H */
Signature · 1 line
1.5.4
#1 lore raw

PATCH 2/2 85xx: add the nfsboot/ramboot to default environment

Dear Andy,

Quoted 6 lines · In message <[email protected]> Dave Liu…

Give the MPC8569MDS board one default environment var.

---
 include/configs/MPC8569MDS.h |   72 ++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 31 deletions(-)

AFAICT this has not been applied yet, nor has it been rejected.

Please check.

Best regards,

Wolfgang Denk

Signature · 9 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
I don't care if you *ARE* on a bondage-and-discipline  post-technical
system  pawned off by the nation's largest oughta-be-illegal monopoly
who cannot escape the sins of their forefathers -- namely, using  the
wrong  slash for directories when the C language and its brethren use
it for something else that's very important.
         -- Tom Christiansen in <[email protected]>
#2 lore raw

PATCH 2/2 85xx: add the nfsboot/ramboot to default environment

In reply to Dave Liu

Dear Andy & Kumar,

Quoted 89 lines · In message <[email protected]> Dave Liu…

Give the MPC8569MDS board one default environment var.

---
 include/configs/MPC8569MDS.h |   72 ++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 31 deletions(-)
include/configs/MPC8569MDS.h +33 -31
index b0af5dc..7fd2b56 100644
@@ -409,46 +409,56 @@ extern unsigned long get_clock_freq(void);
  * Environment Configuration
  */
 #define CONFIG_HOSTNAME mpc8569mds
-#define CONFIG_ROOTPATH  /nfsroot
-#define CONFIG_BOOTFILE  your.uImage
+#define CONFIG_ROOTPATH  /tftpboot
+#define CONFIG_BOOTFILE  uImage.8569
 
+#define CONFIG_HAS_ETH0
+#define CONFIG_ETHADDR	00:E0:0C:85:69:01
+#define CONFIG_HAS_ETH1
+#define CONFIG_ETH1ADDR	00:E0:0C:85:69:02
+
+#define CONFIG_IPADDR    192.168.1.100
 #define CONFIG_SERVERIP  192.168.1.1
-#define CONFIG_GATEWAYIP 192.168.1.1
+#define CONFIG_GATEWAYIP 192.168.1.254
 #define CONFIG_NETMASK   255.255.255.0
 
-#define CONFIG_LOADADDR  200000   /*default location for tftp and bootm*/
+#define CONFIG_LOADADDR  1000000   /*default location for tftp and bootm*/
 
 #define CONFIG_BOOTDELAY 10       /* -1 disables auto-boot */
 #undef  CONFIG_BOOTARGS           /* the boot command will set bootargs*/
 
 #define CONFIG_BAUDRATE	115200
 
-#define	CONFIG_EXTRA_ENV_SETTINGS					\
-	"netdev=eth0\0"							\
-	"consoledev=ttyS0\0"						\
-	"ramdiskaddr=600000\0"						\
-	"ramdiskfile=your.ramdisk.u-boot\0"				\
-	"fdtaddr=400000\0"						\
-	"fdtfile=your.fdt.dtb\0"					\
-	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
-	"nfsroot=$serverip:$rootpath "					\
-	"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
-	"console=$consoledev,$baudrate $othbootargs\0"			\
-	"ramargs=setenv bootargs root=/dev/ram rw "			\
-	"console=$consoledev,$baudrate $othbootargs\0"			\
-
-#define CONFIG_NFSBOOTCOMMAND						\
-	"run nfsargs;"							\
-	"tftp $loadaddr $bootfile;"					\
-	"tftp $fdtaddr $fdtfile;"					\
-	"bootm $loadaddr - $fdtaddr"
-
-#define CONFIG_RAMBOOTCOMMAND						\
-	"run ramargs;"							\
-	"tftp $ramdiskaddr $ramdiskfile;"				\
-	"tftp $loadaddr $bootfile;"					\
-	"bootm $loadaddr $ramdiskaddr"
-
-#define CONFIG_BOOTCOMMAND  CONFIG_NFSBOOTCOMMAND
+#define	CONFIG_EXTRA_ENV_SETTINGS				\
+ "netdev=eth0\0"						\
+ "uboot=u-boot.8569\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"	\
+ "consoledev=ttyS0\0"			\
+ "ramdiskaddr=2000000\0"		\
+ "ramdiskfile=ramdisk.8569\0"		\
+ "fdtaddr=c00000\0"			\
+ "fdtfile=dtb.8569\0"
+
+#define CONFIG_NFSBOOTCOMMAND		\
+ "setenv bootargs root=/dev/nfs rw "	\
+ "nfsroot=$serverip:$rootpath "		\
+ "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+ "console=$consoledev,$baudrate $othbootargs;"	\
+ "tftp $loadaddr $bootfile;"		\
+ "tftp $fdtaddr $fdtfile;"		\
+ "bootm $loadaddr - $fdtaddr"

include/configs/MPC8569MDS.h extern unsigned long get_clock_freq(void); · line 464

Quoted 10 lines
include/configs/MPC8569MDS.h +8 -0
+
+#define CONFIG_RAMBOOTCOMMAND		\
+ "setenv bootargs root=/dev/ram rw "	\
+ "console=$consoledev,$baudrate $othbootargs;"	\
+ "tftp $ramdiskaddr $ramdiskfile;"	\
+ "tftp $loadaddr $bootfile;"		\
+ "tftp $fdtaddr $fdtfile;"		\
+ "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
 #endif	/* __CONFIG_H */

Is there a specific reason this has bneve rbeen picked up? Shall I drop it from my list?

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
They say a little knowledge is a dangerous thing,  but it is not  one
half so bad as a lot of ignorance.   - Terry Pratchett, _Equal Rites_