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