]> git.ipfire.org Git - people/ms/u-boot.git/blame - mkconfig
* Patch by Arun Dharankar, 24 Mar 2003:
[people/ms/u-boot.git] / mkconfig
CommitLineData
7ebf7443
WD
1#!/bin/sh -e
2
3# Script to create header files and links to configure
4# U-Boot for a specific board.
5#
6# Parameters: Target Architecture CPU Board
7#
8# (C) 2002 DENX Software Engineering, Wolfgang Denk <wd@denx.de>
9#
10
11APPEND=no # Default: Create new config file
12
13while [ $# -gt 0 ] ; do
14 case "$1" in
15 --) shift ; break ;;
16 -a) shift ; APPEND=yes ;;
17 *) break ;;
18 esac
19done
20
21[ $# -lt 4 ] && exit 1
22[ $# -gt 5 ] && exit 1
23
24echo "Configuring for $1 board..."
25
26cd ./include
27
28#
29# Create link to architecture specific headers
30#
31rm -f asm
32ln -s asm-$2 asm
33rm -f asm-$2/arch
34ln -s arch-$3 asm-$2/arch
35
36#
37# Create include file for Make
38#
39echo "ARCH = $2" > config.mk
40echo "CPU = $3" >> config.mk
41echo "BOARD = $4" >> config.mk
42
43[ "$5" ] && echo "VENDOR = $5" >> config.mk
44
45#
46# Create board specific header file
47#
48if [ "$APPEND" = "yes" ] # Append to existing config file
49then
50 echo >> config.h
51else
52 > config.h # Create new config file
53fi
54echo "/* Automatically generated - do not edit */" >>config.h
55echo "#include <configs/$1.h>" >>config.h
56
57exit 0