[U-Boot] [PATCH 01/11] mkconfig: export ARCH, CPU, SOC, BOARD, VENDOR to config.h
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Wed Feb 25 07:11:08 CET 2009
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
mkconfig | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/mkconfig b/mkconfig
index b0bbbd1..5ab9c2d 100755
--- a/mkconfig
+++ b/mkconfig
@@ -62,25 +62,35 @@ if [ "$2" = "arm" ] ; then
fi
#
+# Create board specific header file
+#
+if [ "$APPEND" != "yes" ] # Append to existing config file
+then
+ > config.h # Create new config file
+fi
+
+#
# Create include file for Make
#
echo "ARCH = $2" > config.mk
+echo "#define CONFIG_ARCH $2" >> config.h
echo "CPU = $3" >> config.mk
+echo "#define CONFIG_CPU $3" >> config.h
echo "BOARD = $4" >> config.mk
+echo "#define CONFIG_BOARD $4" >> config.h
-[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk
+[ "$5" ] && [ "$5" != "NULL" ] && {
+ echo "VENDOR = $5" >> config.mk
+ echo "#define CONFIG_VENDOR $5" >> config.h
+}
-[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
-#
-# Create board specific header file
-#
-if [ "$APPEND" = "yes" ] # Append to existing config file
-then
- echo >> config.h
-else
- > config.h # Create new config file
-fi
+[ "$6" ] && [ "$6" != "NULL" ] && {
+ echo "SOC = $6" >> config.mk;
+ echo "#define CONFIG_SOC $6" >> config.h;
+}
+
+echo >> config.h
echo "/* Automatically generated - do not edit */" >>config.h
echo "#include <configs/$1.h>" >>config.h
echo "#include <asm/config.h>" >>config.h
--
1.5.6.5
More information about the U-Boot
mailing list