From patchwork Sun Aug 10 21:00:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karsten Merker X-Patchwork-Id: 378887 X-Patchwork-Delegate: ijc@hellion.org.uk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DD03F1400A0 for ; Mon, 11 Aug 2014 16:57:25 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4C619A7437; Mon, 11 Aug 2014 08:57:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xBNuQmGICT93; Mon, 11 Aug 2014 08:57:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7456A743A; Mon, 11 Aug 2014 08:57:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42922A73E0 for ; Sun, 10 Aug 2014 23:06:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R9TXwprRhRDZ for ; Sun, 10 Aug 2014 23:06:51 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by theia.denx.de (Postfix) with ESMTPS id 1C21BA73DC for ; Sun, 10 Aug 2014 23:06:46 +0200 (CEST) Received: from excalibur.cnev.de (cable-84-44-241-105.netcologne.de [84.44.241.105]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0MNL1F-1XMsh23Fvd-006x2g; Sun, 10 Aug 2014 23:01:18 +0200 Received: from localhost ([127.0.0.1] helo=excalibur.cnev.de) by excalibur.cnev.de with esmtp (Exim 4.80) (envelope-from ) id 1XGaEv-0005yg-6c; Sun, 10 Aug 2014 23:01:17 +0200 From: Karsten Merker To: u-boot@lists.denx.de Date: Sun, 10 Aug 2014 23:00:59 +0200 Message-Id: <1407704459-22942-2-git-send-email-merker@debian.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1407704459-22942-1-git-send-email-merker@debian.org> References: <1407704459-22942-1-git-send-email-merker@debian.org> X-Provags-ID: V02:K0:rxAR6jXg/Hudlg1nCgVLynGIrzadYt4vjeEy0IGiwuI c+G7N0wzZ6IHKRm4TrS6+6aCBU7FMQ7O79G9Q9TgZp16KZC80Q S/6+SGK6Fuxtcl2uwDjAatMwzfgQcBztAJep2X/XFKVVdc2bKb Ai4sW7mwacCyH5PyG7JRWnAaN9wj7TBJSEqWGIjowUP9yy6YxN dbQlE6QSryfQaalq+b8v+20ItS48T9pzx2VmDGCf2JVgr4a7/G 21Pk8Y59hwgL+Tw4QGRRxuv2JCJTFZ7vdibFHx34IqL9IZBdVq 2enRsdYzJwVetl8viSNvxUUTnPcNkIJdZCc36QbqMOwYpq0htm SUChfE0K+YCTkGNOJaW+gcfgevVNM9c3zdQeipUzZWKo4i2rx4 wuK4JGLgaq4GKKw9+5X73u8cj5umLF374Y= X-UI-Out-Filterresults: notjunk:1; X-Mailman-Approved-At: Mon, 11 Aug 2014 08:57:02 +0200 Cc: Karsten Merker , Ian Campbell Subject: [U-Boot] [RFC/PATCH 1/1] sunxi: Populate the default environment for sunxi-based systems X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@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