]> git.ozlabs.org Git - next-scripts/blobdiff - do_last_build
update to_build_host a bit
[next-scripts] / do_last_build
index 80cfe3c98e22f34c639265064f50f3894a347bad..b8c75f51238f8dae142247cb9621eb9641ba9c7f 100755 (executable)
@@ -4,10 +4,12 @@
 
 set -e
 
-cmd="firejail --profile=$bin_dir/build.profile /bin/sh"
+cmd="/bin/sh"
 [ "$build_host" ] &&
        cmd="ssh root@$build_host unshare -n su $(id -u -n)"
 
+j1_factor=$(( j_factor / 2 ))
+
 $cmd <<-EOF
        set -e
 
@@ -21,20 +23,27 @@ $cmd <<-EOF
 
        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 </dev/null &
+
        echo Building: x86_64 modules_install
-       INSTALL_MOD_PATH="${build_dir%/*}" /usr/bin/time make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- O=../x86_64_allmodconfig -j$j_factor -O -s modules_install
+       INSTALL_MOD_PATH="${build_dir%/*}" /usr/bin/time make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- O=../x86_64_allmodconfig -j$j1_factor -O -s modules_install
 
        echo Building: x86_64 allnoconfig
        d=../x86_64_allnoconfig
        [ -d \$d ] || mkdir \$d
        make ARCH=x86_64 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -s allnoconfig
-       make ARCH=x86_64 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -j$j_factor -O -s
+       make ARCH=x86_64 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -j$j1_factor -O -s
 
        echo Building: powerpc allnoconfig
        d=../powerpc_allnoconfig
        [ -d \$d ] || mkdir \$d
        make ARCH=powerpc -s O=\$d allnoconfig
-       make ARCH=powerpc O=\$d -j$j_factor -O -s
+       make ARCH=powerpc O=\$d -j$j1_factor -O -s
 
        echo Building: powerpc64 allnoconfig
        d=../powerpc64_allnoconfig
@@ -44,53 +53,50 @@ $cmd <<-EOF
        echo CONFIG_SECTION_MISMATCH_WARN_ONLY=y >>\$e
        KCONFIG_ALLCONFIG=\$e make ARCH=powerpc -s O=\$d allnoconfig
        rm \$e
-       make ARCH=powerpc O=\$d -j$j_factor -O -s
+       make ARCH=powerpc O=\$d -j$j1_factor -O -s
 
        echo Building: powerpc ppc44x_defconfig
        d=../powerpc_ppc44x_defconfig
        [ -d \$d ] || mkdir \$d
        make ARCH=powerpc -s O=\$d ppc44x_defconfig
-       make ARCH=powerpc O=\$d -j$j_factor -O -s
-
-       echo Building: powerpc allyesconfig
-       d=../powerpc_allyesconfig
-       [ -d \$d ] || mkdir \$d
-       make ARCH=powerpc -s O=\$d allyesconfig
-       make ARCH=powerpc O=\$d -j$j_factor -O -s -k
+       make ARCH=powerpc O=\$d -j$j1_factor -O -s
 
        echo Building: powerpc pseries_le_defconfig
        d=../powerpc_pseries_le_defconfig
        [ -d \$d ] || mkdir \$d
        make ARCH=powerpc -s O=\$d pseries_le_defconfig
-       make ARCH=powerpc O=\$d -j$j_factor -O -s
+       make ARCH=powerpc O=\$d -j$j1_factor -O -s
 
-       rm .scmversion
-EOF
+       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
 
-for a in i386:x86_64 sparc64 sparc:sparc64
-do
-       ka=${a%:*}
-       ca=${a#*:}
-       d=../${ka}_defconfig
-       $cmd <<-EOF
-               set -e
+       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 \$PATH | grep -q "\$HOME/bin" ||
-                       export PATH="\$HOME/bin:\$PATH"
-               export LANG=C
+       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
 
-               cd "$build_dir"
+       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
 
-               export CCACHE_DIR="${build_dir%/*}/.ccache"
-               export TMPDIR="${build_dir%/*}/tmp"
+       printf '\nWaiting for powerpc allyesconfig build\n\n'
+       wait
 
-               touch .scmversion
+       rm .scmversion
 
-               echo Building: $ka defconfig
-               [ -d $d ] || mkdir $d
-               cross -n -N -a ${ca} -k ${ka} -c $gcc_version -s O=$d defconfig
-               cross -n -N -a ${ca} -k ${ka} -c $gcc_version O=$d -j$j_factor -O -s
+       cat ../powerpc_allyesconfig.log
+EOF
 
-               rm .scmversion
-       EOF
-done
+exit 0