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

Koen Kooi koen at dominion.thruhere.net
Tue Feb 12 18:15:37 CET 2013


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 at dominion.thruhere.net>
---
 include/configs/am335x_evm.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;" \
-- 
1.8.1.2



More information about the U-Boot mailing list