From aa5803e0e3368172d7674ff760983c568118df16 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Mon, 19 Nov 2012 10:43:42 +0100 Subject: testing: Switch to Debian based guest images Instead of extracting a downloaded Gentoo filesystem tree into a file containing a reiserfs filesystem, create an ext3 filesystem inside a sparse file, mount it and debootstrap an up-to-date Debian system. Use this image as base for all UML guest images. Also, drop support for the various consoles and use xterm unconditionally. --- testing/scripts/build-umlkernel | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'testing/scripts/build-umlkernel') diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel index b9f0d710d..44e27c2b2 100755 --- a/testing/scripts/build-umlkernel +++ b/testing/scripts/build-umlkernel @@ -67,15 +67,6 @@ fi cecho " * Changing to directory '$BUILDDIR'" cd $BUILDDIR -LOGFILE=${BUILDDIR}/testing.log - -if [ ! -f $LOGFILE ] -then - cecho-n " * Logfile '$LOGFILE' does not exist..creating.." - touch $LOGFILE - cgecho "done" -fi - cecho-n " * Unpacking kernel.." tar xjf $KERNEL >> $LOGFILE 2>&1 cgecho "done" @@ -119,10 +110,10 @@ cp $KERNELCONFIG .config cecho "!!" cecho "!! Making .config for kernel. You might be prompted for new parameters!" cecho "!!" -make oldconfig ARCH=um SUBARCH=i386 2>&1 | tee -a $LOGFILE +make oldconfig ARCH=um 2>&1 | tee -a $LOGFILE cecho-n " * Now compiling uml kernel.." -make linux ARCH=um SUBARCH=i386 >> $LOGFILE 2>&1 +make -j5 linux ARCH=um >> $LOGFILE 2>&1 cgecho "done" cecho-n " * Copying uml kernel to '${BUILDDIR}/linux-uml-${KERNELVERSION}'.." -- cgit v1.2.3 From 5828e434bd654d42f01e6b36845fa4f2964dec22 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Thu, 6 Dec 2012 17:02:38 +0100 Subject: Update build-umlkernel script to new log format --- testing/scripts/build-umlkernel | 109 +++++++++------------------------------- 1 file changed, 24 insertions(+), 85 deletions(-) (limited to 'testing/scripts/build-umlkernel') diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel index 44e27c2b2..3947e4ab1 100755 --- a/testing/scripts/build-umlkernel +++ b/testing/scripts/build-umlkernel @@ -15,107 +15,46 @@ # for more details. DIR=`dirname $0` +. $DIR/function.sh -source $DIR/function.sh +[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found" -[ -f $DIR/../testing.conf ] || die "configuration file 'testing.conf' not found" +. $DIR/../testing.conf -source $DIR/../testing.conf +echo "Building guest kernel version $KERNELVERSION" -cecho-n " * Looking for kernel at '$KERNEL'.." -if [ -f "${KERNEL}" ] -then - cecho "found it" - KERNELVERSION=`basename $KERNEL .tar.bz2 | sed -e 's/linux-//'` - cecho " * Kernel version is $KERNELVERSION" -else - cecho "none" - exit -fi - -if [ ${UMLPATCH} ] -then - cecho-n " * Looking for uml patch at '$UMLPATCH'.." - if [ -f "${UMLPATCH}" ] - then - cecho "found it" - else - cecho "none" - exit - fi -fi - -cecho-n " * Looking for kernel config at '$KERNELCONFIG'.." -if [ -f "${KERNEL}" ] -then - cecho "found it" -else - cecho "none" - exit -fi - -####################################################### -# unpack kernel and create symlink -# +[ -f "$KERNEL" ] || die "Kernel $KERNEL not found" +[ -f "$KERNELCONFIG" ] || die "Kernel config $KERNELCONFIG not found" -if [ ! -d $BUILDDIR ] -then - cecho " * Creating directory '$BUILDDIR'" - mkdir $BUILDDIR +if [ $UMLPATCH ]; then + [ -f "$UMLPATCH" ] || die "Patch $UMLPATCH not found" fi -cecho " * Changing to directory '$BUILDDIR'" +mkdir -p $BUILDDIR cd $BUILDDIR -cecho-n " * Unpacking kernel.." -tar xjf $KERNEL >> $LOGFILE 2>&1 -cgecho "done" +log_action "Unpacking kernel" +execute "tar xjf $KERNEL" KERNELDIR=${BUILDDIR}/linux-${KERNELVERSION} - -if [ -d $KERNELDIR ] -then - cecho " * Kernel directory is '$KERNELDIR'" - cecho " * Creating symlink 'linux'" - if [ -d linux ] - then - rm linux - fi - ln -s linux-${KERNELVERSION} linux -else - cecho "!! Kernel directory '$KERNELDIR' can not be found" - exit -fi - -####################################################### -# patch kernel -# - -cecho " * Changing to directory '$KERNELDIR'" +ln -fs linux-${KERNELVERSION} linux cd $KERNELDIR -if [ $UMLPATCH ] -then - cecho-n " * Applying uml patch.." - bzcat $UMLPATCH | patch -p1 >> $LOGFILE 2>&1 - cgecho "done" +if [ $UMLPATCH ]; then + log_action "Applying uml patch" + bzcat $UMLPATCH | patch -p1 >> $LOGFILE 2>&1 + log_status $? fi -####################################################### -# copy our default .config to linux and build kernel -# - -cp $KERNELCONFIG .config +execute "cp $KERNELCONFIG .config" 0 -cecho "!!" -cecho "!! Making .config for kernel. You might be prompted for new parameters!" -cecho "!!" +echo "!!" +echo "!! Creating kernel configuration, you might get prompted for new parameters!" +echo "!!" make oldconfig ARCH=um 2>&1 | tee -a $LOGFILE -cecho-n " * Now compiling uml kernel.." -make -j5 linux ARCH=um >> $LOGFILE 2>&1 -cgecho "done" +log_action "Compiling the kernel" +execute "make -j5 linux ARCH=um" -cecho-n " * Copying uml kernel to '${BUILDDIR}/linux-uml-${KERNELVERSION}'.." -mv linux ${BUILDDIR}/linux-uml-${KERNELVERSION} -cgecho "done" +log_action "Copying kernel to '${BUILDDIR}/linux-uml-${KERNELVERSION}'" +execute "mv linux ${BUILDDIR}/linux-uml-${KERNELVERSION}" -- cgit v1.2.3 From 7c2ef58e86c10e0cf9846dc9211cc68c7e908f7f Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Thu, 6 Dec 2012 19:03:45 +0100 Subject: Import testing.conf file in function.sh This is needed to have access to $LOGFILE and possibly other config settings. --- testing/scripts/build-umlkernel | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'testing/scripts/build-umlkernel') diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel index 3947e4ab1..6e17af430 100755 --- a/testing/scripts/build-umlkernel +++ b/testing/scripts/build-umlkernel @@ -14,12 +14,7 @@ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. -DIR=`dirname $0` -. $DIR/function.sh - -[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found" - -. $DIR/../testing.conf +. $PWD/scripts/function.sh echo "Building guest kernel version $KERNELVERSION" -- cgit v1.2.3 From f9df3d06b5b4e5e5f00d294f555a373afd6bf99e Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Fri, 7 Dec 2012 11:33:27 +0100 Subject: Rename build-umlkernel script to build-guestkernel --- testing/scripts/build-umlkernel | 55 ----------------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 testing/scripts/build-umlkernel (limited to 'testing/scripts/build-umlkernel') 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 . -# -# 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}" -- cgit v1.2.3