this post was submitted on 19 Apr 2025
25 points (90.3% liked)
Linux
53724 readers
809 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
no change
Hmm, not sure then. It seems correct to me. Check out this repo, it has systemd services for all the USB gadgets, you can run uvc very easily with this: https://github.com/BigfootACA/systemd-gadget
I can write specific instructions how to get this working later today, if you'll need them.
Looking at those units I noticed something... ExecStart=/usr/bin/ln -s ${GADGET}/functions/uvc.0 ${GADGET}/configs/a.1/
It's an a.1 instead of a c.1. Surely it couldn't be as simple as just using a different letter, could it?
No, unfortunately not :/
That's just the "name" of the configuration, for instance in my USB ethernet gadget I use both c.1 and c.2 as config names, and not a.1.
Once I crack this, I think it could be fun to create a script that could spoof devices plugged into it with the gadget framework. Could save me a lot of trouble creating known-working usb configs down the road. Instead of starting from scratch each time, I would just have to tweak an existing profile.
Hey, if you ever create that, give me a shoutout, I'd love to see it.
Honestly it’s just an idea to suck up time at this point. I do NOT have the skills for this shit, as we can see here. I can correct what ChatGPT gets wrong though and just run with that.
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
andgadget-start.service
. You also need to copy them beforehand to/etc/systemd/system
, includinggadget-init.service
, and you need to copygadget
to/etc/default/gadget
, and the scriptsgadget-start.sh
andgadget-init.sh
to/etc/systemd/scripts
. Edit/etc/default/gadget
to edit the configs and names of the gadget, and then startgadget-start.service
. No need to enablegadget-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.there is no setup and the instructions for a manual install keep getting me weird complaints from systemd about dependancies. It occurs to me that tackling this is error doesn't make sense because it requires systemd to work and ultimately I want to run this on a diskless alpine linux install which doesnt use systemd.
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.
woot! let me know what you come up with.