U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karsten Merker <merker@debian.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC/PATCH 1/1] sunxi: Populate the default environment for sunxi-based systems
Date: Sun, 10 Aug 2014 23:00:59 +0200	[thread overview]
Message-ID: <1407704459-22942-2-git-send-email-merker@debian.org> (raw)
In-Reply-To: <1407704459-22942-1-git-send-email-merker@debian.org>

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
 
-- 
1.7.10.4

  reply	other threads:[~2014-08-10 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 21:00 [U-Boot] [RFC/PATCH] sunxi: Populate the default environment for sunxi-based systems Karsten Merker
2014-08-10 21:00 ` Karsten Merker [this message]
2014-08-11 16:22 ` Hans de Goede
2014-08-11 20:13   ` Karsten Merker
2014-08-18 16:54     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407704459-22942-2-git-send-email-merker@debian.org \
    --to=merker@debian.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox