On Thu, Jan 26, 2017 at 6:46 PM, Burt Silverman <bur...@gmail.com> wrote:
> Thanks, Christian, this is great information. > > Just for fun, before I read this, I wanted to test some of my kernel > building skills. So I just wish to build modules in the drivers/vfio > directory. I want to do what might be called "building an external module" > or "building only one kernel module" as in http://askubuntu.com/ > questions/515407/how-recipe-to-build-only-one-kernel-module or "building > a third party module". But the Google hits like that one assume that you > have no interest in changing the .config. > Is that "Building a module with a different kernel config than the kernel"? In that case that as so close to breaking it intentionally as possible :-) > And one Ubuntu package that may be useful, linux-source, has info showing > up in Synaptic saying "you don't want this package." > That is what you really want - https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide Maybe we should say this in the package - yet URLs tend to change ... > Here is my procedure and I hope it works -- it is relatively painless. > I'll describe it for a particular level. I am using the desktop version of > Ubuntu. > [...] > This is tricky stuff because there is plenty of non-information and > misinformation out there AND > IMHO it just is complex enough to confuse everybody more often than not (myself included if I haven't done it for a few weeks/months). I'm believing in the good of people and expect all misinformation to be based on some case that worked for whoever wrote it in the past :-) In that sense, yours likely will fail for many others AND even for you in a certain time int he future. [...] > Well, this stuff may be slightly off topic, Only slightly :-) > but if I ever have to retrieve my instructions, I'll know where to search, > chuckle. For me the (currently) "right" way to build an external kernel module is DKMS (https://help.ubuntu.com/community/DKMS). For the reasons I mentioned above - intentionally not buidling with different kernel config (never do that, if you want build the full kernel). At a slightly higher rampup time DKMS gives you automatic rebuild of the module on kernel update. So you update your system and get a new security update - fine your extra module will automatically be re-built for you and work - yeah. That is e.g. what we do for the out-of-tree igb_uio module (to get it a bit back to topic) - see https://gerrit.fd.io/r/gitweb?p=deb_dpdk.git;a=blob;f=debian/dpdk-igb-uio-dkms.dkms;h=5141ff61221afeb0b2bb63034665780532c2a46d;hb=refs/heads/16.11.x -- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev