3 # Script to create header files and links to configure
4 # X-Loader for a specific board.
6 # Parameters: Target Architecture CPU Board
8 # (C) 2004 Texas Instruments
9 # (C) 2002 DENX Software Engineering, Wolfgang Denk <wd@denx.de>
12 APPEND=no # Default: Create new config file
14 while [ $# -gt 0 ] ; do
17 -a) shift ; APPEND=yes ;;
22 [ $# -lt 4 ] && exit 1
23 [ $# -gt 5 ] && exit 1
25 echo "Configuring for $1 board..."
28 # Create link to architecture specific headers
30 if [ "$SRCTREE" != "$OBJTREE" ] ; then
31 mkdir -p ${OBJTREE}/include
35 ln -s ${SRCTREE}/include/asm/arch-$3 asm/arch
39 ln -s arch-$3 asm/arch
43 # Create include file for Make
45 echo "ARCH = $2" > config.mk
46 echo "CPU = $3" >> config.mk
47 echo "BOARD = $4" >> config.mk
49 [ "$5" ] && echo "CONFIG_HEADER = $5" >> config.mk
52 # Create board specific header file
54 if [ "$APPEND" = "yes" ] # Append to existing config file
58 > config.h # Create new config file
60 echo "/* Automatically generated - do not edit */" >>config.h
61 echo "#include <configs/$1.h>" >>config.h