How to build Custom Kernel in LMDE

Archived topics about LMDE 1
Forum rules
RJVB
Level 1
Level 1
Posts: 47
Joined: Tue Jul 03, 2012 1:50 pm

Re: How to build Custom Kernel in LMDE

Postby RJVB » Mon Jan 06, 2014 4:48 am

Hello,

This worked (almost) like a treat, except that there's one difference with the "official" Mint packages. The official kernel headers are installed in separate /usr/src/*-common and /usr/src/*-amd64 trees, with /lib/modules/3.10*/source pointing to the former and /lib/modules/3.10*/build pointing to the latter. In my custom built packages, all headers are installed in a single tree in /usr/src. I presume that might be OK, but the modules source and build point both to the real kernel source directory in which I did the build. Somewhere I consider that an error because IMHO the whole point with packages is that they ought to be standalone, and not depend on the build context ...

Could it be that dpkg is "clever" to detect the presence of the full build tree and link to that instead of to the installed headers (as it would when the full build tree is not present)?

I should add that during the installation of the headers package, dpkg did complain that the corresponding /lib/modules tree was not available. Curiously I did not see this message when I installed the linux-headers-3.10-all package from the server, when it installed the rt headers (I don't have the rt kernel installed).

Another issue: somehow make-kpkg did not catch the presence of "illegal" (uppercase ...) characters in the local version string BEFORE spending hours compiling the whole thing, but only when it started to create the packages. Not fun if you have no idea that this might happen, esp. since changing the local version string requires rebuilding a significant portion of the tree (I'd say about 1/7th, around 14%). I seem to have understood from googling that this ought to have been caught at the start, any ideas why that didn't happen?

One thing that I do appreciate is that update-initramfs now takes an acceptable time. When I followed the traditional route (make xconfig && make && make modules_install install), generating the initramfs took about 30 minutes (!) on this netbook, mostly spent compressing a huge file. Size and thus generation time are now down to what they are for the distribution kernels.

romanyacik
Level 1
Level 1
Posts: 11
Joined: Thu May 10, 2012 10:23 am

How to build Custom Kernel in LMDE

Postby romanyacik » Mon Feb 10, 2014 11:10 pm

These are good instructions! works in main edition as well, but I've known the process take a long time.

jamaica
Level 1
Level 1
Posts: 6
Joined: Tue Apr 29, 2014 4:34 am

Re: How to build Custom Kernel in LMDE

Postby jamaica » Thu Aug 14, 2014 4:06 am

romanyacik wrote:These are good instructions! works in main edition as well, but I've known the process take a long time.


Try to add the -j <jobs> option to make-kpkg. Replace <jobs> by the number of cpu-cores + 1. This should speed up the build process by doing multiple jobs (makefile tasks) parallel.
Example (with 2 cpu-cores):
$ fakeroot make-kpkg -j 3 --initrd kernel_image kernel_headers modules_image

User avatar
apemanx
Level 2
Level 2
Posts: 72
Joined: Tue Aug 12, 2014 1:21 am
Location: South Africa
Contact:

Re: How to build Custom Kernel in LMDE

Postby apemanx » Fri Aug 15, 2014 1:49 am

So, just to make sure before I jump in and try this (Always wanted to).
If I build this custom kernel to its .deb format, i simply install it. Good.

Then, will there be updates in the future that I have to avoid? Or should I rebuild every time - (I wouldn't mind doing it).

how do I make sure that RJVB's comments/suggestions are included into mmix's instructions?

Thanks! Looks great this!
Breaking and fixing is learning! This knowledge gained gives power. And power gives you freedom if used with wisdom!

User avatar
apemanx
Level 2
Level 2
Posts: 72
Joined: Tue Aug 12, 2014 1:21 am
Location: South Africa
Contact:

Re: How to build Custom Kernel in LMDE

Postby apemanx » Tue Aug 19, 2014 3:14 am

Found this... 9th August post

Can anyone verify the correctness? It looks good enough for me to try?
http://www.tecmint.com/install-kernel-3-16-in-debian/
Breaking and fixing is learning! This knowledge gained gives power. And power gives you freedom if used with wisdom!


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 1 guest