diff options
-rwxr-xr-x | tcwg_kernel-build.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh index fdabf218..555e552c 100755 --- a/tcwg_kernel-build.sh +++ b/tcwg_kernel-build.sh @@ -143,10 +143,11 @@ build_linux () # Use binutils, etc from $bin export PATH="$bin:$PATH" - # Use ccache only when bisecting linux. Otherwise the compiler is - # new in every build and we would only clobber ccache volume. + # Use ccache only when bisecting linux (or preparing to). + # Otherwise the compiler is new in every build and we would + # only clobber ccache volume. local ccache="" - if [ x"${rr[mode]}" = x"bisect" -a x"${rr[current_project]}" = x"linux" ]; then + if [ x"${rr[mode]}" != x"jenkins-full" -a x"${rr[current_project]}" = x"linux" ]; then ccache="ccache" fi cat > $(pwd)/bin/${rr[target]}-cc <<EOF @@ -156,7 +157,7 @@ EOF chmod +x $(pwd)/bin/${rr[target]}-cc # Define make variables. - local opts="CC=$(pwd)/bin/${rr[target]}-cc" + local opts="CC=$(pwd)/bin/${rr[target]}-cc SUBLEVEL=0 EXTRAVERSION=-bisect" if [ x"${rr[target]}" != x"$(uname -m)" ]; then opts="$opts ARCH=$(print_kernel_target ${rr[target]})" opts="$opts CROSS_COMPILE=$(print_gnu_target ${rr[target]})-" @@ -168,11 +169,15 @@ EOF make $opts distclean make $opts ${rr[linux_config]} + sed -i -e 's:CONFIG_LOCALVERSION_AUTO=y:# CONFIG_LOCALVERSION_AUTO is not set:' .config + set +f; rm -f localversion*; set -f + make $opts oldconfig ccache -z - make $opts -j$(nproc --all) -s -k & + KBUILD_BUILD_TIMESTAMP=0 make $opts -j$(nproc --all) -s -k & local res=0 && wait $! || res=$? ccache -s + cp include/config/kernel.release $run_step_artifacts/ return $res ) } |