ti_armv7_common: env: Consolidate support for loading script and text env files
Support for loading bootscript and text env file is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
592bc5e269
commit
18c534bbfb
|
@ -91,6 +91,7 @@
|
||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
"run findfdt; " \
|
"run findfdt; " \
|
||||||
|
"run envboot; " \
|
||||||
"run distro_bootcmd"
|
"run distro_bootcmd"
|
||||||
|
|
||||||
#include <config_distro_bootcmd.h>
|
#include <config_distro_bootcmd.h>
|
||||||
|
@ -120,13 +121,6 @@
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${spiroot} " \
|
"root=${spiroot} " \
|
||||||
"rootfstype=${spirootfstype}\0" \
|
"rootfstype=${spirootfstype}\0" \
|
||||||
"bootenv=uEnv.txt\0" \
|
|
||||||
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
|
||||||
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
|
||||||
"source ${loadaddr}\0" \
|
|
||||||
"loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
|
||||||
"importbootenv=echo Importing environment from mmc ...; " \
|
|
||||||
"env import -t -r $loadaddr $filesize\0" \
|
|
||||||
"ramargs=setenv bootargs console=${console} " \
|
"ramargs=setenv bootargs console=${console} " \
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${ramroot} " \
|
"root=${ramroot} " \
|
||||||
|
@ -151,21 +145,10 @@
|
||||||
"mmcboot=mmc dev ${mmcdev}; " \
|
"mmcboot=mmc dev ${mmcdev}; " \
|
||||||
"if mmc rescan; then " \
|
"if mmc rescan; then " \
|
||||||
"echo SD/MMC found on device ${mmcdev};" \
|
"echo SD/MMC found on device ${mmcdev};" \
|
||||||
"if run loadbootscript; then " \
|
"run envboot; " \
|
||||||
"run bootscript;" \
|
"if run loadimage; then " \
|
||||||
"else " \
|
"run mmcloados;" \
|
||||||
"if run loadbootenv; then " \
|
"fi;" \
|
||||||
"echo Loaded environment from ${bootenv};" \
|
|
||||||
"run importbootenv;" \
|
|
||||||
"fi;" \
|
|
||||||
"if test -n $uenvcmd; then " \
|
|
||||||
"echo Running uenvcmd ...;" \
|
|
||||||
"run uenvcmd;" \
|
|
||||||
"fi;" \
|
|
||||||
"if run loadimage; then " \
|
|
||||||
"run mmcloados;" \
|
|
||||||
"fi;" \
|
|
||||||
"fi ;" \
|
|
||||||
"fi;\0" \
|
"fi;\0" \
|
||||||
"spiboot=echo Booting from spi ...; " \
|
"spiboot=echo Booting from spi ...; " \
|
||||||
"run spiargs; " \
|
"run spiargs; " \
|
||||||
|
@ -197,7 +180,6 @@
|
||||||
BOOTENV
|
BOOTENV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* NS16550 Configuration */
|
/* NS16550 Configuration */
|
||||||
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
|
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
|
||||||
#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
|
#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
|
||||||
|
|
|
@ -259,10 +259,6 @@
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${usbroot} " \
|
"root=${usbroot} " \
|
||||||
"rootfstype=${usbrootfstype}\0" \
|
"rootfstype=${usbrootfstype}\0" \
|
||||||
"bootenv=uEnv.txt\0" \
|
|
||||||
"loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0" \
|
|
||||||
"importbootenv=echo Importing environment from mmc ...; " \
|
|
||||||
"env import -t $loadaddr $filesize\0" \
|
|
||||||
"ramargs=setenv bootargs console=${console} " \
|
"ramargs=setenv bootargs console=${console} " \
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${ramroot} " \
|
"root=${ramroot} " \
|
||||||
|
@ -275,14 +271,6 @@
|
||||||
"setenv devtype mmc; " \
|
"setenv devtype mmc; " \
|
||||||
"if mmc rescan; then " \
|
"if mmc rescan; then " \
|
||||||
"echo SD/MMC found on device ${devnum};" \
|
"echo SD/MMC found on device ${devnum};" \
|
||||||
"if run loadbootenv; then " \
|
|
||||||
"echo Loaded environment from ${bootenv};" \
|
|
||||||
"run importbootenv;" \
|
|
||||||
"fi;" \
|
|
||||||
"if test -n $uenvcmd; then " \
|
|
||||||
"echo Running uenvcmd ...;" \
|
|
||||||
"run uenvcmd;" \
|
|
||||||
"fi;" \
|
|
||||||
"if run loadimage; then " \
|
"if run loadimage; then " \
|
||||||
"run loadfdt; " \
|
"run loadfdt; " \
|
||||||
"echo Booting from mmc${mmcdev} ...; " \
|
"echo Booting from mmc${mmcdev} ...; " \
|
||||||
|
@ -329,6 +317,7 @@
|
||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
"run findfdt; " \
|
"run findfdt; " \
|
||||||
|
"run envboot;" \
|
||||||
"run mmcboot;" \
|
"run mmcboot;" \
|
||||||
"run usbboot;" \
|
"run usbboot;" \
|
||||||
NANDBOOT \
|
NANDBOOT \
|
||||||
|
|
|
@ -63,7 +63,30 @@
|
||||||
"args_mmc=run finduuid;setenv bootargs console=${console} " \
|
"args_mmc=run finduuid;setenv bootargs console=${console} " \
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=PARTUUID=${uuid} rw " \
|
"root=PARTUUID=${uuid} rw " \
|
||||||
"rootfstype=${mmcrootfstype}\0"
|
"rootfstype=${mmcrootfstype}\0" \
|
||||||
|
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
||||||
|
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
||||||
|
"source ${loadaddr}\0" \
|
||||||
|
"bootenvfile=uEnv.txt\0" \
|
||||||
|
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
|
||||||
|
"env import -t ${loadaddr} ${filesize}\0" \
|
||||||
|
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
|
||||||
|
"envboot=mmc dev ${mmcdev}; " \
|
||||||
|
"if mmc rescan; then " \
|
||||||
|
"echo SD/MMC found on device ${mmcdev};" \
|
||||||
|
"if run loadbootscript; then " \
|
||||||
|
"run bootscript;" \
|
||||||
|
"else " \
|
||||||
|
"if run loadbootenv; then " \
|
||||||
|
"echo Loaded env from ${bootenvfile};" \
|
||||||
|
"run importbootenv;" \
|
||||||
|
"fi;" \
|
||||||
|
"if test -n $uenvcmd; then " \
|
||||||
|
"echo Running uenvcmd ...;" \
|
||||||
|
"run uenvcmd;" \
|
||||||
|
"fi;" \
|
||||||
|
"fi;" \
|
||||||
|
"fi;\0" \
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
|
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
|
||||||
|
|
|
@ -103,6 +103,7 @@
|
||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
"run findfdt; " \
|
"run findfdt; " \
|
||||||
|
"run envboot; " \
|
||||||
"run distro_bootcmd"
|
"run distro_bootcmd"
|
||||||
|
|
||||||
#include <config_distro_bootcmd.h>
|
#include <config_distro_bootcmd.h>
|
||||||
|
@ -117,12 +118,6 @@
|
||||||
"bootfile=zImage\0" \
|
"bootfile=zImage\0" \
|
||||||
"usbtty=cdc_acm\0" \
|
"usbtty=cdc_acm\0" \
|
||||||
"vram=16M\0" \
|
"vram=16M\0" \
|
||||||
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
|
||||||
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
|
||||||
"source ${loadaddr}\0" \
|
|
||||||
"loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
|
|
||||||
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
|
|
||||||
"env import -t ${loadaddr} ${filesize}\0" \
|
|
||||||
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
||||||
"loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
|
"loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
|
||||||
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
|
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
|
||||||
|
|
|
@ -84,22 +84,10 @@
|
||||||
"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
||||||
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
||||||
"source ${loadaddr}\0" \
|
"source ${loadaddr}\0" \
|
||||||
"bootenv=uEnv.txt\0" \
|
|
||||||
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
|
||||||
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
|
|
||||||
"env import -t ${loadaddr} ${filesize}\0" \
|
|
||||||
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
||||||
"mmcboot=mmc dev ${mmcdev}; " \
|
"mmcboot=mmc dev ${mmcdev}; " \
|
||||||
"if mmc rescan; then " \
|
"if mmc rescan; then " \
|
||||||
"echo SD/MMC found on device ${mmcdev};" \
|
"echo SD/MMC found on device ${mmcdev};" \
|
||||||
"if run loadbootenv; then " \
|
|
||||||
"echo Loaded environment from ${bootenv};" \
|
|
||||||
"run importbootenv;" \
|
|
||||||
"fi;" \
|
|
||||||
"if test -n $uenvcmd; then " \
|
|
||||||
"echo Running uenvcmd ...;" \
|
|
||||||
"run uenvcmd;" \
|
|
||||||
"fi;" \
|
|
||||||
"if run loadimage; then " \
|
"if run loadimage; then " \
|
||||||
"run loadfdt; " \
|
"run loadfdt; " \
|
||||||
"echo Booting from mmc${mmcdev} ...; " \
|
"echo Booting from mmc${mmcdev} ...; " \
|
||||||
|
@ -132,6 +120,7 @@
|
||||||
"echo Booting into fastboot ...; fastboot 0;" \
|
"echo Booting into fastboot ...; fastboot 0;" \
|
||||||
"fi;" \
|
"fi;" \
|
||||||
"run findfdt; " \
|
"run findfdt; " \
|
||||||
|
"run envboot; " \
|
||||||
"run mmcboot;" \
|
"run mmcboot;" \
|
||||||
"setenv mmcdev 1; " \
|
"setenv mmcdev 1; " \
|
||||||
"setenv bootpart 1:2; " \
|
"setenv bootpart 1:2; " \
|
||||||
|
|
Loading…
Reference in a new issue