summaryrefslogtreecommitdiffstats
path: root/MAKEALL
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2007-11-09 11:48:09 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2007-11-09 11:48:09 +0100
commitb9092e1a37163b45cc9afe3da766e9c2ab272f84 (patch)
tree9d531a41e4a3228825b6503b2072571d22ae5e58 /MAKEALL
parent07fef1cb68ee4641ca152336d5fca13bb7fcdd36 (diff)
downloadbarebox-b9092e1a37163b45cc9afe3da766e9c2ab272f84.tar.gz
Add MAKEALL script in order to be able to do test builds.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'MAKEALL')
-rwxr-xr-xMAKEALL97
1 files changed, 97 insertions, 0 deletions
diff --git a/MAKEALL b/MAKEALL
new file mode 100755
index 0000000..97cea07
--- /dev/null
+++ b/MAKEALL
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+check_pipe_status() {
+ for i in "${PIPESTATUS[@]}"; do
+ [ $i -gt 0 ] && return 1
+ done
+ return 0
+}
+
+
+HERE=$(pwd)
+AUTOBUILD_DIR=${HERE}/autobuild
+REPORT=${AUTOBUILD_DIR}/REPORT
+
+if [ -d "${AUTOBUILD_DIR}" ]; then
+ echo "warning: ${AUTOBUILD_DIR} exists, press <ctrl-c> to exit or wait for 3 seconds"
+ sleep 3
+ rm -fr ${AUTOBUILD_DIR}
+fi
+
+mkdir -p ${AUTOBUILD_DIR}
+
+BOARDS="${BOARDS} sandbox"
+sandbox_ARCH=sandbox
+sandbox_CROSS_COMPILE=
+
+BOARDS="${BOARDS} eco920"
+eco920_ARCH=arm
+eco920_CROSS_COMPILE=arm-v4t-linux-gnueabi-
+
+BOARDS="${BOARDS} ipe337"
+ipe337_ARCH=blackfin
+ipe337_CROSS_COMPILE=
+
+BOARDS="${BOARDS} netx_nxdb500"
+netx_nxdb500_ARCH=arm
+netx_nxdb500_CROSS_COMPILE=arm-v4t-linux-gnueabi-
+
+BOARDS="${BOARDS} pcm030"
+pcm030_ARCH=ppc
+pcm030_CROSS_COMPILE=powerpc-603e-linux-gnu-
+
+BOARDS="${BOARDS} pcm037"
+pcm037_ARCH=arm
+pcm037_CROSS_COMPILE=arm-1136jfs-linux-gnueabi-
+
+BOARDS="${BOARDS} pcm038"
+pcm038_ARCH=arm
+pcm038_CROSS_COMPILE=arm-v4t-linux-gnueabi-
+
+BOARDS="${BOARDS} scb9328"
+scb9328_ARCH=arm
+scb9328_CROSS_COMPILE=arm-v4t-linux-gnueabi-
+
+for board in ${BOARDS}; do
+
+ time_start=$(date +%s)
+ arch=${board}_ARCH
+ cross_compile=${board}_CROSS_COMPILE
+ mkdir -p ${AUTOBUILD_DIR}/${board}
+ printf "%-20s defconfig: " ${board} | tee -a ${REPORT}
+
+ make -C ${HERE} \
+ O=${AUTOBUILD_DIR}/${board} \
+ ARCH=${!arch} \
+ ${board}_defconfig \
+ > ${AUTOBUILD_DIR}/${board}.log 2>&1
+
+ check_pipe_status
+ if [ "$?" = "0" ]; then
+
+ printf "OK " | tee -a ${REPORT}
+ printf "compile: " ${board} | tee -a ${REPORT}
+
+ make -C ${HERE} \
+ O=${AUTOBUILD_DIR}/${board} \
+ ARCH=${!arch} \
+ CROSS_COMPILE=${!cross_compile} \
+ > ${AUTOBUILD_DIR}/${board}.log 2>&1
+
+ check_pipe_status
+ if [ "$?" = "0" ]; then
+ printf "OK " | tee -a ${REPORT}
+ else
+ printf "FAILED " | tee -a ${REPORT}
+ fi
+
+ else
+ printf "FAILED " | tee -a ${REPORT}
+ printf "compile: ------ " | tee -a ${REPORT}
+ fi
+
+ time_stop=$(date +%s)
+ time_diff=$(($time_stop - $time_start))
+ printf "%4is\n" $time_diff | tee -a ${REPORT}
+done
+