Hey,
I’m playing around with a board that doesn’t have a Ubuntu Core image or gadget available for it and for the time being I’m using a Ubuntu Jammy image provided by the manufacturer. I’ve installed snapd and with that comes the generic-classic model which works great and I can install snaps. Now I’d like to remodel this device to point at a brand store, custom serial-vault etc to experiment on our private snaps using this board. Side loading the snaps is an option but it would be great to remodel so we can refresh rather than side load new versions when ssh isn’t available. (Also I’m curious to learn more about the interworkings of snapd here)
From my understanding the only way to do that is with a custom gadget snap and a prepare-device hook. With that I have two questions:
- Is it possible to do this without the gadget? For now I’m just testing so I don’t want to deal with building out the full gadget snap, integrating uboot, device trees and all that. Pulling and locally ack’ing a serial assertion to avoid setting the serial-vault via gadget seems like a possibility but that requires a device-key among other things which seems like a rabbit hole. Is there a path forward here?
- If #1 is not possible, is it possible to build a minimal gadget that only sets the serial-vault info? Again, while testing I’d like to avoid messing with all the other pieces that come from the gadget.
The other issue here is that I’m not even sure it’s possible to remodel from generic-classic. Maybe I’m missing something or doing something wrong but I’m getting this when trying to remodel.
root@jammy:~# snap remodel my-model-no-gadget.model
error: cannot remodel: cannot remodel device: cannot remodel from classic (non-hybrid) model
For the time being I’m testing this using a model I made signed by my personal snapcraft account, no brand store or custom serial-vault.
{
"type": "model",
"series": "16",
"model": "dev-damian",
"architecture": "arm64",
"authority-id": "<redacted>",
"brand-id": "<redacted>",
"timestamp": "2024-08-19T22:39:15+00:00",
"base": "core22",
"grade": "dangerous",
"classic": "true",
"distribution": "ubuntu",
"snaps": [
{
"name": "core22",
"type": "base",
"default-channel": "latest/stable",
"id": "amcUKQILKXHHTlmSa7NMdnXSx02dNeeT"
},
{
"name": "snapd",
"type": "snapd",
"default-channel": "latest/stable",
"id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
}
]
}