Gadget snaps on classic distributions


for raspbian I am currently looking into what kind of support we have for gadget snaps on classic distributions. I’ve heard we added support for this but didn’t found any details. The idea is basically that we can provide slots for GPIO/Serial/… on a Raspberry PI device via a gadget snap.

Anyone has more details about gadget snaps on classic distributions? @pedronis I’ve heard you implemented this, is that correct?


ATM to use gadgets on classic you need /var/lib/snapd/seed to be setup properly (with a seed.yaml and assertions and snaps ) before first boot, I don’t know how they build their images to achieve that

1 Like

They wouldn’t build any different image then they already have. So there is no chance to get a gadget onto an existing raspbian installation?

not as things as currently setup, and you need a model assertion too. having a gadget means being a specific device, so not sure what adding one at later points means and how to make sure various bits align

Makes sense to me. However this mean we currently don’t have any possibility to get GPIO/serial into the hands of snaps on raspbian. @zyga-snapd @JamieBennett @Wimpress ^^

1 Like

it would be awesome to be able to run snaps in other raspberry OS’s. the snap ecosystem is not complete enough to make it work in Ubuntu Core IMO, especially since everything available is headless. Having them in raspbian or Ubuntu Mate would be super helpful

1 Like

I’m exploring this from two avenues:

On one hand side just having a working gadget snap and model would allow some use cases to provide a real seed and work normally as a classic device.

On another hand side I wrote a patch for defining classic.yaml in etc. This is extremely flexible at providing slots during development, much faster and easier than with a full gadget flow.