Compling process:
git clone https://github.com/rhdrjones/kvm-unit-tests.git
./configure
make
After compiling successful, you will find there has a lot of *.elf file in the x86/ directory, each file is a test-case that
test under the specific environment.Select one of them that you want to boot.
-----------------------------
Image build process:
mkdir -p iso/boot/grub
cp src/main.elf iso/boot/grub/bin (notice:main.elf is the test-case which you want to boot)
cp template_grub.cfg iso/boot/grub
grub-mkrescue -o xxx.img iso
-------------------------------
The content of template_grub.cfg:
set default=0
set timeout=0
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
menuentry ACRN hypervisor {
echo Load xxxx ...
multiboot --quirk-modules-after-kernel /boot/grub/bin
}
-------------------------------------
qemu-system-x86_64 -machine q35,kernel_irqchip=split,accel=kvm \
-m 4G -smp cpus=4 -enable-kvm \
-device isa-debug-exit -device intel-iommu,intremap=on,caching-mode=on,device-iotlb=on \
-debugcon file:/dev/stdout -serial mon:stdio -display none \
-cdrom xxx.img