Open Iuliean opened 3 years ago
This is unfortunately difficult to achieve. It is possible for QEMU to add a virtual USB ethernet adapter to the Raspi VM. However, to use this virtual ethernet adapter, the virtual raspi requires two kernel modules: USB_ETH and USB_DWC2. These have to be compiled WITH the kernel (to ensure both are the same version), and installed in the root partition.
Recently I've published a Docker image that includes QEMU, RaspiOS Lite and has internet access. In the dockerfile
you can find step by step how to achieve the process described above.
If you are on a MAC, I created a PR for the native emulation that sync's up the kernel version with the release of RaspiOS to match, so that usb networking works.
@ptrsr Would you mind publishing a recent kernel (buster, bullseye) in your repository that includes the two modules needed (USB_ETH and USB_DWC2)?
@fgenoese here you go. I'm planning to create a separate repo in which the image, kernel and device tree blob are automatically build and shared. For now you can use the files provided above.
How do you set that up ?
I am using native-emulation