How to build the mainline kernel source package?

Posted by Maxime R. on Ask Ubuntu See other posts from Ask Ubuntu or by Maxime R.
Published on 2011-12-21T17:17:29Z Indexed on 2012/10/14 15:51 UTC
Read the original article Hit count: 268

Filed under:
|

Ubuntu kernel PPA only provides linux-headers*.deb and linux-image*.deb packages. How can I build the corresponding linux-source*.deb package ?

Context:

I'm currently running Ubuntu 11.10 with the mainline kernel (3.2 rc6 now) to get a better support for my sandybridge IGP (Dell E6420 laptop with intel i5-2520M CPU).

Appears, i'd like to install this touchpad driver, ALPS touchpads being badly supported (see previous link bug report), while waiting for upstream support in kernel version 3.3.

Problem is, DKMS keeps complaining about not finding the full kernel source:

Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

Appears I may not need the full source but I'd still like to try having it installed to see if it solve my problem.

What I tried :

  1. Uncompressing the kernel.org source archive in /usr/src/. DKMS still complaining.
  2. Manually updating the kernel source package with uupdate and the mainline source package like explained here. Did not succeed.
  3. Manually building the linux-source package following @roadmr and @elmicha instructions. I eventually succeeded to build it but DKMS still complained about the missing source.
  4. At last I noticed an error I did not catch in the first place while reinstalling the kernel headers. Appears the .deb I got may have been corrupted, downloading it again did the trick :) Alas, while DKMS agreed to compile the module i ran into the following error which appears to have already been reported. This issue isn't yet solved but I won't try to because of the following: in the end I decided to test the precise kernel version 3.2-rc6 through the xorg-edgers ppa which appears to be correctly patched: it works.

Nevertheless, it might still be of some interest to know how to build the mainline linux-source package as the Ubuntu Kernel Team doesn't provide it. Not to mention that I learned a lot in the process ^^

© Ask Ubuntu or respective owner

Related posts about kernel

Related posts about repository