]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: support /boot/vmlinux
authorBenjamin Drung <benjamin.drung@canonical.com>
Wed, 16 Aug 2023 23:03:20 +0000 (01:03 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Tue, 22 Aug 2023 11:50:42 +0000 (07:50 -0400)
On the Ubuntu ppc64el architecture the kernel is named `/boot/vmlinux`.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
test/run-qemu

index 1522293442fec5848c9ed29d025d1902f0047c00..0ce27b51790098d7a1fe335cf3c992aea00356ff 100755 (executable)
@@ -30,14 +30,23 @@ fi
 KVERSION=${KVERSION-$(uname -r)}
 
 VMLINUZ="/lib/modules/${KVERSION}/vmlinuz"
+if ! [ -f "$VMLINUZ" ]; then
+    VMLINUZ="/lib/modules/${KVERSION}/vmlinux"
+fi
 
 if ! [ -f "$VMLINUZ" ]; then
     [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
 
     if [[ $MACHINE_ID ]] && { [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]]; }; then
         VMLINUZ="/boot/${MACHINE_ID}/$KVERSION/linux"
-    else
+    elif [ -f "/boot/vmlinuz-${KVERSION}" ]; then
         VMLINUZ="/boot/vmlinuz-${KVERSION}"
+    elif [ -f "/boot/vmlinux-${KVERSION}" ]; then
+        VMLINUZ="/boot/vmlinux-${KVERSION}"
+    else
+        echo "Could not find a Linux kernel version $KVERSION to test with!" >&2
+        echo "Please install linux." >&2
+        exit 1
     fi
 fi