public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/10] am335x_evm: Bring in 'boot_fdt' logic from i.MX
Date: Fri,  2 Aug 2013 16:26:11 -0400	[thread overview]
Message-ID: <1375475175-5073-7-git-send-email-trini@ti.com> (raw)
In-Reply-To: <1375475175-5073-1-git-send-email-trini@ti.com>

Bring in the 'boot_fdt' environment variable that i.MX boards use to try
and load a device tree when booting.

Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/am335x_evm.h |   21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7d755f1..85c4632 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -84,6 +84,7 @@
 	"loadaddr=0x80200000\0" \
 	"fdtaddr=0x80F80000\0" \
 	"fdt_high=0xffffffff\0" \
+	"boot_fdt=try\0" \
 	"rdaddr=0x81000000\0" \
 	"bootdir=/boot\0" \
 	"bootfile=uImage\0" \
@@ -131,6 +132,20 @@
 	"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
 	"loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+	"mmcloados=run mmcargs; " \
+		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+			"if run loadfdt; then " \
+				"bootm ${loadaddr} - ${fdtaddr}; " \
+			"else " \
+				"if test ${boot_fdt} = try; then " \
+					"bootm; " \
+				"else " \
+					"echo WARN: Cannot load the DT; " \
+				"fi; " \
+			"fi; " \
+		"else " \
+			"bootm; " \
+		"fi;\0" \
 	"mmcboot=mmc dev ${mmcdev}; " \
 		"if mmc rescan; then " \
 			"echo SD/MMC found on device ${mmcdev};" \
@@ -142,11 +157,7 @@
 				"echo Running uenvcmd ...;" \
 				"run uenvcmd;" \
 			"fi;" \
-			"if run loaduimage; then " \
-				"run loadfdt;" \
-				"run mmcargs; " \
-				"bootm ${loadaddr} - ${fdtaddr};" \
-			"fi;" \
+			"run mmcloados;" \
 		"fi;\0" \
 	"spiboot=echo Booting from spi ...; " \
 		"run spiargs; " \
-- 
1.7.9.5

  parent reply	other threads:[~2013-08-02 20:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 20:26 [U-Boot] [PATCH 00/10] Introduce common config file for TI ARMv7 platforms Tom Rini
2013-08-02 20:26 ` [U-Boot] [PATCH 01/10] am33xx: Move V_OSCK/V_SCLK to <asm/arch-am33xx/clocks_am33xx.h> Tom Rini
2013-08-03  4:41   ` Heiko Schocher
2013-08-05 15:17     ` Tom Rini
2013-08-05 15:26       ` Lars Poeschel
2013-08-05 15:40         ` Tom Rini
2013-08-05 15:53           ` Tom Rini
2013-08-02 20:26 ` [U-Boot] [PATCH 02/10] am33xx: CONFIG_DMA_COHERENT defines are unused, remove Tom Rini
2013-08-06 18:25   ` Dan Murphy
2013-08-02 20:26 ` [U-Boot] [PATCH 03/10] am33xx: Stop using PHYS_DRAM_1 define Tom Rini
2013-08-02 20:26 ` [U-Boot] [PATCH 04/10] am335x_evm: Use default baud rate table Tom Rini
2013-08-02 20:26 ` [U-Boot] [PATCH 05/10] arm: spl: For Falcon Mode, set a default machid of ~0 Tom Rini
2013-08-05  3:53   ` Heiko Schocher
2013-08-06 18:28   ` Dan Murphy
2013-08-06 19:10     ` Tom Rini
2013-08-06 20:03       ` Dan Murphy
2013-08-02 20:26 ` Tom Rini [this message]
2013-08-02 20:26 ` [U-Boot] [PATCH 07/10] TI:am33xx: Create common config files for TI ARMv7 platforms, and AM33xx Tom Rini
2013-08-06 18:33   ` Dan Murphy
2013-08-06 19:11     ` Tom Rini
2013-08-02 20:26 ` [U-Boot] [PATCH 08/10] TI:omap5: Convert to ti_armv7_common.h Tom Rini
2013-08-06 18:37   ` Dan Murphy
2013-08-06 19:13     ` Tom Rini
2013-08-06 19:24       ` Dan Murphy
2013-08-06 18:38   ` Dan Murphy
2013-08-02 20:26 ` [U-Boot] [PATCH 09/10] TI:armv7: Enable CONFIG_CMD_SPI Tom Rini
2013-08-06 18:34   ` Dan Murphy
2013-08-06 18:50     ` Jagan Teki
2013-08-06 18:55       ` Jagan Teki
2013-08-06 19:03         ` Tom Rini
2013-08-06 19:10           ` Jagan Teki
2013-08-02 20:26 ` [U-Boot] [PATCH 10/10] TI:armv7: Enable CONFIG_CMD_GPIO Tom Rini
2013-08-06 18:34   ` Dan Murphy
2013-08-03  4:51 ` [U-Boot] [PATCH 00/10] Introduce common config file for TI ARMv7 platforms Heiko Schocher
2013-08-05 15:39   ` 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=1375475175-5073-7-git-send-email-trini@ti.com \
    --to=trini@ti.com \
    --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