-kver = 3.19.0-0.rc5.git2.1.fc22.aarch64
+kver = 3.19.0-0.rc4.57.sa2.aarch64
+use_efi = 1
modules = virtio.ko virtio_ring.ko virtio_mmio.ko virtio_scsi.ko
disks = sda.img sdb.img sdc.img sdd.img sde.img sdf.img
-all: initrd $(disks)
+all: initrd $(disks) AAVMF_VARS.fd
+
+ifeq ($(use_efi),1)
+AAVMF_VARS.fd: /usr/share/AAVMF/AAVMF_VARS.fd
+ cp $< $@
+efi_params = \
+ -drive if=pflash,format=raw,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly \
+ -drive if=pflash,format=raw,file=AAVMF_VARS.fd
+else
+AAVMF_VARS.fd:
+ touch $@
+endif
initrd: dev init $(modules)
ls -1d $^ | cpio -o -H newc | gzip -9 > $@
echo '2048,,L' | sfdisk --force $@
clean:
- rm -f $(disks) $(modules) init initrd
+ rm -f $(disks) $(modules) init initrd AAVMF_VARS.fd
kernel = /boot/vmlinuz-$(kver)
qemu = qemu-system-aarch64
-run: initrd $(disks)
+run: initrd $(disks) AAVMF_VARS.fd
$(qemu) \
-nodefconfig -nodefaults -display none \
-machine virt,accel=kvm \
-no-reboot \
-cpu host \
-m 1024 \
+ $(efi_params) \
-kernel $(kernel) -initrd initrd \
-append 'panic=1 earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1' \
-serial stdio \