]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ti: am335x/am437x/omap5 devices: Unify network environment variables
authorCooper Jr., Franklin <fcooper@ti.com>
Tue, 21 Apr 2015 12:51:04 +0000 (07:51 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:37:53 +0000 (22:37 +0200)
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>
include/configs/am335x_evm.h
include/configs/am43xx_evm.h
include/configs/ti_armv7_common.h
include/configs/ti_omap5_common.h

index a87059c5434b0f4c4409a4b31b08580a6ca7a84d..8da3325b7e8377022e2458a859938545df97b94e 100644 (file)
        "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} " \
                "${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} ...; " \
                "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" \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
        NANDARGS \
+       NETARGS \
        DFUARGS
 #endif
 
index 6eb31e21201cafe01aaba3f5d02a09088065181f..331fdac0f1873fb1acb74220eb40201e47ccdd1c 100644 (file)
                        "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 \
index 110a4f8795675dba1c04f9968412fafaab4b6226..f8829425a541b072a855de4af7a49a048721f0b6 100644 (file)
 #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__ */
index f2be8d583ef6db2fa3c3244290ee60cb7121fe51..33834912fc158179ac7f926df66870690d22757f 100644 (file)
                "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" \
                                "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; " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
        DFUARGS \
+       NETARGS \
 
 
 #define CONFIG_BOOTCOMMAND \