aboutsummaryrefslogtreecommitdiff
path: root/mkconfig
diff options
context:
space:
mode:
authorStephen Warren2012-05-22 09:21:54 +0000
committerAlbert ARIBAUD (U-Boot)2012-07-09 22:44:33 +0200
commit5e724ca2b65cea97a5945b163c765427a7ebf3d1 (patch)
treecf173d7b7d648d6a8ad3ed9424898d83667d32d6 /mkconfig
parentf857fff6068fe36a327a0ff6d837412caaf2e07d (diff)
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 <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'mkconfig')
-rwxr-xr-xmkconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/mkconfig b/mkconfig
index daa1810e72f..801f9212965 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 <config_cmd_defaults.h>