
Predefine a set of standard environment variables (kernel_addr_r, ramdisk_addr_r, fdt_addr_r and scriptaddr) to sensible values on sunxi-based systems and provide a default environment that allows autobooting of existing boot scripts which were written for pre-mainlining u-boot-sunxi versions.
Signed-off-by: Karsten Merker merker@debian.org --- include/configs/sunxi-common.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 6a3044f..ac8cb8f 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -124,7 +124,17 @@ #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" + "bootm_size=0x10000000\0" \ + "fdt_addr_r=0x43000000\0" \ + "scriptaddr=0x44000000\0" \ + "kernel_addr_r=0x46000000\0" \ + "ramdisk_addr_r=0x48000000\0" \ + "device=mmc\0" \ + "partition=0:1\0" \ + "bootdelay=3\0" \ + "bootcmd=if test -n "${loadbootscr}"; then run loadbootscr; fi\0" \ + "bootscr=boot.scr\0" \ + "loadbootscr=if test -n "${device}" && test -n "${partition}"; then for p in /boot/ /; do load ${device} ${partition} ${scriptaddr} ${p}${bootscr} && echo "Running ${p}${bootscr} from ${device} ${partition}" && source ${scriptaddr}; done; fi\0"
#define CONFIG_SYS_BOOT_GET_CMDLINE