-
Notifications
You must be signed in to change notification settings - Fork 29
arm64: enable virtio-net and add network scripts #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since patch 3 fixes a typo introduced in patch 1 of this PR, please squash patch 3 into patch 1 using git rebase -i to keep the history clean.
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, CONFIG_UNIX - CONFIG_UNIX_SCM, CONFIG_AF_UNIX_OOB 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 a Raspberry Pi 5 Model B (Revision 1.0) running Ubuntu 25.10 with Linux kernel version 6.14.0.
The previous URL of The Linux/x86 Boot Protocol returned a 404 error due to an incorrect origin. Updated the link to point to the correct resource. References: - The Linux/x86 Boot Protocol: https://www.kernel.org/doc/html/latest/arch/x86/boot.html
b8bb89c
to
60835d6
Compare
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. |
@@ -42,8 +44,63 @@ containing concatenated `bootsect.o + setup.o + misc.o + piggy.o`. `initrd` is t | |||
initial RAM disk image, which is an optional argument. | |||
`disk-image` is the path to disk image which can be mounted as a block device via virtio. For the reference Linux guest, ext4 filesystem is used for disk image. | |||
|
|||
### Stop Emulator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is meant to "stop" the emulation. Instead, the operation is dedicated to "exit" from the execution loop.
CONFIG_UNIX=y | ||
CONFIG_UNIX_SCM=y | ||
CONFIG_AF_UNIX_OOB=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm if they are needed or not.
Enable POSIX timers to support ping’s POSIX timer syscalls:
Enable network stack and virtio-net in kernel config:
Add virtio_net_dev to FDT generation:
Define VIRTIO_NET_IRQ=2 (SPI 34) in src/arch/arm64/desc.h
Add scripts for host and guest network setup:
Update README.md with new scripts and build instructions
These changes have been validated on a Raspberry Pi 5 Model B
(Revision 1.0) running Ubuntu 25.10 with Linux kernel version 6.14.0.