1

I am compiling the kernel, purely as a learning exercise. Its good fun and I get a kick out of this type of thing. I have a few questions regarding kernel compilation.

  1. Can I always compile the latest stable kernel and use it, or does Ubuntu have to be tweaked by developers to use newer kernels ?

  2. When a new kernel has new features, do said new features just magically work or does Ubuntu have to be tweaked by developers to utilise new features.

  3. As a purely academic question, does compiling the kernel on the actual machine running linux, tweaking the config for cpu type and selectively stripping out support for non present hardware, unwanted file systems etc produce performance gains (even if in reality one just would not notice).

Thanks.

3
  • 1, 2: Define "tweak". See wiki.ubuntu.com/Kernel/MainlineBuilds - it offers a way to run unmodified upstream kernels, but with Ubuntu's configuration. Does that count as "tweaking"? 3. That's pretty much the whole point of Gentoo.
    – muru
    Jul 9, 2015 at 21:45
  • You will find loads of info here. Good Luck! Jul 9, 2015 at 21:56
  • By tweak, I mean change code. I am currently playing with Gentoo, again as a learning excercise.
    – hatterman
    Jul 9, 2015 at 22:01

1 Answer 1

0
  1. Yes, you can. Especially if you compile the latest Ubuntu kernel. ;-) You can also use mainline kernels in Ubuntu. But you do not have to build them. They are already built in Ubuntu Mainline PPA. You can always redo it in educational purposes.

  2. New kernel with new features will "magically" work in Ubuntu.

  3. Compiling a custom kernel with removing unneeded modules can improve boot time slightly, but will not improve performance.

In general Ubuntu patches in most cases just backport bug fixes and support of new hardware from latest kernels. They are not specific to Ubuntu distribution in 99% of cases.

It is fun building kernels, but it has no practical value if you do not modify the source. I have to build kernels in some cases, but I always try my best to get my patches applied upstream to let me avoid this sad task.

2
  • Ill check out mainline ppa. Is there no benefit to setting the target cpu type then compiling ? Is that not better than generic ?
    – hatterman
    Jul 9, 2015 at 21:58
  • @hatterman It is marginal. Not worth effort.
    – Pilot6
    Jul 9, 2015 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .