Patchwork [U-Boot,v2,3/3] am335x-evm: switch to DT boot

login
register
mail settings
Submitter Koen Kooi
Date Feb. 12, 2013, 5:15 p.m.
Message ID <1360689337-20947-3-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/219924/
State Deferred
Delegated to: Tom Rini
Headers show

Comments

Koen Kooi - Feb. 12, 2013, 5:15 p.m.
The findfdt method is being used to locate the right .dtb for the board and load it from /boot.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 include/configs/am335x_evm.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Peter Korsgaard - Feb. 17, 2013, 8:08 p.m.
>>>>> "Koen" == Koen Kooi <koen@dominion.thruhere.net> writes:

 Koen> The findfdt method is being used to locate the right .dtb for the
 Koen> board and load it from /boot.

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 951422c..67f04c4 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -79,7 +79,7 @@ 
 	"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
-		"bootm ${loadaddr}\0" \
+		"bootm ${loadaddr} - ${fdtaddr}\0" \
 	"ramboot=echo Booting from ramdisk ...; " \
 		"run ramargs; " \
 		"bootm ${loadaddr}\0" \
@@ -93,7 +93,9 @@ 
 		"if test $board_name = A335X_SK; then " \
 			"setenv fdtfile am335x-evmsk.dtb; fi\0" \
 
+
 #define CONFIG_BOOTCOMMAND \
+	"run findfdt; " \
 	"mmc dev ${mmcdev}; if mmc rescan; then " \
 		"echo SD/MMC found on device ${mmcdev};" \
 		"if run loadbootenv; then " \
@@ -105,6 +107,7 @@ 
 			"run uenvcmd;" \
 		"fi;" \
 		"if run loaduimage; then " \
+			"ext2load mmc ${mmcdev}:2 ${fdtaddr} /boot/${fdtfile}; " \
 			"run mmcboot;" \
 		"fi;" \
 	"fi;" \