summaryrefslogtreecommitdiff
path: root/include/configs/at91-sama5_common.h
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2015-08-19 11:11:19 (GMT)
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-08-21 13:47:04 (GMT)
commit89a3658ac02873f32d7ad0a3b1d3c5308c5e2528 (patch)
tree74fee6fea163498a5ad21021461edcf3388bd676 /include/configs/at91-sama5_common.h
parent372ca03fcd3cc777677d683336e9965c02fc42f2 (diff)
downloadu-boot-89a3658ac02873f32d7ad0a3b1d3c5308c5e2528.tar.xz
ARM: at91: sama5d3xek: use a $dtb_name to load dtb
Since sama5d3xek boards has different type of dtb blobs, so we need to detect the cpu type in runtime. So we add a new variable $dtb_name. if $dtb_name is not defined, we just use at91-${board_name}.dtb as the $dtb_name. Otherwise, we will just load the dtb with $dtb_name. For sama5d3xek, we will detect cpu type and make up $dtb_name in runtime. Signed-off-by: Josh Wu <josh.wu@atmel.com>
Diffstat (limited to 'include/configs/at91-sama5_common.h')
-rw-r--r--include/configs/at91-sama5_common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h
index bb737a1..0fe0852 100644
--- a/include/configs/at91-sama5_common.h
+++ b/include/configs/at91-sama5_common.h
@@ -61,7 +61,10 @@
#define FAT_ENV_FILE "uboot.env"
#define CONFIG_ENV_SIZE 0x4000
-#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 at91-${board_name}.dtb; " \
+#define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \
+ "setenv dtb_name at91-${board_name}.dtb; " \
+ "fi; " \
+ "fatload mmc 0:1 0x21000000 ${dtb_name}; " \
"fatload mmc 0:1 0x22000000 zImage; " \
"bootz 0x22000000 - 0x21000000"
#define CONFIG_BOOTARGS \