How to push a "kernel" or "gadget" snap?


I have built kernel and gadget snaps for a nanopi-neo-plus2 device, and created and signed a model assertion. Now I’m trying to build an image with ubuntu-image.

I naively assumed the kernel and gadget snaps would come from local disk, but it told me it couldn’t find them. I interpreted this as meaning they needed to be uploaded to the snapcraft store, so I registered the package names and tried to push them with ‘snapcraft push foo --release edge’ but it tells me:

The Store automatic review failed.
A human will soon review your snap, but if you can't wait please write in the snapcraft forum asking for the manual review explicitly.
If you need to disable confinement, please consider using devmode, but note that devmode revision will only be allowed to be released in edge and beta channels.
Please check the errors and some hints below:
  - (NEEDS REVIEW) type 'kernel' not allowed

(Note that both my kernel and gadget snaps have “confinement: devmode” and “grade: devel” in their respective snapcraft.yaml files).

This page seems to suggest that I ought to be able to push to that channel, but the fact that the error message is telling me to “use devmode” is confusing because I thought I alreadyu had.

My page for the relevant package echos the above error, “(NEEDS REVIEW) type ‘kernel’ not allowed lint-snap-v2_snap_type_redflag”.

Is this a bug? Am I doing it wrong? Any kind of help appreciated.


kernel and gadget snaps always have to get an initial manual review (to make sure nobody simply uploads a kernel with keylogger included etc)

if you want to use a kernel/gadget from local disk, use the --extra-snaps option of ubuntu-image and point to the snap file like:

ubuntu-image --channel edge --extra-snaps /foo/bar/mykernel_1.2.3.snap --extra-snaps /foo/bar/mygadget_0.1.snap mymodel.assertion