U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harkin <ryan.harkin@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 08/10] vexpress64: juno: add optional initrd
Date: Fri,  9 Oct 2015 17:18:06 +0100	[thread overview]
Message-ID: <1444407488-32646-9-git-send-email-ryan.harkin@linaro.org> (raw)
In-Reply-To: <1444407488-32646-1-git-send-email-ryan.harkin@linaro.org>

Some OS images require an initrd on Juno.

If the file ramdisk.img exists in NOR flash, then we load it and pass
the address to the kernel.  Otherwise, we pass the "-" parameter as
before.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
 include/configs/vexpress_aemv8a.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index f9fa2ce..99dd8b6 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -189,6 +189,8 @@
 #define CONFIG_EXTRA_ENV_SETTINGS	\
 				"kernel_name=Image\0"	\
 				"kernel_addr=0x80000000\0" \
+				"initrd_name=ramdisk.img\0"	\
+				"initrd_addr=0x84000000\0"	\
 				"fdt_name=juno\0" \
 				"fdt_addr=0x83000000\0" \
 				"fdt_high=0xffffffffffffffff\0" \
@@ -207,7 +209,12 @@
 #define CONFIG_BOOTCOMMAND	"afs load ${kernel_name} ${kernel_addr} ; " \
 				"afs load  ${fdt_name} ${fdt_addr} ; " \
 				"fdt addr ${fdt_addr}; fdt resize; " \
-				"booti ${kernel_addr} - ${fdt_addr}"
+				"if afs load  ${initrd_name} ${initrd_addr} ; "\
+				"then "\
+				"  setenv initrd_param ${initrd_addr}; "\
+				"  else setenv initrd_param -; "\
+				"fi ; " \
+				"booti ${kernel_addr} ${initrd_param} ${fdt_addr}"
 
 #define CONFIG_BOOTDELAY		1
 
-- 
2.1.0

  parent reply	other threads:[~2015-10-09 16:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 16:17 [U-Boot] [PATCH v4 00/10] vexpress64 FVP and Juno configuration updates Ryan Harkin
2015-10-09 16:17 ` [U-Boot] [PATCH v4 01/10] vexpress64: fix checkpatch warnings Ryan Harkin
2015-10-12 15:16   ` [U-Boot] [U-Boot,v4,01/10] " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 02/10] vexpress64: Kconfig: tidy up Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot,v4,02/10] " Tom Rini
2015-10-12 16:47     ` Ryan Harkin
2015-10-12 17:56       ` Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 03/10] vexpress64: increase max gunzip size Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 04/10] vexpress64: fvp dram: add DRAM configuration Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 05/10] vexpress64: juno: add androidboot.hardware=juno Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 06/10] common/armflash: add command to check if image exists Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 07/10] common/armflash: load_image returns success or failure Ryan Harkin
2015-10-12 15:17   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` Ryan Harkin [this message]
2015-10-12 15:18   ` [U-Boot] [U-Boot, v4, 08/10] vexpress64: juno: add optional initrd Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 09/10] vexpress64: juno: add alternate kernel and device tree filenames Ryan Harkin
2015-10-12 15:18   ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-10-09 16:18 ` [U-Boot] [PATCH v4 10/10] vexpress64: juno: use /dev/sda2 Ryan Harkin
2015-10-12 15:18   ` [U-Boot] [U-Boot,v4,10/10] " Tom Rini

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=1444407488-32646-9-git-send-email-ryan.harkin@linaro.org \
    --to=ryan.harkin@linaro.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