]> git.ozlabs.org Git - next-scripts/commitdiff
move build scripts here from the build machine
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 20 May 2013 06:19:27 +0000 (16:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 20 May 2013 06:20:25 +0000 (16:20 +1000)
do_build [new file with mode: 0755]
do_last_build [new file with mode: 0755]

diff --git a/do_build b/do_build
new file mode 100755 (executable)
index 0000000..b36d6b2
--- /dev/null
+++ b/do_build
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+build_host="ka2"
+build_dir="/scratch/sfr/next"
+
+[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
+[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
+
+[ -n "$1" ] && {
+       build_host="$1"
+       shift
+}
+[ -n "$1" ] && {
+       build_dir="$1"
+       shift
+}
+
+set -e
+
+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"
+
+       git reset --hard next
+
+       d=../powerpc_ppc64_defconfig
+       [ -d \$d ] || mkdir \$d
+       cross -n -N -a powerpc64 -k powerpc -c 4.8 O=\$d ppc64_defconfig
+       cross -n -N -a powerpc64 -k powerpc -c 4.8 O=\$d -j64 -s
+
+       d=../x86_64_allmodconfig
+       [ -d \$d ] || mkdir \$d
+       e=\$d.except
+       echo CONFIG_PROFILE_ALL_BRANCHES=n >\$e
+       echo CONFIG_DEBUG_INFO=n >>\$e
+       echo CONFIG_X86_DECODER_SELFTEST=n >>\$e
+       KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c 4.8 O=\$d allmodconfig
+       rm \$e
+       cross -n -N -a x86_64 -c 4.8 O=\$d -j64 -s
+EOF
diff --git a/do_last_build b/do_last_build
new file mode 100755 (executable)
index 0000000..0717f2d
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+build_host="ka2"
+build_dir="/scratch/sfr/next"
+
+[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
+[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
+
+[ -n "$1" ] && {
+       build_host="$1"
+       shift
+}
+[ -n "$1" ] && {
+       build_dir="$1"
+       shift
+}
+
+set -e
+
+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=../powerpc_allnoconfig
+       [ -d \$d ] || mkdir \$d
+       cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d allnoconfig
+       cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d -j64 -s
+
+       d=../powerpc64_allnoconfig
+       [ -d \$d ] || mkdir \$d
+       e=\$d.except
+       echo CONFIG_PPC64=y >\$e
+       KCONFIG_ALLCONFIG=\$e \
+               cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d allnoconfig
+       rm \$e
+       cross -n -N -k powerpc -a powerpc64 -c 4.8 O=\$d -j64 -s
+
+       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
+
+       d=../powerpc_allyesconfig
+       [ -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
+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