OMAP3: X-Loader: Make MMC register macros volatile
[x-load.git] / mkconfig
blob43b6f09fce53caba9934e7dbce91fe0cb0c4c611
1 #!/bin/sh -e
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
15 case "$1" in
16 --) shift ; break ;;
17 -a) shift ; APPEND=yes ;;
18 *) break ;;
19 esac
20 done
22 [ $# -lt 4 ] && exit 1
23 [ $# -gt 5 ] && exit 1
25 echo "Configuring for $1 board..."
27 cd ./include
30 # Create link to architecture specific headers
32 rm -f asm/arch
33 ln -s arch-$3 asm/arch
35 if [ "$2" = "arm" ] ; then
36 rm -f asm/proc
37 ln -s proc-armv asm/proc
41 # Create include file for Make
43 echo "ARCH = $2" > config.mk
44 echo "CPU = $3" >> config.mk
45 echo "BOARD = $4" >> config.mk
47 [ "$5" ] && echo "VENDOR = $5" >> config.mk
50 # Create board specific header file
52 if [ "$APPEND" = "yes" ] # Append to existing config file
53 then
54 echo >> config.h
55 else
56 > config.h # Create new config file
58 echo "/* Automatically generated - do not edit */" >>config.h
59 echo "#include <configs/$1.h>" >>config.h
61 exit 0