custom kernel other package DKMS cannot find source / header

News and discussion about development of the Debian OS itself

custom kernel other package DKMS cannot find source / header

Postby hanasaki » 2016-01-14 02:35

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
hanasaki
 
Posts: 22
Joined: 2013-09-10 22:34

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

Postby stevepusser » 2016-01-14 03:43

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.4, Pale Moon 27.3.0, Liquorix kernel 4.10-2, mpv 0.25.0, Kodi 17.1, Ksnip 1.3.1, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8201
Joined: 2009-10-06 05:53

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

Postby hanasaki » 2016-01-14 05:21

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.
hanasaki
 
Posts: 22
Joined: 2013-09-10 22:34

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

Postby stevepusser » 2016-01-14 21:23

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.4, Pale Moon 27.3.0, Liquorix kernel 4.10-2, mpv 0.25.0, Kodi 17.1, Ksnip 1.3.1, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8201
Joined: 2009-10-06 05:53


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable