Page 1 of 1

custom kernel other package DKMS cannot find source / header

Posted: 2016-01-14 02:35
by hanasaki
Built a custom kernel with the below. The build is fine. Install of the kernel, sources, header is fine.
Installing a package (in this case specifically virtualbox) that wants to build its own kernel modules it cannot find the sources or headers.

how can this be addressed?

time fakeroot make-kpkg kernel_image kernel_headers kernel_source

Re: custom kernel other package DKMS cannot find source / he

Posted: 2016-01-14 03:43
by stevepusser
It's looking for build and source symlinks in your kernel's /lib/modules/<kernel-version> folder that link to the headers folder in /usr/src. I noticed that when I used to build kernel debs that way, I would usually have to manually create those if I installed them on the system I created them on.

Now I'm that I'm rebuilding "proper" repository-type Liquorix kernels for MEPIS and MX 15, that issue doesn't come up. It took me a while to figure out a bit of the complex mechanism inside the /debian folder of the Liquorix source enough to make the correct changes in order to port them over to a Wheezy and Jessie base. After that, building them is just like any other backported package.

Re: custom kernel other package DKMS cannot find source / he

Posted: 2016-01-14 05:21
by hanasaki
custom kernel is 4.3.3 downloaded from kernel.org
the source and headers are in /usr/src/linux-headers-4.3.3/ and /usr/src/linux-source-4.3.3/ following the dpkg -i install of the .deb created from making the kernel.

Just looks like the install did not create the symlinks in /lib/modules/4.3.3/

Should it have? I would think so.

Re: custom kernel other package DKMS cannot find source / he

Posted: 2016-01-14 21:23
by stevepusser
This was years ago, but I found that the headers deb would create the symlinks correctly when installed any other machine except for the one used to build them. It seemed that something on that machine got set to use the completed build folder for the kernel by default, instead of creating the correct symlinks to the header folder. But they were easy to create manually.

Note that the kernel build folder also had to hold the completed build, not just freshly extracted source, so the headers folder is going to be a very small fraction of the size.