From eaa602cb14217f2623c9c8c44b6f3012dc4d0b24 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 19 Feb 2018 20:47:41 +0000 Subject: [PATCH 1/2] test/test-functions: on PP64 use vmlinux At least on Ubuntu, ppc64el uses vmlinux-, not vmlinuz. With this, it should be possible to run qemu tests on ppc64el as part of Ubuntu autopkgtests. --- test/test-functions | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test-functions b/test/test-functions index a8c7949668..ac575ade7e 100644 --- a/test/test-functions +++ b/test/test-functions @@ -103,7 +103,15 @@ run_qemu() { if [[ "$LOOKS_LIKE_ARCH" ]]; then KERNEL_BIN=/boot/vmlinuz-linux else - KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER + [ "$ARCH" ] || ARCH=$(uname -m) + case $ARCH in + ppc64*) + KERNEL_BIN=/boot/vmlinux-$KERNEL_VER + ;; + *) + KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER + ;; + esac fi fi From 9a2e265bb00f0f6ab56517627a96b281d6232e3a Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 20 Feb 2018 12:01:40 +0000 Subject: [PATCH 2/2] test/test-functions: on PPC64 use hvc0 console --- test/test-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-functions b/test/test-functions index ac575ade7e..cb83761a6c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -99,6 +99,8 @@ run_qemu() { && KERNEL_BIN="$EFI_MOUNT/$MACHINE_ID/$KERNEL_VER/linux" fi + CONSOLE=ttyS0 + if [[ ! "$KERNEL_BIN" ]]; then if [[ "$LOOKS_LIKE_ARCH" ]]; then KERNEL_BIN=/boot/vmlinuz-linux @@ -107,6 +109,7 @@ run_qemu() { case $ARCH in ppc64*) KERNEL_BIN=/boot/vmlinux-$KERNEL_VER + CONSOLE=hvc0 ;; *) KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER @@ -158,7 +161,7 @@ root=/dev/sda1 \ raid=noautodetect \ loglevel=2 \ init=$PATH_TO_INIT \ -console=ttyS0 \ +console=$CONSOLE \ selinux=0 \ printk.devkmsg=on \ $_cgroup_args \