Blackfin: make default ADI env more flexible
Allow boards to easily override the root= and default bootcmd, allow people to tweak the file used in default bootcmds at runtime via one env var, and add a stock nandboot command. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
0f52b560f1
commit
0e63dc0679
@ -103,14 +103,19 @@
|
|||||||
#else
|
#else
|
||||||
# define CONFIG_BOOTDELAY 5
|
# define CONFIG_BOOTDELAY 5
|
||||||
#endif
|
#endif
|
||||||
#define CONFIG_BOOTCOMMAND "run ramboot"
|
#ifndef CONFIG_BOOTCOMMAND
|
||||||
|
# define CONFIG_BOOTCOMMAND "run ramboot"
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_VIDEO
|
#ifdef CONFIG_VIDEO
|
||||||
# define CONFIG_BOOTARGS_VIDEO "console=tty0 "
|
# define CONFIG_BOOTARGS_VIDEO "console=tty0 "
|
||||||
#else
|
#else
|
||||||
# define CONFIG_BOOTARGS_VIDEO ""
|
# define CONFIG_BOOTARGS_VIDEO ""
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CONFIG_BOOTARGS_ROOT
|
||||||
|
# define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
|
||||||
|
#endif
|
||||||
#define CONFIG_BOOTARGS \
|
#define CONFIG_BOOTARGS \
|
||||||
"root=/dev/mtdblock0 rw " \
|
"root=" CONFIG_BOOTARGS_ROOT " " \
|
||||||
"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
|
"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
|
||||||
"earlyprintk=" \
|
"earlyprintk=" \
|
||||||
"serial," \
|
"serial," \
|
||||||
@ -118,7 +123,17 @@
|
|||||||
MK_STR(CONFIG_BAUDRATE) " " \
|
MK_STR(CONFIG_BAUDRATE) " " \
|
||||||
CONFIG_BOOTARGS_VIDEO \
|
CONFIG_BOOTARGS_VIDEO \
|
||||||
"console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
|
"console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
|
||||||
|
#if defined(CONFIG_CMD_NAND)
|
||||||
|
# define NAND_ENV_SETTINGS \
|
||||||
|
"nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
|
||||||
|
"nandboot=" \
|
||||||
|
"nand read $(loadaddr) 0x20000 0x100000;" \
|
||||||
|
"run nandargs;" \
|
||||||
|
"bootm" \
|
||||||
|
"\0"
|
||||||
|
#else
|
||||||
|
# define NAND_ENV_SETTINGS
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
||||||
# define UBOOT_ENV_FILE "u-boot.bin"
|
# define UBOOT_ENV_FILE "u-boot.bin"
|
||||||
@ -156,19 +171,23 @@
|
|||||||
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
|
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
|
||||||
"$(hostname):eth0:off" \
|
"$(hostname):eth0:off" \
|
||||||
"\0" \
|
"\0" \
|
||||||
|
\
|
||||||
|
"ramfile=uImage\0" \
|
||||||
"ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
|
"ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
|
||||||
"ramboot=" \
|
"ramboot=" \
|
||||||
"tftp $(loadaddr) uImage;" \
|
"tftp $(loadaddr) $(ramfile);" \
|
||||||
"run ramargs;" \
|
"run ramargs;" \
|
||||||
"run addip;" \
|
"run addip;" \
|
||||||
"bootm" \
|
"bootm" \
|
||||||
"\0" \
|
"\0" \
|
||||||
|
\
|
||||||
|
"nfsfile=vmImage\0" \
|
||||||
"nfsargs=set bootargs " \
|
"nfsargs=set bootargs " \
|
||||||
"root=/dev/nfs rw " \
|
"root=/dev/nfs rw " \
|
||||||
"nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
|
"nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
|
||||||
"\0" \
|
"\0" \
|
||||||
"nfsboot=" \
|
"nfsboot=" \
|
||||||
"tftp $(loadaddr) vmImage;" \
|
"tftp $(loadaddr) $(nfsfile);" \
|
||||||
"run nfsargs;" \
|
"run nfsargs;" \
|
||||||
"run addip;" \
|
"run addip;" \
|
||||||
"bootm" \
|
"bootm" \
|
||||||
@ -177,6 +196,7 @@
|
|||||||
# define NETWORK_ENV_SETTINGS
|
# define NETWORK_ENV_SETTINGS
|
||||||
#endif
|
#endif
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
NAND_ENV_SETTINGS \
|
||||||
NETWORK_ENV_SETTINGS \
|
NETWORK_ENV_SETTINGS \
|
||||||
"flashboot=bootm 0x20100000\0"
|
"flashboot=bootm 0x20100000\0"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user