Best Practice for building modules and including them in Kernel Snap

Luke Williams luke.williams at canonical.com
Wed Mar 15 19:29:44 UTC 2017


Hello,

What are the best practices for building and including kernel modules with
kernel snaps?

Prior to snapcraft 2.25, when building kernel snaps, the modules would be
located in parts/kernel/install/lib/modules/<kernel.ver>/ so that if I
needed to add custom modules, I could put them in this path and then run
depmod -a -b parts/kernel/install/ <kernel.ver> and it would update the
modules dependancies and symbols and then I could run snapcraft snap and
package everything up.

Now that the modules and firmware directories fall under
parts/kernel/install the depmod -b doesn't work anymore.

What I have done to make this work is I create a symlink to install as lib
and then I can run the depmod command, then I remove the lib symlink and
then run snapcraft snap and everything is good.

This seems kind of kludgy and not the right way to do this. Is there a
recommended way that this should be handled?

-- 
Thanks,


Luke Williams - Technical Partner Manager, Network Switches and Ubuntu-Core
luke.williams at canonical.com
www.canonical.com || www.ubuntu.com



More information about the Snapcraft mailing list