mvebu: fix boot script for booting from mmc
[openwrt/openwrt.git] / package / boot / uboot-mvebu / patches / 003-boot_script.patch
1 --- a/include/configs/clearfog.h
2 +++ b/include/configs/clearfog.h
3 @@ -107,7 +107,18 @@
4 /* Keep device tree and initrd in lower memory so the kernel can access them */
5 #define CONFIG_EXTRA_ENV_SETTINGS \
6 "fdt_high=0x10000000\0" \
7 - "initrd_high=0x10000000\0"
8 + "initrd_high=0x10000000\0" \
9 + "script=boot.scr\0" \
10 + "loadaddr=0x01000000\0" \
11 + "mmcdev=0\0" \
12 + "mmcpart=1\0" \
13 + "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
14 + "bootscript=echo Running bootscript from mmc ...; source ${loadaddr}\0"
15 +
16 +#define CONFIG_BOOTCOMMAND \
17 + "if run loadbootscript; then " \
18 + "run bootscript; " \
19 + "fi"
20
21 /* SPL */
22 /*
23 --- a/configs/clearfog_defconfig
24 +++ b/configs/clearfog_defconfig
25 @@ -3,6 +3,7 @@ CONFIG_ARCH_MVEBU=y
26 CONFIG_SYS_MALLOC_F_LEN=0x2000
27 CONFIG_TARGET_CLEARFOG=y
28 CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
29 +CONFIG_HUSH_PARSER=y
30 CONFIG_SPL=y
31 # CONFIG_CMD_IMLS is not set
32 # CONFIG_CMD_FLASH is not set