* [U-Boot] [PATCH] ti: am335x/am437x/omap5 devices: Unify network environment variables
@ 2015-04-21 12:51 Franklin S Cooper Jr
2015-04-22 14:12 ` Tom Rini
2015-05-10 14:07 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Franklin S Cooper Jr @ 2015-04-21 12:51 UTC (permalink / raw)
To: u-boot
Across several devices network environment variables are duplicated.
Move these variables to a common include file which insures the environment
variables are reused and insures devices across product lines share the same
values.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
include/configs/am335x_evm.h | 17 +----------------
include/configs/am43xx_evm.h | 1 +
include/configs/ti_armv7_common.h | 25 +++++++++++++++++++++++++
include/configs/ti_omap5_common.h | 13 +------------
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index a87059c..8da3325 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -83,10 +83,6 @@
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 ro\0" \
"mmcrootfstype=ext4 rootwait\0" \
- "rootpath=/export/rootfs\0" \
- "nfsopts=nolock\0" \
- "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
- "::off\0" \
"ramroot=/dev/ram0 rw\0" \
"ramrootfstype=ext2\0" \
"mmcargs=setenv bootargs console=${console} " \
@@ -102,11 +98,6 @@
"${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" \
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
@@ -159,13 +150,6 @@
"sf probe ${spibusno}:0; " \
"sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
"bootz ${loadaddr}\0" \
- "netboot=echo Booting from network ...; " \
- "setenv autoload no; " \
- "dhcp; " \
- "tftp ${loadaddr} ${bootfile}; " \
- "tftp ${fdtaddr} ${fdtfile}; " \
- "run netargs; " \
- "bootz ${loadaddr} - ${fdtaddr}\0" \
"ramboot=echo Booting from ramdisk ...; " \
"run ramargs; " \
"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
@@ -181,6 +165,7 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
NANDARGS \
+ NETARGS \
DFUARGS
#endif
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 6eb31e2..331fdac 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -295,6 +295,7 @@
"setenv fdtfile am437x-idk-evm.dtb; fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree; fi; \0" \
+ NETARGS \
DFUARGS \
#define CONFIG_BOOTCOMMAND \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 110a4f8..f882942 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -279,4 +279,29 @@
#endif
#endif /* !CONFIG_NOR_BOOT */
+/* Generic Environment Variables */
+
+#ifdef CONFIG_CMD_NET
+#define NETARGS \
+ "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
+ "::off\0" \
+ "nfsopts=nolock\0" \
+ "rootpath=/export/rootfs\0" \
+ "netloadimage=tftp ${loadaddr} ${bootfile}\0" \
+ "netloadfdt=tftp ${fdtaddr} ${fdtfile}\0" \
+ "netargs=setenv bootargs console=${console} " \
+ "${optargs} " \
+ "root=/dev/nfs " \
+ "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
+ "ip=dhcp\0" \
+ "netboot=echo Booting from network ...; " \
+ "setenv autoload no; " \
+ "dhcp; " \
+ "run netloadimage; " \
+ "run netloadfdt; " \
+ "run netargs; " \
+ "bootz ${loadaddr} - ${fdtaddr}\0"
+
+#endif
+
#endif /* __CONFIG_TI_ARMV7_COMMON_H__ */
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 7957a73..791eade 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -92,11 +92,6 @@
"vram=${vram} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
- "netargs=setenv bootargs console=${console} " \
- "${optargs} " \
- "root=/dev/nfs " \
- "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
- "ip=dhcp\0" \
"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
"source ${loadaddr}\0" \
@@ -123,13 +118,6 @@
"bootz ${loadaddr} - ${fdtaddr}; " \
"fi;" \
"fi;\0" \
- "netboot=echo Booting from network ...; " \
- "set env autoload no; " \
- "dhcp; " \
- "tftp ${loadaddr} ${bootfile}; " \
- "tftp ${fdtaddr} ${fdtfile}; " \
- "run netargs; " \
- "bootz ${loadaddr} - ${fdtaddr}\0" \
"findfdt="\
"if test $board_name = omap5_uevm; then " \
"setenv fdtfile omap5-uevm.dtb; fi; " \
@@ -143,6 +131,7 @@
"echo WARNING: Could not determine device tree to use; fi; \0" \
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
DFUARGS \
+ NETARGS \
#define CONFIG_BOOTCOMMAND \
"run findfdt; " \
--
2.3.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] ti: am335x/am437x/omap5 devices: Unify network environment variables
2015-04-21 12:51 [U-Boot] [PATCH] ti: am335x/am437x/omap5 devices: Unify network environment variables Franklin S Cooper Jr
@ 2015-04-22 14:12 ` Tom Rini
2015-05-10 14:07 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-04-22 14:12 UTC (permalink / raw)
To: u-boot
On Tue, Apr 21, 2015 at 07:51:04AM -0500, Franklin S Cooper Jr wrote:
> Across several devices network environment variables are duplicated.
> Move these variables to a common include file which insures the environment
> variables are reused and insures devices across product lines share the same
> values.
>
> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150422/2bea8d1f/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] ti: am335x/am437x/omap5 devices: Unify network environment variables
2015-04-21 12:51 [U-Boot] [PATCH] ti: am335x/am437x/omap5 devices: Unify network environment variables Franklin S Cooper Jr
2015-04-22 14:12 ` Tom Rini
@ 2015-05-10 14:07 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-05-10 14:07 UTC (permalink / raw)
To: u-boot
On Tue, Apr 21, 2015 at 07:51:04AM -0500, Cooper Jr., Franklin wrote:
> Across several devices network environment variables are duplicated.
> Move these variables to a common include file which insures the environment
> variables are reused and insures devices across product lines share the same
> values.
>
> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150510/090b3df9/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-10 14:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 12:51 [U-Boot] [PATCH] ti: am335x/am437x/omap5 devices: Unify network environment variables Franklin S Cooper Jr
2015-04-22 14:12 ` Tom Rini
2015-05-10 14:07 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox