]> git.ozlabs.org Git - next-scripts/blob - do_last_build
extract the check_dups function from common.sh
[next-scripts] / do_last_build
1 #!/bin/sh
2
3 . "$(dirname $0)/common.sh"
4
5 set -e
6
7 cmd="/bin/sh"
8 [ "$build_host" ] &&
9         cmd="ssh -T $build_host"
10
11 j1_factor=$(( j_factor / 2 ))
12
13 $cmd <<-EOF
14         set -e
15
16         echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH"
17         export LANG=C
18
19         cd "$build_dir"
20
21         export CCACHE_DIR="${build_dir%/*}/.ccache"
22         export TMPDIR="${build_dir%/*}/tmp"
23
24         touch .scmversion
25
26         g=../global.except
27         if [ -r \$g ]; then
28                 KCONFIG_ALLCONFIG=\$g
29                 export KCONFIG_ALLCONFIG
30         fi
31
32         echo Building: powerpc allyesconfig
33         d=../powerpc_allyesconfig
34         [ -d \$d ] || mkdir \$d
35         e=\$d.except
36         echo CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=n >\$e
37         if [ -r \$g ]; then
38                 cat \$g >>\$e
39         fi
40         KCONFIG_ALLCONFIG=\$e make ARCH=powerpc -s O=\$d allyesconfig
41         printf 'Backgrouding the %s build\n' 'powerpc_allyesconfig'
42         make ARCH=powerpc O=\$d -j$j_factor -O -s -k >\$d.log 2>&1 </dev/null &
43
44         echo Building: x86_64 modules_install
45         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
46
47         echo Building: x86_64 allnoconfig
48         d=../x86_64_allnoconfig
49         [ -d \$d ] || mkdir \$d
50         make ARCH=x86_64 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -s allnoconfig
51         make ARCH=x86_64 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -j$j1_factor -O -s
52
53         echo Building: powerpc allnoconfig
54         d=../powerpc_allnoconfig
55         [ -d \$d ] || mkdir \$d
56         make ARCH=powerpc -s O=\$d allnoconfig
57         make ARCH=powerpc O=\$d -j$j1_factor -O -s
58
59         echo Building: powerpc64 allnoconfig
60         d=../powerpc64_allnoconfig
61         [ -d \$d ] || mkdir \$d
62         e=\$d.except
63         echo CONFIG_PPC64=y >\$e
64         echo CONFIG_SECTION_MISMATCH_WARN_ONLY=y >>\$e
65         if [ -r \$g ]; then
66                 cat \$g >>\$e
67         fi
68         KCONFIG_ALLCONFIG=\$e make ARCH=powerpc -s O=\$d allnoconfig
69         rm \$e
70         make ARCH=powerpc O=\$d -j$j1_factor -O -s
71
72         echo Building: powerpc ppc44x_defconfig
73         d=../powerpc_ppc44x_defconfig
74         [ -d \$d ] || mkdir \$d
75         make ARCH=powerpc -s O=\$d ppc44x_defconfig
76         make ARCH=powerpc O=\$d -j$j1_factor -O -s
77
78         echo Building: powerpc pseries_le_defconfig
79         d=../powerpc_pseries_le_defconfig
80         [ -d \$d ] || mkdir \$d
81         make ARCH=powerpc -s O=\$d pseries_le_defconfig
82         sed -i '/CONFIG_PPC_64K_PAGES/d;s/^.*CONFIG_PPC_4K_PAGES.*$/CONFIG_PPC_4K_PAGES=y/' \$d/.config
83         make ARCH=powerpc -s O=\$d olddefconfig
84         make ARCH=powerpc O=\$d -j$j1_factor -O -s
85
86         echo Building: i386 defconfig
87         d=../i386_defconfig
88         [ -d \$d ] || mkdir \$d
89         make ARCH=i386 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -s defconfig
90         make ARCH=i386 O=\$d CROSS_COMPILE=x86_64-linux-gnu- -j$j1_factor -O -s
91
92         echo Building: arm64 defconfig
93         d=../arm64_defconfig
94         [ -d \$d ] || mkdir \$d
95         make ARCH=arm64 O=\$d CROSS_COMPILE=aarch64-linux-gnu- -s defconfig
96         make ARCH=arm64 O=\$d CROSS_COMPILE=aarch64-linux-gnu- -j$j1_factor -O -s
97
98         echo Building: s390 defconfig
99         d=../s390_defconfig
100         [ -d \$d ] || mkdir \$d
101         make ARCH=s390 O=\$d CROSS_COMPILE=s390x-linux-gnu- -s defconfig
102         make ARCH=s390 O=\$d CROSS_COMPILE=s390x-linux-gnu- -j$j1_factor -O -s
103
104         echo Building: sparc64 defconfig
105         d=../sparc64_defconfig
106         [ -d \$d ] || mkdir \$d
107         cross -n -N -a sparc64 -k sparc64 -c 11.1.0 -s O=\$d defconfig
108         cross -n -N -a sparc64 -k sparc64 -c 11.1.0 O=\$d -j$j1_factor -O -s
109
110         echo Building: sparc defconfig
111         d=../sparc_defconfig
112         [ -d \$d ] || mkdir \$d
113         cross -n -N -a sparc64 -k sparc -c 11.1.0 -s O=\$d defconfig
114         cross -n -N -a sparc64 -k sparc -c 11.1.0 O=\$d -j$j1_factor -O -s
115
116         printf '\nWaiting for powerpc allyesconfig build\n\n'
117         wait
118
119         rm .scmversion
120
121         cat ../powerpc_allyesconfig.log
122 EOF
123
124 exit 0