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>
diff --git a/mkconfig b/mkconfig
index daa1810..801f921 100755
--- a/mkconfig
+++ b/mkconfig
@@ -161,6 +161,14 @@
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>