diff --git a/test/bzimage/bzImage.0 b/test/bzimage/bzImage.0 new file mode 100644 index 0000000..c21b537 Binary files /dev/null and b/test/bzimage/bzImage.0 differ diff --git a/test/bzimage/bzImage.1 b/test/bzimage/bzImage.1 new file mode 100644 index 0000000..c21b537 Binary files /dev/null and b/test/bzimage/bzImage.1 differ diff --git a/test/qcow2-img/.gitattributes b/test/qcow2-img/.gitattributes new file mode 100644 index 0000000..61eb4d5 --- /dev/null +++ b/test/qcow2-img/.gitattributes @@ -0,0 +1,2 @@ +debian-12-nocloud-amd64.node0.qcow2 filter=lfs diff=lfs merge=lfs -text +debian-12-nocloud-amd64.node1.qcow2 filter=lfs diff=lfs merge=lfs -text diff --git a/test/qcow2-img/debian-12-nocloud-amd64.node0.qcow2 b/test/qcow2-img/debian-12-nocloud-amd64.node0.qcow2 new file mode 100644 index 0000000..a06db96 --- /dev/null +++ b/test/qcow2-img/debian-12-nocloud-amd64.node0.qcow2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b55060ccdb33e4108020bcb391872eb29813806b66f9a8cb5dfacce217ff5019 +size 377356288 diff --git a/test/qcow2-img/debian-12-nocloud-amd64.node1.qcow2 b/test/qcow2-img/debian-12-nocloud-amd64.node1.qcow2 new file mode 100644 index 0000000..a06db96 --- /dev/null +++ b/test/qcow2-img/debian-12-nocloud-amd64.node1.qcow2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b55060ccdb33e4108020bcb391872eb29813806b66f9a8cb5dfacce217ff5019 +size 377356288 diff --git a/test/qemu-linux-node0.sh b/test/qemu-linux-node0.sh new file mode 100755 index 0000000..52b642c --- /dev/null +++ b/test/qemu-linux-node0.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +_SCRIPT_DIR=$(dirname -- $0) + +# Should have called the directory linux-torvalds, ah well. +# Be careful not to drop serial port driver support! +_KERNEL_DIR="${_SCRIPT_DIR}/bzimage/bzImage.0" + +# BusyBox + glibc. +_ROOTFS_DIR="${_SCRIPT_DIR}/rootfs-img/rootfs.ext4.0" + +# Number of processes usable by VM. +_SMP=2 + +printf "Using kernel @ %s\n" $_KERNEL_DIR +printf "Using rootfs @ %s\n" $_ROOTFS_DIR +printf "Press any key to continue...\n" +read -n 1 -r &>/dev/null + +qemu-system-x86_64 \ + -kernel $_KERNEL_DIR \ + -append "root=/dev/vda console=ttyS0 earlyprintk=serial nokaslr" \ + -nographic \ + -drive file=$_ROOTFS_DIR,if=virtio,index=0,media=disk,format=raw \ + -m 512M \ + -enable-kvm \ + -cpu host \ + -smp $_SMP \ + -nic bridge,br=virbr0,model=e1000 \ + +# `-s` enables gdb listening at :1234 +# `-S` stops emulator from running unless gdb listens diff --git a/test/rootfs-img/rootfs.ext4.0 b/test/rootfs-img/rootfs.ext4.0 new file mode 100644 index 0000000..c49d770 Binary files /dev/null and b/test/rootfs-img/rootfs.ext4.0 differ diff --git a/test/rootfs-img/rootfs.ext4.1 b/test/rootfs-img/rootfs.ext4.1 new file mode 100644 index 0000000..e8e12ee Binary files /dev/null and b/test/rootfs-img/rootfs.ext4.1 differ