Skip to content
Takes a standard Raspbian Lite image and adds USB Ethernet gadget config
Branch: master
Clone or download

Latest commit

Latest commit 8c3d6e2 Feb 21, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
etc Initial commit Feb 21, 2020
lib/systemd/system Initial commit Feb 21, 2020
usr/local/sbin Initial commit Feb 21, 2020
.gitignore Add License Feb 21, 2020
LICENSE Add License Feb 21, 2020 fix typo Feb 21, 2020
create-image Initial commit Feb 21, 2020

Raspbery Pi USB Gadget Image Builder

A script to add USB Ethernet Gadget configuration to a standard Raspbian Lite SD Card image. This should work with Raspberry Pi Zero, Zero W and 4.

Currently only tested on Linux, but should run on OSx


  • Docker
  • expect


Clone the repo

git clone

Copy the raspbian lite image into the rpi-gadget-image-creator directory.


./create-image 2019-09-26-raspbian-buster-lite.img

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


Look at repackaging everything into an extention to DockerPi so the whole thing runs in the container.

You can’t perform that action at this time.