armvirt: update README with new image names
[openwrt/openwrt.git] / target / linux / armvirt / README
1 This target generates images that can be used on ARM machines with EFI
2 support (e.g EDKII/TianoCore or U-Boot with bootefi).
3
4 The kernel and filesystem images can also be used directly by QEMU:
5
6 Run with qemu-system-arm
7
8 # boot with initramfs embedded in
9 qemu-system-arm -nographic -M virt -m 64 -kernel openwrt-armvirt-32-generic-initramfs-kernel.bin
10
11 # boot with accel=kvm
12 qemu-system-arm -nographic -M virt,accel=kvm -cpu host -m 64 -kernel
13 openwrt-armvirt-32-generic-initramfs-kernel.bin
14
15 # boot with a separate rootfs
16 qemu-system-arm -nographic -M virt -m 64 -kernel openwrt-armvirt-32-generic-kernel.bin \
17 -drive file=openwrt-armvirt-32-generic-ext4-rootfs.img,format=raw,if=virtio -append 'root=/dev/vda rootwait'
18
19 # boot with local dir as rootfs
20 qemu-system-arm -nographic -M virt -m 64 -kernel openwrt-armvirt-32-generic-kernel.bin \
21 -fsdev local,id=rootdev,path=root-armvirt/,security_model=none \
22 -device virtio-9p-pci,fsdev=rootdev,mount_tag=/dev/root \
23 -append 'rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p'
24
25 Run with kvmtool
26
27 # start a named machine
28 lkvm run -k openwrt-armvirt-32-zImage -i openwrt-armvirt-32-rootfs.cpio --name armvirt0
29
30 # start with virtio-9p rootfs
31 lkvm run -k openwrt-armvirt-32-zImage -d root-armvirt/
32
33 # stop "armvirt0"
34 lkvm stop --name armvirt0
35
36 # stop all
37 lkvm stop --all
38
39 The multi-platform ARMv8 target can be used with QEMU:
40
41 qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic \
42 -kernel openwrt-armvirt-64-generic-initramfs-kernel.bin \
43
44 With a EDKII or U-Boot binary for the QEMU ARM virtual machines, you can use these
45 images in EFI mode:
46
47 32-bit:
48 gunzip -c bin/targets/armvirt/32/openwrt-armvirt-32-generic-ext4-combined.img.gz > openwrt-arm-32.img
49 qemu-system-arm -nographic \
50 -cpu cortex-a15 -machine virt \
51 -bios QEMU_EFI_32.fd \
52 -smp 1 -m 1024 \
53 -device virtio-rng-pci \
54 -drive file=openwrt-arm-32.img,format=raw,index=0,media=disk \
55 -netdev user,id=testlan -net nic,netdev=testlan \
56 -netdev user,id=testwan -net nic,netdev=testwan
57
58 64-bit:
59 gunzip -c bin/targets/armvirt/64/openwrt-armvirt-64-generic-ext4-combined.img.gz > openwrt-arm-64.img
60 qemu-system-aarch64 -nographic \
61 -cpu cortex-a53 -machine virt \
62 -bios QEMU_EFI_64.fd \
63 -smp 1 -m 1024 \
64 -device virtio-rng-pci \
65 -drive file=openwrt-arm-64.img,format=raw,index=0,media=disk \
66 -netdev user,id=testlan -net nic,netdev=testlan \
67 -netdev user,id=testwan -net nic,netdev=testwan
68
69 One can find EFI/BIOS binaries from:
70 - Compile mainline U-Boot for the QEMU ARM virtual machine (qemu_arm_defconfig/qemu_arm64_defconfig)
71 - From distribution packages (such as qemu-efi-arm and qemu-efi-aarch64 in Debian)
72 - Community builds, like retrage/edk2-nightly: https://retrage.github.io/edk2-nightly/