A script to add USB Ethernet Gadget configuration as well as other Quality of Life changes to a standard Raspbian SD Card image. This should work with RaspberryPi Zero 2 W, 4 and 5. RaspberryPi Zero (not 2) variants are not currently supported.
Currently only tested on Linux, but should also run on OSx and with Docker Desktop + WSL on Windows 10
Based on the great work of Ben Hardill - https://github.com/hardillb/rpi-gadget-image-creator
${HOSTNAME}
.local/code/${HOSTNAME}
.local/vnc/Choose OS
Custom Image
Note: If you're getting connection problems in either Windows or Linux during the first image boot, I recommend restarting the Pi, after the driver refresh phase, by unplugging it and replugging it, it should work then, if not, open a Ticket and I will see how I can help. Otherwise, have fun!
Clone the repo
git clone https://github.com/hardillb/rpi-gadget-image-creator.git
Run the script and enter the user details(You won't need to configure it with RaspberryPi Imager if you're building your own image.)
./setup.sh
Once complete you can write the image file to a SD Card with any of the usual tools e.g. dd
or balena-etch
.
You can find instructions on the Raspberry Pi website here