3 # Jailhouse, a Linux-based partitioning hypervisor
5 # Copyright (c) Siemens AG, 2014-2016
8 # Jan Kiszka <jan.kiszka@siemens.com>
10 # This work is licensed under the terms of the GNU GPL, version 2. See
11 # the COPYING file in the top-level directory.
14 BASEDIR=`cd \`dirname $0\`; pwd`
16 if test -z $KERNEL; then
17 KERNEL=https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz
19 if test -z $PARALLEL_BUILD; then
22 if test -z $OUTDIR; then
35 ARCHIVE_FILE=`basename $KERNEL`
36 if ! test -f $BASEDIR/$ARCHIVE_FILE; then
37 wget $KERNEL -O $BASEDIR/$ARCHIVE_FILE
39 tar xJf $BASEDIR/$ARCHIVE_FILE
47 cp $BASEDIR/kernel-config-$1 build-$1/.config
48 make O=build-$1 vmlinux $PARALLEL_BUILD ARCH=$2 CROSS_COMPILE=$3
49 # clean up some unneeded build output
50 find build-$1 \( -name "*.o" -o -name "*.cmd" -o -name ".tmp_*" \) -exec rm -rf {} \;
56 tar cJf kernel-build.tar.xz linux-* linux
61 build_kernel x86 x86_64
62 build_kernel banana-pi arm arm-linux-gnueabihf-
63 build_kernel vexpress arm arm-linux-gnueabihf-