arm64: Enable virtio-net and add network scripts
Enable POSIX timers to support ping’s POSIX timer syscalls:
- CONFIG_POSIX_TIMERS=y in configs/linux-arm64.config
Enable network stack and virtio-net in kernel config:
- CONFIG_NET, CONFIG_INET, CONFIG_IP_MULTICAST, CONFIG_IP_PNP
- CONFIG_IP_PNP_DHCP, CONFIG_NETDEVICES, CONFIG_VIRTIO
- CONFIG_VIRTIO_NET, CONFIG_VIRTIO_RING
Add virtio_net_dev to FDT generation:
- src/arch/arm64/vm.c: include virtio_net_dev in interrupt-map
Define VIRTIO_NET_IRQ=2 (SPI 34) in src/arch/arm64/desc.h
Add scripts for host and guest network setup:
- scripts/set-host-bridge.sh to configure TAP bridge and default route
- scripts/set-guest-route.sh to configure guest static IP and route
Update README.md with new scripts and build instructions
These changes have been validated on both a Raspberry Pi 5 Model B (Revision 1.0) running Ubuntu 25.10 with Linux kernel 6.14.0 and an NVIDIA Jetson Orin Nano Developer Kit running JetPack 6.2.1 (L4T 36.4.4) with Linux kernel 5.15.148-tegra.
Many thanks to @visitorckw.
I rebased the branch, interchanged patches 2 and 3, flagged patch 2 for squashing, and force-pushed the result. Please examine the changes at your convenience.
I’ve removed the unneeded ARM64 kernel configs (CONFIG_UNIX, CONFIG_UNIX_SCM, CONFIG_AF_UNIX_OOB) and renamed “Stop Emulator” to “Exit Emulator” in the README to better reflect its behavior. Please take a look and let me know if everything looks good for merge!
Update
The changes were validated on the NVIDIA Jetson Orin Nano Developer Kit running JetPack 6.2.1 (L4T 36.4.4) with Linux kernel version 5.15.148-tegra. Network functionality within the guest operating system was confirmed to operate correctly.
Update
I’ve updated the README example to use the standard $ prompt instead of ❯ for the ip a command.
Also, just a heads-up, the change requested by @visitorckw is no longer applicable, as the commit they referenced was removed by a force‑push.
Many thanks to @visitorckw.
I rebased the branch, interchanged patches 2 and 3, flagged patch 2 for squashing, and force-pushed the result. Please examine the changes at your convenience.
Let me know if you’d like any further tweaks. Thanks.