summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGabriele Giacone <1o5g4r8o@gmail.com>2014-03-16 17:47:22 +0100
committerHolger Levsen <holger@layer-acht.org>2014-04-07 17:10:47 +0200
commit87b38c6f0c748b315f6b6ce7a4bde67d00f2b686 (patch)
treea6ffc33442164bde857d014a7a057740ecca51fd /bin
parente75a5ab4ce1237e71af2a48b6360195b574f236f (diff)
downloadjenkins.debian.net-87b38c6f0c748b315f6b6ce7a4bde67d00f2b686.tar.xz
Switch to QEMU launcher file.
Switch to QEMU launcher file under workspace/ because jenkins doesn't escape correctly hurd QEMU multiboot command line (see qemu manpage, "-initrd "file1 arg=foo,file2"). Add hurd QEMU multiboot command line.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 51b24a12..317f5146 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -132,6 +132,11 @@ bootstrap_system() {
QEMU_OPTS="$QEMU_OPTS -cdrom $IMAGE -boot d"
case $NAME in
*_kfreebsd) ;;
+ *_hurd*)
+ QEMU_SERIAL_OUT=${WORKSPACE}/serial-out.log
+ QEMU_OPTS="$QEMU_OPTS -serial file:${QEMU_SERIAL_OUT}"
+ gzip -cd $IMAGE_MNT/boot/kernel/gnumach.gz > $WORKSPACE/gnumach
+ ;;
*) QEMU_KERNEL="--kernel $IMAGE_MNT/install.amd/vmlinuz --initrd $IMAGE_MNT/install.amd/gtk/initrd.gz"
esac
else
@@ -216,10 +221,16 @@ bootstrap_system() {
echo
echo "Starting QEMU now:"
set -x
- (sudo qemu-system-x86_64 \
- $QEMU_OPTS \
- $QEMU_KERNEL \
- --append "$APPEND" && touch $RESULTS/qemu_quit ) &
+ QEMU_LAUNCHER=$(mktemp $WORKSPACE/qemu-launcher-XXXXXXXX.sh)
+ echo "cd $WORKSPACE" > $QEMU_LAUNCHER
+ echo -n "sudo qemu-system-x86_64 $QEMU_OPTS " >> $QEMU_LAUNCHER
+ if [ -v QEMU_KERNEL ]; then
+ echo -n "$QEMU_KERNEL " >> $QEMU_LAUNCHER
+ else # Hurd needs multiboot options jenkins can't escape correctly
+ echo -n '--kernel '$WORKSPACE'/gnumach --initrd "'$IMAGE_MNT'/boot/gtk/initrd.gz \$(ramdisk-create),'$IMAGE_MNT'/boot/kernel/ext2fs.static --multiboot-command-line=\${kernel-command-line} --host-priv-port=\${host-port} --device-master-port=\${device-port} --exec-server-task=\${exec-task} -T typed gunzip:device:rd0 \$(task-create) \$(task-resume),'$IMAGE_MNT'/boot/kernel/ld.so.1 /hurd/exec \$(exec-task=task-create)" ' >> $QEMU_LAUNCHER
+ fi
+ echo "--append \"$APPEND\"" >> $QEMU_LAUNCHER
+ (bash -x $QEMU_LAUNCHER && rm -f $QEMU_LAUNCHER && touch $RESULTS/qemu_quit ) &
set +x
}