Kernel snap with custom module

I am currently using the stock (lowlatency) kernel for an amd64 based uc core18 system (Ubuntu-4.15.0-148.152). The manufacturer of the specific target device, have sent a custom kernel module (Makefile and single c file) for fixing a problem with the touch display.

Are there any reference examples or guides related to this, i.e. (I guess) building a custom kernel snap that includes the module?


this is pretty old (and i’m not sure it still builds currently) but it might give you an idea:

Thanks for the quick reply Oliver - definitely useful!

Regarding the kconfigflavour/kconfigs options - what is the easiest way if i just want to use the same config as the lowlatency stock version plus/minus a few things related to the module?

Do I have to dig out the entire .config and under kconfigs or is there a shortcut?

just ignore the kconfig stuff in there, if you use:

you should be able to use the existing snapcraft.yaml in there as a starting point and just change kconfigflavour: generic to kconfigflavour: lowlatency