]> git.ozlabs.org Git - next-scripts/blob - do_build
move build scripts here from the build machine
[next-scripts] / do_build
1 #!/bin/sh
2
3 build_host="ka2"
4 build_dir="/scratch/sfr/next"
5
6 [ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
7 [ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
8
9 [ -n "$1" ] && {
10         build_host="$1"
11         shift
12 }
13 [ -n "$1" ] && {
14         build_dir="$1"
15         shift
16 }
17
18 set -e
19
20 ssh "$build_host" /bin/sh -e <<-EOF
21         echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH"
22         export LANG=C
23
24         cd "$build_dir"
25
26         export CCACHE_DIR="${build_dir%/*}/.ccache"
27         export TMPDIR="${build_dir%/*}/tmp"
28
29         git reset --hard next
30
31         d=../powerpc_ppc64_defconfig
32         [ -d \$d ] || mkdir \$d
33         cross -n -N -a powerpc64 -k powerpc -c 4.8 O=\$d ppc64_defconfig
34         cross -n -N -a powerpc64 -k powerpc -c 4.8 O=\$d -j64 -s
35
36         d=../x86_64_allmodconfig
37         [ -d \$d ] || mkdir \$d
38         e=\$d.except
39         echo CONFIG_PROFILE_ALL_BRANCHES=n >\$e
40         echo CONFIG_DEBUG_INFO=n >>\$e
41         echo CONFIG_X86_DECODER_SELFTEST=n >>\$e
42         KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c 4.8 O=\$d allmodconfig
43         rm \$e
44         cross -n -N -a x86_64 -c 4.8 O=\$d -j64 -s
45 EOF