mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-20 00:48:52 +09:00
omap4: allow the use of a plain text env file instead boot scripts
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import. But for development, it is easier to use the env import command and plain text files instead of script-images. Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present. The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Acked-by: Nishanth Menon <nm@ti.com>
This commit is contained in:
parent
9d4f542123
commit
d70f54808d
@ -159,6 +159,9 @@
|
|||||||
"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" \
|
||||||
|
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
|
||||||
|
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
|
||||||
|
"env import -t ${loadaddr} ${filesize}\0" \
|
||||||
"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
|
"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
|
||||||
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
|
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
|
||||||
"run mmcargs; " \
|
"run mmcargs; " \
|
||||||
@ -166,13 +169,21 @@
|
|||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
||||||
|
"echo SD/MMC found on device ${mmcdev};" \
|
||||||
"if run loadbootscript; then " \
|
"if run loadbootscript; then " \
|
||||||
"run bootscript; " \
|
"run bootscript; " \
|
||||||
"else " \
|
"else " \
|
||||||
|
"if run loadbootenv; then " \
|
||||||
|
"run importbootenv; " \
|
||||||
|
"fi;" \
|
||||||
|
"if test -n ${uenvcmd}; then " \
|
||||||
|
"echo Running uenvcmd ...;" \
|
||||||
|
"run uenvcmd;" \
|
||||||
|
"fi;" \
|
||||||
|
"fi;" \
|
||||||
"if run loaduimage; then " \
|
"if run loaduimage; then " \
|
||||||
"run mmcboot; " \
|
"run mmcboot; " \
|
||||||
"fi; " \
|
"fi; " \
|
||||||
"fi; " \
|
|
||||||
"fi"
|
"fi"
|
||||||
|
|
||||||
#define CONFIG_AUTO_COMPLETE 1
|
#define CONFIG_AUTO_COMPLETE 1
|
||||||
|
Loading…
Reference in New Issue
Block a user