X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=do_last_build;h=b8c75f51238f8dae142247cb9621eb9641ba9c7f;hb=HEAD;hp=0717f2de572a50b776dce7a8c7a4e03f4fbaacdf;hpb=6f383e1e093d9b206b2c44eda51bde53c847c55a;p=next-scripts diff --git a/do_last_build b/do_last_build index 0717f2d..b8c75f5 100755 --- a/do_last_build +++ b/do_last_build @@ -1,23 +1,18 @@ #!/bin/sh -build_host="ka2" -build_dir="/scratch/sfr/next" +. "$(dirname $0)/common.sh" -[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST" -[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR" +set -e -[ -n "$1" ] && { - build_host="$1" - shift -} -[ -n "$1" ] && { - build_dir="$1" - shift -} +cmd="/bin/sh" +[ "$build_host" ] && + cmd="ssh root@$build_host unshare -n su $(id -u -n)" -set -e +j1_factor=$(( j_factor / 2 )) + +$cmd <<-EOF + set -e -ssh "$build_host" /bin/sh -e <<-EOF echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH" export LANG=C @@ -26,53 +21,82 @@ ssh "$build_host" /bin/sh -e <<-EOF export CCACHE_DIR="${build_dir%/*}/.ccache" export TMPDIR="${build_dir%/*}/tmp" + touch .scmversion + + echo Building: powerpc allyesconfig + d=../powerpc_allyesconfig + [ -d \$d ] || mkdir \$d + make ARCH=powerpc -s O=\$d allyesconfig + printf 'Backgrouding the %s build\n' 'powerpc_allyesconfig' + make ARCH=powerpc O=\$d -j$j_factor -O -s -k >\$d.log 2>&1 \$e - KCONFIG_ALLCONFIG=\$e \ - cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d allnoconfig + echo CONFIG_SECTION_MISMATCH_WARN_ONLY=y >>\$e + KCONFIG_ALLCONFIG=\$e make ARCH=powerpc -s O=\$d allnoconfig rm \$e - cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d -j64 -s + make ARCH=powerpc O=\$d -j$j1_factor -O -s + echo Building: powerpc ppc44x_defconfig d=../powerpc_ppc44x_defconfig [ -d \$d ] || mkdir \$d - cross -n -N -k powerpc -a powerpc64 -c 4.6 O=\$d ppc44x_defconfig - cross -n -N -k powerpc -a powerpc64 -c 4.6 O=\$d -j64 -s + make ARCH=powerpc -s O=\$d ppc44x_defconfig + make ARCH=powerpc O=\$d -j$j1_factor -O -s - d=../powerpc_allyesconfig + echo Building: powerpc pseries_le_defconfig + d=../powerpc_pseries_le_defconfig [ -d \$d ] || mkdir \$d - e=\$d.except - echo CONFIG_PROFILE_ALL_BRANCHES=n >\$e - echo CONFIG_DEBUG_INFO=n >>\$e - KCONFIG_ALLCONFIG=\$e \ - cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d allyesconfig - rm \$e - cross -n -N -k powerpc -a powerpc64 -c 4.8 -- O=\$d -j64 -s -k || true + make ARCH=powerpc -s O=\$d pseries_le_defconfig + make ARCH=powerpc O=\$d -j$j1_factor -O -s + + echo Building: i386 defconfig + d=../i386_defconfig + [ -d \$d ] || mkdir \$d + make ARCH=i386 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -s defconfig + make ARCH=i386 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -j$j1_factor -O -s + + echo Building: arm64 defconfig + d=../arm64_defconfig + [ -d \$d ] || mkdir \$d + make ARCH=arm64 O=\$d CROSS_COMPILE=aarch64-linux-gnu- -s defconfig + make ARCH=arm64 O=\$d CROSS_COMPILE=aarch64-linux-gnu- -j$j1_factor -O -s + + echo Building: sparc64 defconfig + d=../sparc64_defconfig + [ -d \$d ] || mkdir \$d + cross -n -N -a sparc64 -k sparc64 -c $gcc_version -s O=\$d defconfig + cross -n -N -a sparc64 -k sparc64 -c $gcc_version O=\$d -j$j1_factor -O -s + + echo Building: sparc defconfig + d=../sparc_defconfig + [ -d \$d ] || mkdir \$d + cross -n -N -a sparc64 -k sparc -c $gcc_version -s O=\$d defconfig + cross -n -N -a sparc64 -k sparc -c $gcc_version O=\$d -j$j1_factor -O -s + + printf '\nWaiting for powerpc allyesconfig build\n\n' + wait + + rm .scmversion + + cat ../powerpc_allyesconfig.log EOF -for a in i386 sparc64 sparc:sparc64 arm -do - ka=${a%:*} - ca=${a#*:} - d=../${ka}_defconfig - ssh "$build_host" /bin/sh -e <<-EOF - echo \$PATH | grep -q "\$HOME/bin" || - export PATH="\$HOME/bin:\$PATH" - export LANG=C - - cd "$build_dir" - - export CCACHE_DIR="${build_dir%/*}/.ccache" - export TMPDIR="${build_dir%/*}/tmp" - - [ -d $d ] || mkdir $d - cross -n -N -a ${ca} -k ${ka} -c 4.6 O=$d defconfig - cross -n -N -a ${ca} -k ${ka} -c 4.6 O=$d -j64 -s - EOF -done +exit 0