diff options
author | Reto Buerki <reet@codelabs.ch> | 2012-12-07 11:33:27 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 15:22:11 +0100 |
commit | f9df3d06b5b4e5e5f00d294f555a373afd6bf99e (patch) | |
tree | d45e22a43ad8cc5dab4d57fafccdddb5a01fcd3e /testing/scripts | |
parent | 62a277cfaed19b4fbc4a06e48273516cce6145d7 (diff) | |
download | strongswan-f9df3d06b5b4e5e5f00d294f555a373afd6bf99e.tar.bz2 strongswan-f9df3d06b5b4e5e5f00d294f555a373afd6bf99e.tar.xz |
Rename build-umlkernel script to build-guestkernel
Diffstat (limited to 'testing/scripts')
-rwxr-xr-x | testing/scripts/build-guestkernel | 46 | ||||
-rwxr-xr-x | testing/scripts/build-umlkernel | 55 |
2 files changed, 46 insertions, 55 deletions
diff --git a/testing/scripts/build-guestkernel b/testing/scripts/build-guestkernel new file mode 100755 index 000000000..2fbe658a1 --- /dev/null +++ b/testing/scripts/build-guestkernel @@ -0,0 +1,46 @@ +#!/bin/bash + +. $PWD/scripts/function.sh + +echo "Building guest kernel version $KERNELVERSION" + +[ -f "$KERNELCONFIG" ] || die "Kernel config $KERNELCONFIG not found" + +mkdir -p $BUILDDIR +cd $BUILDDIR + +if [ ! -f "$KERNELTARBALL" ] +then + url=ftp://ftp.kernel.org/pub/linux/kernel/v3.x/$KERNELTARBALL + log_action "Downloading $url" + execute "wget -q $url" +fi + +if [[ $KERNELPATCH && ! -f "$KERNELPATCH" ]] +then + url=http://download.strongswan.org/uml/$KERNELPATCH + log_action "Downloading $url" + execute "wget -q $url" +fi + +log_action "Unpacking kernel" +execute "tar xjf $KERNELTARBALL" + +KERNELDIR=$BUILDDIR/$KERNEL +cd $KERNELDIR + +if [ $KERNELPATCH ] +then + log_action "Applying kernel patch" + bzcat ../$KERNELPATCH | patch -p1 >>$LOGFILE 2>&1 + log_status $? + [ $? -eq 0 ] || exit 1 +fi + +execute "cp $KERNELCONFIG .config" 0 + +echo "Creating kernel configuration, you might get prompted for new parameters" +make oldconfig 2>&1 | tee -a $LOGFILE + +log_action "Compiling the kernel" +execute "make -j5" diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel deleted file mode 100755 index 6e17af430..000000000 --- a/testing/scripts/build-umlkernel +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# build an UML kernel based on a vanilla kernel and UML patch -# -# Copyright (C) 2004 Eric Marchionni, Patrik Rayo -# Zuercher Hochschule Winterthur -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -. $PWD/scripts/function.sh - -echo "Building guest kernel version $KERNELVERSION" - -[ -f "$KERNEL" ] || die "Kernel $KERNEL not found" -[ -f "$KERNELCONFIG" ] || die "Kernel config $KERNELCONFIG not found" - -if [ $UMLPATCH ]; then - [ -f "$UMLPATCH" ] || die "Patch $UMLPATCH not found" -fi - -mkdir -p $BUILDDIR -cd $BUILDDIR - -log_action "Unpacking kernel" -execute "tar xjf $KERNEL" - -KERNELDIR=${BUILDDIR}/linux-${KERNELVERSION} -ln -fs linux-${KERNELVERSION} linux -cd $KERNELDIR - -if [ $UMLPATCH ]; then - log_action "Applying uml patch" - bzcat $UMLPATCH | patch -p1 >> $LOGFILE 2>&1 - log_status $? -fi - -execute "cp $KERNELCONFIG .config" 0 - -echo "!!" -echo "!! Creating kernel configuration, you might get prompted for new parameters!" -echo "!!" -make oldconfig ARCH=um 2>&1 | tee -a $LOGFILE - -log_action "Compiling the kernel" -execute "make -j5 linux ARCH=um" - -log_action "Copying kernel to '${BUILDDIR}/linux-uml-${KERNELVERSION}'" -execute "mv linux ${BUILDDIR}/linux-uml-${KERNELVERSION}" |