Emulating the ARM architecture to run an OpenWrt system
Here we will emulate the ARM architecture using QEMU to run OpenWrt. We will use an already-compiled version from the OpenWrt website (https://downloads.openwrt.org/releases/21.02.3/targets/armvirt/32/) instead of compiling it ourselves, but if you prefer to compile it, you can refer to the instructions in Chapter 8. We will use the same version as in the previous chapter to keep this example simple:
# download the kernel image wget -q https://downloads.openwrt.org/releases/21.02.3/targets/armvirt/32/openwrt-21.02.3-armvirt-32-zImage -O zImage # download a compiled rootfs with a file system for openWRT wget -q https://downloads.openwrt.org/releases/21.02.3/targets/armvirt/32/openwrt-21.02.3-armvirt-32-rootfs-squashfs.img.gz -O rootfs-squashfs.img.gz # now extract the rootfs gunzip rootfs-squashfs.img.gz
Now that we have a working kernel and a filesystem for OpenWRT on ARM, the first thing we will do is check everything was...