-#!/bin/sh
+#!/bin/bash
+
+# Print statistics when we exit
+trap exit 1 2 3 15
+trap print_stats 0
# Determine number of CPU cores if no default was set
: ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
if [ "$BUILD_NCPUS" -gt 1 ]
then
- JOBS=-j`expr "$BUILD_NCPUS" + 1`
+ JOBS="-j $((BUILD_NCPUS + 1))"
else
JOBS=""
fi
LIST=""
+# Keep track of the number of builds and errors
+ERR_CNT=0
+ERR_LIST=""
+TOTAL_CNT=0
+RC=0
+
#########################################################################
## MPC5xx Systems
#########################################################################
digsy_mtc \
EVAL5200 \
fo300 \
+ galaxy5200 \
icecube_5100 \
icecube_5200 \
inka4x0 \
+ ipek01 \
lite5200b \
mcc200 \
mecp5200 \
munices \
MVBC_P \
o2dnt \
+ pcm030 \
pf5200 \
PM520 \
TB5200 \
csb272 \
csb472 \
DASA_SIM \
+ devconcenter \
+ dlvision \
DP405 \
DU405 \
DU440 \
hcu5 \
HH405 \
HUB405 \
+ intip \
JSE \
KAREF \
katmai \
PIP405 \
PLU405 \
PMC405 \
+ PMC405DE \
PMC440 \
PPChameleonEVB \
quad100hd \
WUH405 \
xilinx-ppc440-generic \
xilinx-ppc440-generic_flash \
- XPEDITE1K \
+ XPEDITE1000 \
yellowstone \
yosemite \
yucca \
#########################################################################
LIST_83xx=" \
+ caddy2 \
kmeter1 \
MPC8313ERDB_33 \
MPC8313ERDB_NAND_66 \
MPC8315ERDB \
+ MPC8315ERDB_NAND \
MPC8323ERDB \
MPC832XEMDS \
MPC832XEMDS_ATM \
sbc8349 \
SIMPC8313_LP \
TQM834x \
+ vme8349 \
"
LIST_85xx=" \
ATUM8548 \
MPC8536DS \
+ MPC8536DS_NAND \
+ MPC8536DS_SDCARD \
+ MPC8536DS_SPIFLASH \
MPC8540ADS \
MPC8540EVAL \
MPC8541CDS \
MPC8572DS_36BIT \
P2020DS \
P2020DS_36BIT \
+ P1011RDB \
+ P1011RDB_NAND \
+ P1011RDB_SDCARD \
+ P1011RDB_SPIFLASH \
+ P1020RDB \
+ P1020RDB_NAND \
+ P1020RDB_SDCARD \
+ P1020RDB_SPIFLASH \
+ P2010RDB \
+ P2010RDB_NAND \
+ P2010RDB_SDCARD \
+ P2010RDB_SPIFLASH \
+ P2020RDB \
+ P2020RDB_NAND \
+ P2020RDB_SDCARD \
+ P2020RDB_SPIFLASH \
PM854 \
PM856 \
sbc8540 \
sbc8548 \
+ sbc8548_PCI_33 \
+ sbc8548_PCI_66 \
+ sbc8548_PCI_33_PCIE \
+ sbc8548_PCI_66_PCIE \
sbc8560 \
socrates \
stxgp3 \
MPC8610HPCD \
MPC8641HPCN \
sbc8641d \
+ XPEDITE5170 \
"
#########################################################################
#########################################################################
LIST_ARM9=" \
+ a320evb \
ap920t \
ap922_XA10 \
ap926ejs \
cp926ejs \
cp946es \
cp966 \
+ da830evm \
+ imx27lite \
lpd7a400 \
+ mv88f6281gtw_ge \
mx1ads \
mx1fs2 \
netstar \
- nmdk8815 \
+ nhk8815 \
+ nhk8815_onenand \
omap1510inn \
omap1610h2 \
omap1610inn \
omap5912osk \
omap730p2 \
+ openrd_base \
+ rd6281a \
sbc2410x \
scb9328 \
+ sheevaplug \
smdk2400 \
smdk2410 \
trab \
davinci_sffsdr \
davinci_sonata \
davinci_dm355evm \
+ davinci_dm355leopard \
+ davinci_dm6467evm \
"
#########################################################################
imx31_phycore_eet \
mx31ads \
mx31pdk \
+ mx31pdk_nand \
qong \
smdk6400 \
"
## ARM Cortex-A8 Systems
#########################################################################
LIST_ARM_CORTEX_A8=" \
+ devkit8000 \
omap3_beagle \
omap3_overo \
omap3_evm \
omap3_pandora \
+ omap3_sdp3430 \
omap3_zoom1 \
omap3_zoom2 \
+ smdkc100 \
"
#########################################################################
## AT91 Systems
#########################################################################
-LIST_at91=" \
- afeb9260 \
- at91cap9adk \
- at91rm9200dk \
- at91rm9200ek \
- at91sam9260ek \
- at91sam9261ek \
- at91sam9263ek \
- at91sam9g20ek \
- at91sam9rlek \
- cmc_pu2 \
- csb637 \
- kb9202 \
- meesc \
- mp2usb \
- m501sk \
- pm9261 \
- pm9263 \
+LIST_at91=" \
+ afeb9260 \
+ at91cap9adk \
+ at91rm9200dk \
+ at91rm9200ek \
+ at91sam9260ek \
+ at91sam9261ek \
+ at91sam9263ek \
+ at91sam9g10ek \
+ at91sam9g20ek \
+ at91sam9m10g45ek \
+ at91sam9rlek \
+ cmc_pu2 \
+ CPUAT91 \
+ CPU9260 \
+ CPU9G20 \
+ csb637 \
+ kb9202 \
+ meesc \
+ mp2usb \
+ m501sk \
+ pm9261 \
+ pm9263 \
+ SBC35_A9G20 \
+ TNY_A9260 \
+ TNY_A9G20 \
"
#########################################################################
innokom \
lubbock \
pleb2 \
+ polaris \
pxa255_idp \
+ trizepsiv \
wepep250 \
xaeniax \
xm250 \
LIST_microblaze=" \
microblaze-generic \
- suzaku \
"
#########################################################################
EB+MCF-EV123 \
EB+MCF-EV123_internal \
idmr \
+ M5208EVBE \
M52277EVB \
M5235EVB \
M5249EVB \
cm-bf527 \
cm-bf533 \
cm-bf537e \
+ cm-bf537u \
cm-bf548 \
cm-bf561 \
ibf-dsp561 \
sh7763rdp \
sh7785lcr \
ap325rxa \
+ espt \
"
LIST_sh=" \
${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
| tee ${LOG_DIR}/$target.ERR
+ # Check for 'make' errors
+ if [ ${PIPESTATUS[0]} -ne 0 ] ; then
+ RC=1
+ fi
+
+ if [ -s ${LOG_DIR}/$target.ERR ] ; then
+ ERR_CNT=$((ERR_CNT + 1))
+ ERR_LIST="${ERR_LIST} $target"
+ else
+ rm ${LOG_DIR}/$target.ERR
+ fi
+
+ TOTAL_CNT=$((TOTAL_CNT + 1))
+
${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
| tee -a ${LOG_DIR}/$target.MAKELOG
}
#-----------------------------------------------------------------------
+print_stats() {
+ echo ""
+ echo "--------------------- SUMMARY ----------------------------"
+ echo "Boards compiled: ${TOTAL_CNT}"
+ if [ ${ERR_CNT} -gt 0 ] ; then
+ echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
+ fi
+ echo "----------------------------------------------------------"
+
+ exit $RC
+}
+#-----------------------------------------------------------------------
for arg in $@
do
case "$arg" in