1 kver = 3.19.0-0.rc4.57.sa2.aarch64
3 kernel = /boot/vmlinuz-$(kver)
4 qemu = /usr/libexec/qemu-kvm
5 modules = virtio.ko virtio_ring.ko virtio_mmio.ko virtio_scsi.ko
6 disks = sda.img sdb.img sdc.img sdd.img sde.img sdf.img
8 all: initrd $(disks) AAVMF_VARS.fd
11 AAVMF_VARS.fd: /usr/share/AAVMF/AAVMF_VARS.fd
14 -drive if=pflash,format=raw,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly \
15 -drive if=pflash,format=raw,file=AAVMF_VARS.fd
21 initrd: dev init $(modules)
22 ls -1d $^ | cpio -o -H newc | gzip -9 > $@
29 find /lib/modules/$(kver) -name $@ -exec cp {} . \;
32 gcc -Wall -Werror -static $< -o $@
36 truncate -s $$(( RANDOM % 3 + 1 ))G $@
37 echo '2048,,L' | sfdisk --force $@
40 rm -f *~ $(disks) $(modules) init initrd AAVMF_VARS.fd
42 run: initrd $(disks) AAVMF_VARS.fd
44 -nodefconfig -nodefaults -display none \
45 -machine virt,accel=kvm \
50 -kernel $(kernel) -initrd initrd \
51 -append 'panic=1 earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1' \
53 -device virtio-scsi-device,id=scsi \
54 -drive file=sda.img,cache=writeback,format=raw,if=none,id=sda \
55 -device scsi-hd,drive=sda \
56 -drive file=sdb.img,cache=writeback,format=raw,if=none,id=sdb \
57 -device scsi-hd,drive=sdb \
58 -drive file=sdc.img,cache=writeback,format=raw,if=none,id=sdc \
59 -device scsi-hd,drive=sdc \
60 -drive file=sdd.img,cache=writeback,format=raw,if=none,id=sdd \
61 -device scsi-hd,drive=sdd \
62 -drive file=sde.img,cache=writeback,format=raw,if=none,id=sde \
63 -device scsi-hd,drive=sde \
64 -drive file=sdf.img,cache=writeback,format=raw,if=none,id=sdf \
65 -device scsi-hd,drive=sdf