projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: Kirkwood_egiga.c bugfixes for rx path
[oweals/u-boot.git]
/
mkconfig
diff --git
a/mkconfig
b/mkconfig
index b0bbbd1e7f41fb0ecdf6918b306680d91b647994..d3109e412c4b7837d57b5b8971410d7c013fa7ca 100755
(executable)
--- a/
mkconfig
+++ b/
mkconfig
@@
-10,12
+10,14
@@
APPEND=no # Default: Create new config file
BOARD_NAME="" # Name to print in make output
APPEND=no # Default: Create new config file
BOARD_NAME="" # Name to print in make output
+TARGETS=""
while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
+ -t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
*) break ;;
esac
done
*) break ;;
esac
done
@@
-25,6
+27,11
@@
done
[ $# -lt 4 ] && exit 1
[ $# -gt 6 ] && exit 1
[ $# -lt 4 ] && exit 1
[ $# -gt 6 ] && exit 1
+if [ "${ARCH}" -a "${ARCH}" != "$2" ]; then
+ echo "Failed: \$ARCH=${ARCH}, should be '$2' for ${BOARD_NAME}" 1>&2
+ exit 1
+fi
+
echo "Configuring for ${BOARD_NAME} board..."
#
echo "Configuring for ${BOARD_NAME} board..."
#
@@
-35,30
+42,28
@@
if [ "$SRCTREE" != "$OBJTREE" ] ; then
mkdir -p ${OBJTREE}/include2
cd ${OBJTREE}/include2
rm -f asm
mkdir -p ${OBJTREE}/include2
cd ${OBJTREE}/include2
rm -f asm
- ln -s ${SRCTREE}/
include/asm-$2
asm
- LNPREFIX=
"../../include2/asm/"
+ ln -s ${SRCTREE}/
arch/$2/include/asm
asm
+ LNPREFIX=
${SRCTREE}/arch/$2/include/asm/
cd ../include
cd ../include
- rm -rf asm-$2
rm -f asm
rm -f asm
- mkdir asm-$2
- ln -s asm-$2 asm
+ ln -s ${SRCTREE}/arch/$2/include/asm asm
else
cd ./include
rm -f asm
else
cd ./include
rm -f asm
- ln -s
asm-$2
asm
+ ln -s
../arch/$2/include/asm
asm
fi
fi
-rm -f asm
-$2
/arch
+rm -f asm/arch
if [ -z "$6" -o "$6" = "NULL" ] ; then
if [ -z "$6" -o "$6" = "NULL" ] ; then
- ln -s ${LNPREFIX}arch-$3 asm
-$2
/arch
+ ln -s ${LNPREFIX}arch-$3 asm/arch
else
else
- ln -s ${LNPREFIX}arch-$6 asm
-$2
/arch
+ ln -s ${LNPREFIX}arch-$6 asm/arch
fi
if [ "$2" = "arm" ] ; then
fi
if [ "$2" = "arm" ] ; then
- rm -f asm
-$2
/proc
- ln -s ${LNPREFIX}proc-armv asm
-$2
/proc
+ rm -f asm/proc
+ ln -s ${LNPREFIX}proc-armv asm/proc
fi
#
fi
#
@@
-72,6
+77,13
@@
echo "BOARD = $4" >> config.mk
[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
+# Assign board directory to BOARDIR variable
+if [ -z "$5" -o "$5" = "NULL" ] ; then
+ BOARDDIR=$4
+else
+ BOARDDIR=$5/$4
+fi
+
#
# Create board specific header file
#
#
# Create board specific header file
#
@@
-82,7
+94,16
@@
else
> config.h # Create new config file
fi
echo "/* Automatically generated - do not edit */" >>config.h
> config.h # Create new config file
fi
echo "/* Automatically generated - do not edit */" >>config.h
-echo "#include <configs/$1.h>" >>config.h
-echo "#include <asm/config.h>" >>config.h
+
+for i in ${TARGETS} ; do
+ echo "#define CONFIG_MK_${i} 1" >>config.h ;
+done
+
+cat << EOF >> config.h
+#define CONFIG_BOARDDIR board/$BOARDDIR
+#include <config_defaults.h>
+#include <configs/$1.h>
+#include <asm/config.h>
+EOF
exit 0
exit 0