9 tools_dir=$(dirname "$0")
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
56 sep='======================================================================'
59 echo " \$arch \$conf build OK - log follows"
63 if [ -f $obdir/\$b ]; then
64 if [ \$(wc -l <$obdir/\$b) -lt \$(wc -l <\$log) ]; then
66 echo " log \$b increased number of lines"
68 diff -u $obdir/\$b \$log 2>&1 | less
74 echo Building: x86_64 allmodconfig
75 d="$bparent/x86_64_allmodconfig"
76 [ -d \$d ] || mkdir \$d || exit 1
79 echo CONFIG_BUILD_DOCSRC=n >\$e || exit 1
80 echo CONFIG_MODULES=y >>\$e || exit 1
81 KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c "$gcc_version" O=\$d allmodconfig || exit 1
82 echo "Forking x86 build ..."
83 /usr/bin/time cross -n -N -a x86_64 -c "$gcc_version" O=\$d -j"$j_factor" -s > \$log_x86 2>&1 &
86 echo Building: powerpc ppc64_defconfig
87 d="$bparent/powerpc_ppc64_defconfig"
88 [ -d \$d ] || mkdir \$d || exit 1
90 cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d ppc64_defconfig || exit 1
91 echo "Forking powerpc build ..."
92 /usr/bin/time cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d -j"$j_factor" -s > \$log_ppc 2>&1 &
95 echo Building: arm multi_v7_defconfig
96 d="$bparent/arm_multi_v7_defconfig"
97 [ -d \$d ] || mkdir \$d || exit 1
99 cross -n -N -a arm -c "$gcc_version" O=\$d multi_v7_defconfig || exit 1
100 echo "Forking arm build ..."
101 /usr/bin/time cross -n -N -a arm -c "$gcc_version" O=\$d -j"$j_factor" -s > \$log_arm 2>&1 &
106 [ -d \$d ] || mkdir \$d || exit 1
108 echo "Forking perf build ..."
109 /usr/bin/time make -s -C tools/perf JOBS="$j_factor" O=\$d > \$log_perf 2>&1 &
115 if [ \$rc -ne 0 ]; then
116 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
117 echo "ERROR: perf build failed - log follows"
118 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
127 show_log native perf \$log_perf
133 if [ \$rc -ne 0 ]; then
134 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
135 echo "ERROR: arm multi_v7_defconfig build failed - log follows"
136 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
144 show_log arm multi_v7_defconfig \$log_arm
150 if [ \$rc -ne 0 ]; then
151 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
152 echo "ERROR: powerpc ppc64_defconfig build failed - log follows"
153 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
160 show_log powerpc ppc64_defconfig \$log_ppc
166 if [ \$rc -ne 0 ]; then
167 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
168 echo "ERROR: x86_64 allmodconfig build failed - log follows"
169 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
174 show_log x86_64 allmodconfig \$log_x86