]> rtime.felk.cvut.cz Git - jailhouse.git/blob - ci/build-all-configs.sh
jailhouse: linux-config: Use the custom version. Changes includes:
[jailhouse.git] / ci / build-all-configs.sh
1 #!/bin/bash
2 #
3 # Jailhouse, a Linux-based partitioning hypervisor
4 #
5 # Copyright (c) Siemens AG, 2015
6 #
7 # Authors:
8 #  Jan Kiszka <jan.kiszka@siemens.com>
9 #
10 # This work is licensed under the terms of the GNU GPL, version 2.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 CONFIGS="x86 banana-pi vexpress"
15
16 # only build a specific config if the branch selects it
17 if [ ${TRAVIS_BRANCH#coverity_scan-} != ${TRAVIS_BRANCH} ]; then
18         CONFIGS=${TRAVIS_BRANCH#coverity_scan-}
19 fi
20
21 PREFIX=
22 if [ "$1" == "--cov" ]; then
23         export COVERITY_UNSUPPORTED=1
24         PREFIX="cov-build --append-log --dir $2 $3"
25 fi
26
27 for CONFIG in $CONFIGS; do
28         echo
29         echo "*** Building configuration $CONFIG ***"
30
31         cp ci/jailhouse-config-$CONFIG.h hypervisor/include/jailhouse/config.h
32
33         case $CONFIG in
34         x86)
35                 ARCH=x86_64
36                 CROSS_COMPILE=
37                 ;;
38         *)
39                 ARCH=arm
40                 CROSS_COMPILE=arm-linux-gnueabihf-
41                 ;;
42         esac
43
44         $PREFIX make KDIR=ci/linux/build-$CONFIG ARCH=$ARCH \
45              CROSS_COMPILE=$CROSS_COMPILE
46
47         # Keep the clean run out of sight for cov-build so that results are
48         # accumulated as far as possible. Multiple compilations of the same
49         # file will still leave only the last run in the results.
50         make KDIR=ci/linux/build-$CONFIG ARCH=$ARCH \
51              CROSS_COMPILE=$CROSS_COMPILE clean
52 done