Commit a6862bc1 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Makefile/mkconfig: read simple board configurations from boards.cfg



Instead of adding explicit build rules for each and every board to the
top level Makefile (which makes it grow and grow), we now provide a
simple default rule and extend the "mkconfig" script to read board
configurations from a plain text file (table), "boards.cfg".

For simple boards it is now sufficient to add a single line of text to
the "boards.cfg" file, no changes to the top level Makefile are needed
any more.

To make the table better readable, change the notation for unused
fields from "NULL" into "-".
Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Mike Frysinger <vapier@gentoo.org>
parent 8c994630
This diff is collapsed.
#
# List of boards
#
# Syntax:
# white-space separated list of entries;
# each entry has the following fields:
#
# Targetname Architecture CPU Boardname Vendor SoC
#
# Unused fields can be specified as "-", or omitted if they
# are the last field on the line.
#
# Lines starting with '#' are comments.
# Blank lines are ignored.
#
# To keep the list sorted, use something like
#
# :.,$! sort -f -k2,2 -k3,3 -k6,6 -k5,5 -k1,1
#
# Target ARCH CPU Board name Vendor SoC
###########################################################################
qong arm arm1136 - davedenx mx31
mx31ads arm arm1136 - freescale mx31
ep7312 arm arm720t
impa7 arm arm720t
SMN42 arm arm720t - siemens lpc2292
evb4510 arm arm720t - - s3c4510b
a320evb arm arm920t - faraday a320
cmc_pu2 arm arm920t - - at91rm9200
csb637 arm arm920t - - at91rm9200
kb9202 arm arm920t - - at91rm9200
m501sk arm arm920t - - at91rm9200
mp2usb arm arm920t - - at91rm9200
mx1ads arm arm920t - - imx
mx1fs2 arm arm920t - - imx
scb9328 arm arm920t - - imx
cm4008 arm arm920t - - ks8695
cm41xx arm arm920t - - ks8695
VCMA9 arm arm920t vcma9 mpl s3c24x0
netstar arm arm925t
meesc arm arm926ejs - esd at91
otc570 arm arm926ejs - esd at91
pm9261 arm arm926ejs - ronetix at91
pm9263 arm arm926ejs - ronetix at91
suen3 arm arm926ejs km_arm keymile kirkwood
rd6281a arm arm926ejs - Marvell kirkwood
mx51evk arm arm_cortexa8 mx51evk freescale mx51
actux1 arm ixp
actux2 arm ixp
actux3 arm ixp
actux4 arm ixp
ixdp425 arm ixp
cerf250 arm pxa
cradle arm pxa
csb226 arm pxa
delta arm pxa
innokom arm pxa
logodl arm pxa
lubbock arm pxa
pleb2 arm pxa
xaeniax arm pxa
xm250 arm pxa
B2 arm s3c44b0 - dave
assabet arm sa1100
dnp1110 arm sa1100
gcplus arm sa1100
lart arm sa1100
shannon arm sa1100
mimc200 avr32 at32ap - mimc at32ap700x
eNET i386 i386 - - sc520
idmr m68k mcf52x2
TASREG m68k mcf52x2 tasreg esd
M5272C3 m68k mcf52x2 m5272c3 freescale
EP2500 m68k mcf52x2 ep2500 Mercury
purple mips mips
tb0229 mips mips
EP1C20 nios2 nios2 ep1c20 altera
EP1S10 nios2 nios2 ep1s10 altera
EP1S40 nios2 nios2 ep1s40 altera
PCI5441 nios2 nios2 pci5441 psyent
PK1C20 nios2 nios2 pk1c20 psyent
P3G4 powerpc 74xx_7xx evb64260
ppmc7xx powerpc 74xx_7xx
ZUMA powerpc 74xx_7xx evb64260
BAB7xx powerpc 74xx_7xx bab7xx eltec
ELPPC powerpc 74xx_7xx elppc eltec
CPCI750 powerpc 74xx_7xx cpci750 esd
DB64360 powerpc 74xx_7xx db64360 Marvell
DB64460 powerpc 74xx_7xx db64460 Marvell
aria powerpc mpc512x - davedenx
PATI powerpc mpc5xx pati mpl
BC3450 powerpc mpc5xxx bc3450
canmb powerpc mpc5xxx
cm5200 powerpc mpc5xxx
hmi1001 powerpc mpc5xxx
inka4x0 powerpc mpc5xxx
ipek01 powerpc mpc5xxx
jupiter powerpc mpc5xxx
mucmc52 powerpc mpc5xxx
munices powerpc mpc5xxx
o2dnt powerpc mpc5xxx
uc101 powerpc mpc5xxx
v38b powerpc mpc5xxx
pf5200 powerpc mpc5xxx - esd
aev powerpc mpc5xxx tqm5200 tqc
smmaco4 powerpc mpc5xxx tqm5200 tqc
spieval powerpc mpc5xxx tqm5200 tqc
sorcery powerpc mpc8220
A3000 powerpc mpc824x a3000
barco powerpc mpc824x
BMW powerpc mpc824x bmw
CU824 powerpc mpc824x cu824
MOUSSE powerpc mpc824x mousse
MUSENKI powerpc mpc824x musenki
MVBLUE powerpc mpc824x mvblue
OXC powerpc mpc824x oxc
PN62 powerpc mpc824x pn62
sbc8240 powerpc mpc824x
utx8245 powerpc mpc824x
debris powerpc mpc824x - etin
kvme080 powerpc mpc824x - etin
atc powerpc mpc8260
ep8260 powerpc mpc8260
ep82xxm powerpc mpc8260
gw8260 powerpc mpc8260
hymod powerpc mpc8260
IDS8247 powerpc mpc8260 ids8247
sacsng powerpc mpc8260
sbc8260 powerpc mpc8260
ZPC1900 powerpc mpc8260 zpc1900
mgcoge powerpc mpc8260 - keymile
SCM powerpc mpc8260 - siemens
TQM8272 powerpc mpc8260 tqm8272 tqc
kmeter1 powerpc mpc83xx kmeter1 keymile
MVBLM7 powerpc mpc83xx mvblm7 matrix_vision
TQM834x powerpc mpc83xx tqm834x tqc
PM854 powerpc mpc85xx pm854
PM856 powerpc mpc85xx pm856
stxgp3 powerpc mpc85xx stxgp3 stx
c2mon powerpc mpc8xx
EP88x powerpc mpc8xx ep88x
ETX094 powerpc mpc8xx etx094
FLAGADM powerpc mpc8xx flagadm
GENIETV powerpc mpc8xx genietv
GTH powerpc mpc8xx gth
hermes powerpc mpc8xx
IP860 powerpc mpc8xx ip860
LANTEC powerpc mpc8xx lantec
lwmon powerpc mpc8xx
NX823 powerpc mpc8xx nx823
quantum powerpc mpc8xx
R360MPI powerpc mpc8xx r360mpi
RBC823 powerpc mpc8xx rbc823
rmu powerpc mpc8xx
RPXlite powerpc mpc8xx
spc1920 powerpc mpc8xx
uc100 powerpc mpc8xx
MHPC powerpc mpc8xx mhpc eltec
TOP860 powerpc mpc8xx top860 emk
kmsupx4 powerpc mpc8xx km8xx keymile
mgsuvd powerpc mpc8xx km8xx keymile
KUP4K powerpc mpc8xx kup4k kup
KUP4X powerpc mpc8xx kup4k kup
ELPT860 powerpc mpc8xx elpt860 LEOX
CCM powerpc mpc8xx - siemens
IAD210 powerpc mpc8xx - siemens
pcu_e powerpc mpc8xx - siemens
QS823 powerpc mpc8xx qs850 snmc
QS850 powerpc mpc8xx qs850 snmc
QS860T powerpc mpc8xx qs860t snmc
stxxtc powerpc mpc8xx stxxtc stx
HMI10 powerpc mpc8xx tqm8xx tqc
SM850 powerpc mpc8xx tqm8xx tqc
AMX860 powerpc mpc8xx amx860 westel
csb272 powerpc ppc4xx
csb472 powerpc ppc4xx
ERIC powerpc ppc4xx eric
G2000 powerpc ppc4xx g2000
JSE powerpc ppc4xx jse
korat powerpc ppc4xx
lwmon5 powerpc ppc4xx
ML2 powerpc ppc4xx
sbc405 powerpc ppc4xx
sc3 powerpc ppc4xx
zeus powerpc ppc4xx
acadia powerpc ppc4xx - amcc
bamboo powerpc ppc4xx - amcc
bubinga powerpc ppc4xx - amcc
ebony powerpc ppc4xx - amcc
katmai powerpc ppc4xx - amcc
luan powerpc ppc4xx - amcc
makalu powerpc ppc4xx - amcc
ocotea powerpc ppc4xx - amcc
redwood powerpc ppc4xx - amcc
taihu powerpc ppc4xx - amcc
taishan powerpc ppc4xx - amcc
yucca powerpc ppc4xx - amcc
AP1000 powerpc ppc4xx ap1000 amirix
CRAYL1 powerpc ppc4xx L1 cray
ADCIOP powerpc ppc4xx adciop esd
APC405 powerpc ppc4xx apc405 esd
AR405 powerpc ppc4xx ar405 esd
ASH405 powerpc ppc4xx ash405 esd
CANBT powerpc ppc4xx canbt esd
CMS700 powerpc ppc4xx cms700 esd
CPCI2DP powerpc ppc4xx cpci2dp esd
DP405 powerpc ppc4xx dp405 esd
DU405 powerpc ppc4xx du405 esd
DU440 powerpc ppc4xx du440 esd
HH405 powerpc ppc4xx hh405 esd
HUB405 powerpc ppc4xx hub405 esd
PCI405 powerpc ppc4xx pci405 esd
PLU405 powerpc ppc4xx plu405 esd
PMC405 powerpc ppc4xx pmc405 esd
PMC440 powerpc ppc4xx pmc440 esd
VOH405 powerpc ppc4xx voh405 esd
VOM405 powerpc ppc4xx vom405 esd
WUH405 powerpc ppc4xx wuh405 esd
neo powerpc ppc4xx - gdsys
icon powerpc ppc4xx - mosaixtech
MIP405 powerpc ppc4xx mip405 mpl
PIP405 powerpc ppc4xx pip405 mpl
alpr powerpc ppc4xx - prodrive
p3p440 powerpc ppc4xx - prodrive
KAREF powerpc ppc4xx karef sandburst
grsim sparc leon3 - gaisler
imx31_litekit arm arm1136 - logicpd mx31
omap2420h4 arm arm1136 - ti omap24xx
armadillo arm arm720t
modnet50 arm arm720t
lpc2292sodimm arm arm720t - - lpc2292
eb_cpux9k2 arm arm920t - BuS at91
at91rm9200dk arm arm920t - atmel at91rm9200
at91rm9200ek arm arm920t - atmel at91rm9200
sbc2410x arm arm920t - - s3c24x0
smdk2400 arm arm920t - samsung s3c24x0
smdk2410 arm arm920t - samsung s3c24x0
voiceblue arm arm925t
omap1510inn arm arm925t - ti
at91cap9adk arm arm926ejs - atmel at91
afeb9260 arm arm926ejs - - at91
guruplug arm arm926ejs - Marvell kirkwood
mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood
openrd_base arm arm926ejs - Marvell kirkwood
sheevaplug arm arm926ejs - Marvell kirkwood
imx27lite arm arm926ejs imx27lite logicpd mx27
magnesium arm arm926ejs imx27lite logicpd mx27
omap5912osk arm arm926ejs - ti omap
omap3_zoom1 arm arm_cortexa8 zoom1 logicpd omap3
omap3_zoom2 arm arm_cortexa8 zoom2 logicpd omap3
omap3_overo arm arm_cortexa8 overo - omap3
omap3_pandora arm arm_cortexa8 pandora - omap3
omap3_beagle arm arm_cortexa8 beagle ti omap3
omap3_evm arm arm_cortexa8 evm ti omap3
omap3_sdp3430 arm arm_cortexa8 sdp3430 ti omap3
devkit8000 arm arm_cortexa8 devkit8000 timll omap3
smdkc100 arm arm_cortexa8 smdkc100 samsung s5pc1xx
ixdpg425 arm ixp
lpd7a400 arm lh7a40x lpd7a40x
lpd7a404 arm lh7a40x lpd7a40x
pxa255_idp arm pxa
wepep250 arm pxa
xsengine arm pxa
zylonite arm pxa
atngw100 avr32 at32ap - atmel at32ap700x
atstk1002 avr32 at32ap atstk1000 atmel at32ap700x
atstk1003 avr32 at32ap atstk1000 atmel at32ap700x
atstk1004 avr32 at32ap atstk1000 atmel at32ap700x
atstk1006 avr32 at32ap atstk1000 atmel at32ap700x
favr-32-ezkit avr32 at32ap - earthlcd at32ap700x
hammerhead avr32 at32ap - miromico at32ap700x
bf518f-ezbrd blackfin blackfin
bf526-ezbrd blackfin blackfin
bf527-ezkit blackfin blackfin
bf533-ezkit blackfin blackfin
bf533-stamp blackfin blackfin
bf537-minotaur blackfin blackfin
bf537-pnav blackfin blackfin
bf537-srv1 blackfin blackfin
bf537-stamp blackfin blackfin
bf538f-ezkit blackfin blackfin
bf548-ezkit blackfin blackfin
bf561-acvilon blackfin blackfin
bf561-ezkit blackfin blackfin
blackstamp blackfin blackfin
cm-bf527 blackfin blackfin
cm-bf533 blackfin blackfin
cm-bf537e blackfin blackfin
cm-bf537u blackfin blackfin
cm-bf548 blackfin blackfin
cm-bf561 blackfin blackfin
ibf-dsp561 blackfin blackfin
ip04 blackfin blackfin
tcm-bf518 blackfin blackfin
tcm-bf537 blackfin blackfin
sc520_cdp i386 i386 - - sc520
sc520_spunk i386 i386 - - sc520
sc520_spunk_rel i386 i386 sc520_spunk_rel - sc520
M5208EVBE m68k mcf52x2 m5208evbe freescale
M5249EVB m68k mcf52x2 m5249evb freescale
M5253DEMO m68k mcf52x2 m5253demo freescale
M5253EVBE m68k mcf52x2 m5253evbe freescale
M5271EVB m68k mcf52x2 m5271evb freescale
M5275EVB m68k mcf52x2 m5275evb freescale
M5282EVB m68k mcf52x2 m5282evb freescale
M53017EVB m68k mcf52x2 m53017evb freescale
microblaze-generic microblaze microblaze microblaze-generic xilinx
mpc7448hpc2 powerpc 74xx_7xx mpc7448hpc2 freescale
AmigaOneG3SE powerpc 74xx_7xx AmigaOneG3SE MAI
pdm360ng powerpc mpc512x
mecp5123 powerpc mpc512x - esd
cmi_mpc5xx powerpc mpc5xx cmi
motionpro powerpc mpc5xxx
cpci5200 powerpc mpc5xxx - esd
mecp5200 powerpc mpc5xxx - esd
Alaska8220 powerpc mpc8220 alaska
Yukon8220 powerpc mpc8220 alaska
HIDDEN_DRAGON powerpc mpc824x hidden_dragon
IPHASE4539 powerpc mpc8260 iphase4539
ppmc8260 powerpc mpc8260
RPXsuper powerpc mpc8260 rpxsuper
rsdproto powerpc mpc8260
MPC8266ADS powerpc mpc8260 mpc8266ads freescale
MPC8323ERDB powerpc mpc83xx mpc8323erdb freescale
MPC8349EMDS powerpc mpc83xx mpc8349emds freescale
MPC837XERDB powerpc mpc83xx mpc837xerdb freescale
ATUM8548 powerpc mpc85xx atum8548
socrates powerpc mpc85xx socrates
MPC8540ADS powerpc mpc85xx mpc8540ads freescale
MPC8544DS powerpc mpc85xx mpc8544ds freescale
MPC8560ADS powerpc mpc85xx mpc8560ads freescale
MPC8568MDS powerpc mpc85xx mpc8568mds freescale
XPEDITE5200 powerpc mpc85xx xpedite5200 xes
XPEDITE5370 powerpc mpc85xx xpedite5370 xes
sbc8641d powerpc mpc86xx
MPC8610HPCD powerpc mpc86xx mpc8610hpcd freescale
XPEDITE5170 powerpc mpc86xx xpedite5170 xes
cogent_mpc8xx powerpc mpc8xx cogent
ESTEEM192E powerpc mpc8xx esteem192e
RPXClassic powerpc mpc8xx
RRvision powerpc mpc8xx
svm_sc8xx powerpc mpc8xx
pcs440ep powerpc ppc4xx
quad100hd powerpc ppc4xx
dlvision powerpc ppc4xx - gdsys
gdppc440etx powerpc ppc4xx - gdsys
CPCIISER4 powerpc ppc4xx cpciiser4 esd
DASA_SIM powerpc ppc4xx dasa_sim esd
PMC405DE powerpc ppc4xx pmc405de esd
METROBOX powerpc ppc4xx metrobox sandburst
XPEDITE1000 powerpc ppc4xx xpedite1000 xes
grsim_leon2 sparc leon2 - gaisler
gr_cpci_ax2000 sparc leon3 - gaisler
gr_ep2s60 sparc leon3 - gaisler
gr_xc3s_1500 sparc leon3 - gaisler
......@@ -12,6 +12,24 @@ APPEND=no # Default: Create new config file
BOARD_NAME="" # Name to print in make output
TARGETS=""
arch=""
cpu=""
board=""
vendor=""
soc=""
if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then
# Automatic mode
line=`egrep -i "^[[:space:]]*${2}[[:space:]]" boards.cfg` || {
echo "make: *** No rule to make target \`$2_config'. Stop." >&2
exit 1
}
set ${line}
# add default board name if needed
[ $# = 3 ] && set ${line} ${1}
fi
while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
......@@ -22,13 +40,25 @@ while [ $# -gt 0 ] ; do
esac
done
[ "${BOARD_NAME}" ] || BOARD_NAME="${1%_config}"
[ $# -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
CONFIG_NAME="${1%_config}"
[ "${BOARD_NAME}" ] || BOARD_NAME="${CONFIG_NAME}"
arch="$2"
cpu="$3"
if [ "$4" = "-" ] ; then
board=${BOARD_NAME}
else
board="$4"
fi
[ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5"
[ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6"
if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then
echo "Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME}" 1>&2
exit 1
fi
......@@ -42,26 +72,26 @@ if [ "$SRCTREE" != "$OBJTREE" ] ; then
mkdir -p ${OBJTREE}/include2
cd ${OBJTREE}/include2
rm -f asm
ln -s ${SRCTREE}/arch/$2/include/asm asm
LNPREFIX=${SRCTREE}/arch/$2/include/asm/
ln -s ${SRCTREE}/arch/${arch}/include/asm asm
LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
cd ../include
rm -f asm
ln -s ${SRCTREE}/arch/$2/include/asm asm
ln -s ${SRCTREE}/arch/${arch}/include/asm asm
else
cd ./include
rm -f asm
ln -s ../arch/$2/include/asm asm
ln -s ../arch/${arch}/include/asm asm
fi
rm -f asm/arch
if [ -z "$6" -o "$6" = "NULL" ] ; then
ln -s ${LNPREFIX}arch-$3 asm/arch
if [ -z "${soc}" ] ; then
ln -s ${LNPREFIX}arch-${cpu} asm/arch
else
ln -s ${LNPREFIX}arch-$6 asm/arch
ln -s ${LNPREFIX}arch-${soc} asm/arch
fi
if [ "$2" = "arm" ] ; then
if [ "${arch}" = "arm" ] ; then
rm -f asm/proc
ln -s ${LNPREFIX}proc-armv asm/proc
fi
......@@ -69,19 +99,19 @@ fi
#
# Create include file for Make
#
echo "ARCH = $2" > config.mk
echo "CPU = $3" >> config.mk
echo "BOARD = $4" >> config.mk
echo "ARCH = ${arch}" > config.mk
echo "CPU = ${cpu}" >> config.mk
echo "BOARD = ${board}" >> config.mk
[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk
[ "${vendor}" ] && echo "VENDOR = ${vendor}" >> config.mk
[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
[ "${soc}" ] && echo "SOC = ${soc}" >> config.mk
# Assign board directory to BOARDIR variable
if [ -z "$5" -o "$5" = "NULL" ] ; then
BOARDDIR=$4
if [ -z "${vendor}" ] ; then
BOARDDIR=${board}
else
BOARDDIR=$5/$4
BOARDDIR=${vendor}/${board}
fi
#
......@@ -102,7 +132,7 @@ done
cat << EOF >> config.h
#define CONFIG_BOARDDIR board/$BOARDDIR
#include <config_defaults.h>
#include <configs/${BOARDNAME}.h>
#include <configs/${CONFIG_NAME}.h>
#include <asm/config.h>
EOF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment