Commit 06982534 authored by Shawn Guo's avatar Shawn Guo Committed by Stefano Babic
Browse files

mx51evk: consolidate env for mmcboot and netboot



This patch is to consolidate default mx51evk env for two primary
boot modes, mmcboot and netboot.

It also cleans some unused env like netdev, uboot and redundant
env like loadaddr since CONFIG_LOADADDR already defines it.
Signed-off-by: default avatarShawn Guo <shawn.gsc@gmail.com>
parent 888b4f43
...@@ -125,18 +125,42 @@ ...@@ -125,18 +125,42 @@
#define CONFIG_LOADADDR 0x90800000 /* loadaddr env var */ #define CONFIG_LOADADDR 0x90800000 /* loadaddr env var */
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \ "script=boot.scr\0" \
"uboot_addr=0xa0000000\0" \ "uimage=uImage\0" \
"uboot=u-boot.bin\0" \ "mmcdev=0\0" \
"loadaddr=0x90800000\0" \ "mmcpart=2\0" \
"bootargs_base=setenv bootargs console=tty "\ "mmcroot=/dev/mmcblk0p3 rw\0" \
"console=ttymxc0,${baudrate}\0"\ "mmcrootfstype=ext3 rootwait\0" \
"bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs "\ "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"\ "root=${mmcroot} " \
"bootcmd=run bootcmd_net\0" \ "rootfstype=${mmcrootfstype}\0" \
"bootcmd_net=run bootargs_base bootargs_nfs; " \ "loadbootscript=" \
"tftpboot ${loadaddr} ${kernel}; bootm\0" "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm\0" \
"netargs=setenv bootargs console=ttymxc0,${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
"dhcp ${uimage}; bootm\0" \
#define CONFIG_BOOTCOMMAND \
"if mmc rescan ${mmcdev}; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"else run netboot; " \
"fi; " \
"fi; " \
"else run netboot; fi"
#define CONFIG_ARP_TIMEOUT 200UL #define CONFIG_ARP_TIMEOUT 200UL
...@@ -144,6 +168,8 @@ ...@@ -144,6 +168,8 @@
* Miscellaneous configurable options * Miscellaneous configurable options
*/ */
#define CONFIG_SYS_LONGHELP /* undef to save memory */ #define CONFIG_SYS_LONGHELP /* undef to save memory */
#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_PROMPT "MX51EVK U-Boot > " #define CONFIG_SYS_PROMPT "MX51EVK U-Boot > "
#define CONFIG_AUTO_COMPLETE #define CONFIG_AUTO_COMPLETE
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment