From 5e724ca2b65cea97a5945b163c765427a7ebf3d1 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 22 May 2012 09:21:54 +0000 Subject: Add env vars describing U-Boot target board This can be useful for generic scripts. For example, rather than hard- coding a script to ext2load tegra-harmony.dtb, it could load ${soc}-${board}.dtb and hence not need adjustments to run on multiple boards. Signed-off-by: Stephen Warren Acked-by: Simon Glass Signed-off-by: Tom Warren --- mkconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mkconfig') diff --git a/mkconfig b/mkconfig index daa1810e72..801f921296 100755 --- a/mkconfig +++ b/mkconfig @@ -161,6 +161,14 @@ for i in ${TARGETS} ; do echo "#define CONFIG_${i}" >>config.h ; done +echo "#define CONFIG_SYS_ARCH \"${arch}\"" >> config.h +echo "#define CONFIG_SYS_CPU \"${cpu}\"" >> config.h +echo "#define CONFIG_SYS_BOARD \"${board}\"" >> config.h + +[ "${vendor}" ] && echo "#define CONFIG_SYS_VENDOR \"${vendor}\"" >> config.h + +[ "${soc}" ] && echo "#define CONFIG_SYS_SOC \"${soc}\"" >> config.h + cat << EOF >> config.h #define CONFIG_BOARDDIR board/$BOARDDIR #include -- cgit