From 87b38c6f0c748b315f6b6ce7a4bde67d00f2b686 Mon Sep 17 00:00:00 2001 From: Gabriele Giacone <1o5g4r8o@gmail.com> Date: Sun, 16 Mar 2014 17:47:22 +0100 Subject: 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. --- bin/g-i-installation.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'bin/g-i-installation.sh') 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 } -- cgit v1.2.3-54-g00ecf