# 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
-cp $INITRD/boot/vmlinuz $TARGET_ARCH/
+VMLINUZ=( $INITRD/boot/vmlinu* )
+#-- 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
+
QEMU=qemu-system-riscv64
ARGS=(
-M virt -smp 4 -m 4G -nographic -serial stdio
- -kernel riscv64/build/initrd/boot/vmlinux-6.10.9-riscv64
+ #-kernel riscv64/build/initrd/boot/vmlinux-6.10.9-riscv64
+ -kernel riscv64/vmlinuz
-initrd riscv64/initrd.gz
-append "console=ttyS0 root=/dev/vda1 roottype=ext4$APPEND"
-chardev socket,id=QEMU,server=on,wait=off,path=QEMU-riscv64