Patchwork [U-Boot,3/5] am335x_evm: Add NET environment variables

login
register
mail settings
Submitter Tom Rini
Date Feb. 8, 2013, 9:20 p.m.
Message ID <1360358415-10462-4-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/219311/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Feb. 8, 2013, 9:20 p.m.
From: Chase Maupin <Chase.Maupin@ti.com>

* Add environment variables to support network booting

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/am335x_evm.h |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index d9e8264..61607a5 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -64,6 +64,10 @@ 
 	"nandrootfstype=ubifs rootwait=1\0" \
 	"nandsrcaddr=0x280000\0" \
 	"nandimgsize=0x500000\0" \
+	"rootpath=/export/rootfs\0" \
+	"nfsopts=nolock\0" \
+	"static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
+		"::off\0" \
 	"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
 	"ramrootfstype=ext2\0" \
 	"mmcargs=setenv bootargs console=${console} " \
@@ -83,6 +87,11 @@ 
 		"${optargs} " \
 		"root=${spiroot} " \
 		"rootfstype=${spirootfstype}\0" \
+	"netargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"root=/dev/nfs " \
+		"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
+		"ip=dhcp\0" \
 	"bootenv=uEnv.txt\0" \
 	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
 	"importbootenv=echo Importing environment from mmc ...; " \
@@ -106,6 +115,12 @@ 
 		"sf probe ${spibusno}:0; " \
 		"sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
 		"bootm ${loadaddr}\0" \
+	"netboot=echo Booting from network ...; " \
+		"setenv autoload no; " \
+		"dhcp; " \
+		"tftp ${loadaddr} ${bootfile}; " \
+		"run netargs; " \
+		"bootm ${loadaddr}\0" \
 	"ramboot=echo Booting from ramdisk ...; " \
 		"run ramargs; " \
 		"bootm ${loadaddr}\0" \