From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karsten Merker Date: Sun, 10 Aug 2014 23:00:59 +0200 Subject: [U-Boot] [RFC/PATCH 1/1] sunxi: Populate the default environment for sunxi-based systems In-Reply-To: <1407704459-22942-1-git-send-email-merker@debian.org> References: <1407704459-22942-1-git-send-email-merker@debian.org> Message-ID: <1407704459-22942-2-git-send-email-merker@debian.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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 -- 1.7.10.4