You should definitely try with the systemd-gadgets I linked earlier. It makes all the configuration really easy, you just need to enable the relevant services, so in your case usbgadget-func-uvc.service
and gadget-start.service
. You also need to copy them beforehand to /etc/systemd/system
, including gadget-init.service
, and you need to copy gadget
to /etc/default/gadget
, and the scripts gadget-start.sh
and gadget-init.sh
to /etc/systemd/scripts
. Edit /etc/default/gadget
to edit the configs and names of the gadget, and then start gadget-start.service
. No need to enable gadget-init.service
, it’s called as a dependency from other services.
There’s an install script in the repo that you can use as well, setup.sh
, and a PKGBUILD so you can create an Arch package. After installing with either method, just change /etc/default/gadget
, enable the uvc and gadget start services, and then just start the gadget start service.
Sorry, my bad, I forgot that the setup script isn’t part of the default repo and is something I added in my own fork. But yeah, if there’s no systemd, it’s no use.
I can whip up a quick script that should work, I’ll test it out on my own hardware, and post it here for you sometime tomorrow.