Allow for various namings of the linux kernel package
authorRalph Ronnquist <rrq@rrq.au>
Tue, 29 Oct 2024 21:23:33 +0000 (08:23 +1100)
committerRalph Ronnquist <rrq@rrq.au>
Tue, 29 Oct 2024 21:23:33 +0000 (08:23 +1100)
build-installer.sh

index 0c5545ba31b92593963dd3fc954d97f22b285fac..68e117d234e7bb47b68df7aad5c7ddfc3991bc5f 100755 (executable)
@@ -230,8 +230,10 @@ sed 's/iso9960\b/squashfs/' -i $INITRD/var/lib/dpkg/info/cdrom-detect.postinst
 # Pack up $INITRD into a top-level initrd.gz, and copy out vmlinuz
 find $INITRD -not -name udebs -printf '%P\n' | \
     fakeroot cpio -o -H newc -D $INITRD | gzip > $TARGET_ARCH/initrd.gz
-VMLINUZ=$INITRD/boot/vmlinuz-$KERNELVERSION
+VMLINUZ="$INITRD/boot/vmlinuz-$KERNELVERSION"
+[ -r "$VMLINUZ" ] || VMLINUZ="$INITRD/boot/vmlinuz"
+[ -r "$VMLINUZ" ] || VMLINUZ="$INITRD/boot/vmlinux-$KERNELVERSION"
+[ -r "$VMLINUZ" ] || VMLINUZ="$INITRD/boot/vmlinux"
+cp $VMLINUZ $TARGET_ARCH/ && ln -sTf "${VMLINUZ#***/}" $TARGET_ARCH/kernel
 #-- Note that this renames it to vmlinuz regarless of its real name
 #-- Eg the riscv64 kernel is actually not compressed
-cp $VMLINUZ $TARGET_ARCH/vmlinuz
-