i.MX introduce cpu_is_*() macros
[barebox-mini2440.git] / MAKEALL
blobdd0f66b7b2ce652fc7369604773dc467afa1f926
1 #!/bin/bash
3 check_pipe_status() {
4 for i in "${PIPESTATUS[@]}"; do
5 [ $i -gt 0 ] && return 1
6 done
7 return 0
11 HERE=$(pwd)
12 AUTOBUILD_DIR=${HERE}/autobuild
13 REPORT=${AUTOBUILD_DIR}/REPORT
15 if [ -d "${AUTOBUILD_DIR}" ]; then
16 echo "warning: ${AUTOBUILD_DIR} exists, press <ctrl-c> to exit or wait for 3 seconds"
17 sleep 3
18 rm -fr ${AUTOBUILD_DIR}
21 mkdir -p ${AUTOBUILD_DIR}
23 BOARDS="${BOARDS} sandbox"
24 sandbox_ARCH=sandbox
25 sandbox_CROSS_COMPILE=
27 BOARDS="${BOARDS} ipe337"
28 ipe337_ARCH=blackfin
29 ipe337_CROSS_COMPILE=bfin-elf-
31 BOARDS="${BOARDS} netx_nxdb500"
32 netx_nxdb500_ARCH=arm
33 netx_nxdb500_CROSS_COMPILE=arm-v4t-linux-gnueabi-
35 BOARDS="${BOARDS} pcm030"
36 pcm030_ARCH=ppc
37 pcm030_CROSS_COMPILE=powerpc-603e-linux-gnu-
39 BOARDS="${BOARDS} pcm037"
40 pcm037_ARCH=arm
41 pcm037_CROSS_COMPILE=arm-1136jfs-linux-gnueabi-
43 BOARDS="${BOARDS} pcm038"
44 pcm038_ARCH=arm
45 pcm038_CROSS_COMPILE=arm-v4t-linux-gnueabi-
47 for board in ${BOARDS}; do
49 time_start=$(date +%s)
50 arch=${board}_ARCH
51 cross_compile=${board}_CROSS_COMPILE
52 mkdir -p ${AUTOBUILD_DIR}/${board}
53 printf "%-20s defconfig: " ${board} | tee -a ${REPORT}
55 make -C ${HERE} \
56 O=${AUTOBUILD_DIR}/${board} \
57 ARCH=${!arch} \
58 ${board}_defconfig \
59 > ${AUTOBUILD_DIR}/${board}.log 2>&1
61 check_pipe_status
62 if [ "$?" = "0" ]; then
64 printf "OK " | tee -a ${REPORT}
65 printf "compile: " ${board} | tee -a ${REPORT}
67 make -C ${HERE} \
68 O=${AUTOBUILD_DIR}/${board} \
69 ARCH=${!arch} \
70 CROSS_COMPILE=${!cross_compile} \
71 > ${AUTOBUILD_DIR}/${board}.log 2>&1
73 check_pipe_status
74 if [ "$?" = "0" ]; then
75 printf "OK " | tee -a ${REPORT}
76 else
77 printf "FAILED " | tee -a ${REPORT}
80 else
81 printf "FAILED " | tee -a ${REPORT}
82 printf "compile: ------ " | tee -a ${REPORT}
85 time_stop=$(date +%s)
86 time_diff=$(($time_stop - $time_start))
87 printf "%4is\n" $time_diff | tee -a ${REPORT}
88 done