9 tools_dir=$(cd $(dirname "$0"); pwd)
10 . "$tools_dir/common.sh"
14 bparent=$(dirname "$build_dir")
16 line="$(tail -n 1 $SHA1_FILE)"
18 # strip everything after the first tab character
21 [ "$tree" = "$stree" ] || {
22 echo "That is not the last tree merged ($tree v $stree)" 1>&2
28 obdir="$bparent/old/$tree"
32 cmd="ssh root@$build_host unshare -n su $(id -u -n)"
36 echo Building on \$(hostname)
38 echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH"
41 cd "$build_dir" || exit 1
43 export CCACHE_DIR="$bparent/.ccache"
44 export TMPDIR="$bparent/tmp"
46 git reset --hard next || exit 1
47 touch .scmversion || exit 1
49 [ -d "$obdir" ] || mkdir -p "$obdir" || exit 1
54 /^[.[:digit:]]+user [.[:digit:]]+system [:.[:digit:]]+elapsed [[:digit:]]+%CPU \([[:digit:]]+avgtext\+[[:digit:]]+avgdata [[:digit:]]+maxresident\)k$/d
55 /^[[:digit:]]+inputs\+[[:digit:]]+outputs \([[:digit:]]+major\+[[:digit:]]+minor\)pagefaults [[:digit:]]+swaps$/d
56 /^Setup is [[:digit:]]+ bytes \(padded to [[:digit:]]+ bytes\)\.$/d
57 /^System is [[:digit:]]+ kB$/d
58 /^CRC [[:xdigit:]]+$/d
59 /^Kernel: arch\/x86\/boot\/bzImage is ready \(#[[:digit:]]+\)$/d
60 /^WARNING: vmlinux\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
61 /^WARNING: drivers\/built-in\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
62 /^Warning: Kernel ABI header at /d
63 ' | grep -vxFf $bparent/log-ignore
71 sep='======================================================================'
74 echo " \$arch \$conf build OK - log follows"
78 if [ -f $obdir/\$b ]; then
79 olen=\$(sanitise_log <$obdir/\$b | wc -l)
80 len=\$(sanitise_log <\$log | wc -l)
81 if [ \$olen -lt \$len ]; then
83 echo " log \$b increased number of lines"
85 pushover "linux-next log got bigger"
86 diff -u $obdir/\$b \$log 2>&1 | less
92 echo Building: x86_64 allmodconfig
93 d="$bparent/x86_64_allmodconfig"
94 [ -d \$d ] || mkdir \$d || exit 1
96 cross -n -N -a x86_64 -c "$gcc_version" O=\$d -s allmodconfig || exit 1
97 echo "Forking x86 build ..."
98 /usr/bin/time cross -n -N -a x86_64 -c "$gcc_version" O=\$d -j"$j_factor" -O -s > \$log_x86 2>&1 &
101 echo Building: powerpc ppc64_defconfig
102 d="$bparent/powerpc_ppc64_defconfig"
103 [ -d \$d ] || mkdir \$d || exit 1
105 cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d -s ppc64_defconfig || exit 1
106 echo "Forking powerpc build ..."
107 /usr/bin/time cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d -j"$j_factor" -O -s > \$log_ppc 2>&1 &
110 echo Building: arm multi_v7_defconfig
111 d="$bparent/arm_multi_v7_defconfig"
112 [ -d \$d ] || mkdir \$d || exit 1
114 cross -n -N -a arm -c "$gcc_version" O=\$d -s multi_v7_defconfig || exit 1
115 echo "Forking arm build ..."
116 /usr/bin/time cross -n -N -a arm -c "$gcc_version" O=\$d -j"$j_factor" -O -s > \$log_arm 2>&1 &
121 [ -d \$d ] || mkdir \$d || exit 1
123 echo "Forking perf build ..."
124 /usr/bin/time make -C tools/perf -f Makefile.perf -s -O -j"$j_factor" O=\$d > \$log_perf 2>&1 &
130 if [ \$rc -ne 0 ]; then
131 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
132 echo "ERROR: perf build failed - log follows"
133 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
142 show_log native perf \$log_perf
148 if [ \$rc -ne 0 ]; then
149 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
150 echo "ERROR: arm multi_v7_defconfig build failed - log follows"
151 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
159 show_log arm multi_v7_defconfig \$log_arm
165 if [ \$rc -ne 0 ]; then
166 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
167 echo "ERROR: powerpc ppc64_defconfig build failed - log follows"
168 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
175 show_log powerpc ppc64_defconfig \$log_ppc
181 if [ \$rc -ne 0 ]; then
182 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
183 echo "ERROR: x86_64 allmodconfig build failed - log follows"
184 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
189 show_log x86_64 allmodconfig \$log_x86