Practical means
This commit is contained in:
parent
c79cb31b4a
commit
282bf03cd2
40
README.md
40
README.md
@ -4,7 +4,45 @@ Documents a practical means of setting up a virtual OpenWrt device.
|
||||
|
||||
Targeting OpenWrt 24.10.1, for testing purposes.
|
||||
|
||||
|
||||
## Other docs
|
||||
|
||||
https://openwrt.org/docs/guide-user/virtualization/qemu#openwrt_in_qemu_arm
|
||||
|
||||
https://github.com/dineshloganathan395/dineshloganathan395.github.io/blob/main/_posts/2025-03-19-build-openwrt-for-armsr.adoc
|
||||
|
||||
## Setup
|
||||
Assumes Fedora.
|
||||
|
||||
```sh
|
||||
sudo dnf install -y qemu-system-aarch64 make
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
```sh
|
||||
# There are other files here: https://downloads.openwrt.org/snapshots/targets/armsr/armv8/
|
||||
wget https://downloads.openwrt.org/releases/24.10.1/targets/armsr/armv8/openwrt-24.10.1-armsr-armv8-generic-squashfs-combined-efi.img.gz
|
||||
|
||||
# Unpack.
|
||||
gunzip -c openwrt-*armsr-armv8-generic-squashfs-combined-efi.img.gz > openwrt-arm-64.img
|
||||
|
||||
# Get, and stash, u-boot.
|
||||
mkdir u-boot-qemu_armv8/
|
||||
wget -O u-boot-qemu_armv8/u-boot.bin https://downloads.openwrt.org/releases/24.10.1/targets/armsr/armv8/u-boot-qemu_armv8/u-boot.bin
|
||||
|
||||
# Start!
|
||||
qemu-system-aarch64 -nographic \
|
||||
-cpu cortex-a53 -machine virt \
|
||||
-bios u-boot-qemu_armv8/u-boot.bin \
|
||||
-smp 1 -m 1024 \
|
||||
-device virtio-rng-pci \
|
||||
-drive file=openwrt-arm-64.img,format=raw,index=0,media=disk \
|
||||
-netdev user,id=testlan -net nic,netdev=testlan \
|
||||
-netdev user,id=testwan -net nic,netdev=testwan
|
||||
|
||||
# from https://github.com/dineshloganathan395/dineshloganathan395.github.io/blob/main/_posts/2025-03-19-build-openwrt-for-armsr.adoc#running-openwrt-using-qemu-with-generated-images.
|
||||
|
||||
# You can use Ctrl-a x to terminate QEMU, or Ctrl-a c to get a QEMU
|
||||
# command prompt, similarly to how Ctrl-a : gives you a command prompt
|
||||
# in Screen. ... see https://superuser.com/a/1211516 for other QEMUisms.
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user