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