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 ' | grep -vxFf $bparent/log-ignore
70 sep='======================================================================'
73 echo " \$arch \$conf build OK - log follows"
77 if [ -f $obdir/\$b ]; then
78 olen=\$(sanitise_log <$obdir/\$b | wc -l)
79 len=\$(sanitise_log <\$log | wc -l)
80 if [ \$olen -lt \$len ]; then
82 echo " log \$b increased number of lines"
84 pushover "linux-next log got bigger"
85 diff -u $obdir/\$b \$log 2>&1 | less
91 echo Building: x86_64 allmodconfig
92 d="$bparent/x86_64_allmodconfig"
93 [ -d \$d ] || mkdir \$d || exit 1
96 echo CONFIG_BUILD_DOCSRC=n >\$e || exit 1
97 echo CONFIG_MODULES=y >>\$e || exit 1
98 KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c "$gcc_version" O=\$d -s allmodconfig || exit 1
99 echo "Forking x86 build ..."
100 /usr/bin/time cross -n -N -a x86_64 -c "$gcc_version" O=\$d -j"$j_factor" -O -s > \$log_x86 2>&1 &
103 echo Building: powerpc ppc64_defconfig
104 d="$bparent/powerpc_ppc64_defconfig"
105 [ -d \$d ] || mkdir \$d || exit 1
107 cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d -s ppc64_defconfig || exit 1
108 echo "Forking powerpc build ..."
109 /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 &
112 echo Building: arm multi_v7_defconfig
113 d="$bparent/arm_multi_v7_defconfig"
114 [ -d \$d ] || mkdir \$d || exit 1
116 cross -n -N -a arm -c "$gcc_version" O=\$d -s multi_v7_defconfig || exit 1
117 echo "Forking arm build ..."
118 /usr/bin/time cross -n -N -a arm -c "$gcc_version" O=\$d -j"$j_factor" -O -s > \$log_arm 2>&1 &
123 [ -d \$d ] || mkdir \$d || exit 1
125 echo "Forking perf build ..."
126 /usr/bin/time make -s -O -C tools/perf JOBS="$j_factor" O=\$d > \$log_perf 2>&1 &
132 if [ \$rc -ne 0 ]; then
133 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
134 echo "ERROR: perf build failed - log follows"
135 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
144 show_log native perf \$log_perf
150 if [ \$rc -ne 0 ]; then
151 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
152 echo "ERROR: arm multi_v7_defconfig build failed - log follows"
153 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
161 show_log arm multi_v7_defconfig \$log_arm
167 if [ \$rc -ne 0 ]; then
168 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
169 echo "ERROR: powerpc ppc64_defconfig build failed - log follows"
170 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
177 show_log powerpc ppc64_defconfig \$log_ppc
183 if [ \$rc -ne 0 ]; then
184 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
185 echo "ERROR: x86_64 allmodconfig build failed - log follows"
186 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
191 show_log x86_64 allmodconfig \$log_x86