summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
}