WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling the kernel  (Read 5413 times)

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Compiling the kernel
« on: November 29, 2009, 12:32:38 PM »
I messed around a bit with Slackware recently and managed to compile my own kernel optimized for my processor and with low latency.

If I recompile the tc kernel with these features, can i still use the stock module extensions or do I have to make my own?
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." - Douglas Adams

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Compiling the kernel
« Reply #1 on: November 29, 2009, 01:43:43 PM »
As long as you mostly followed the tc .config, it should work.

The extensions are compiled with "-march=i486 -mtune=i686" so they are probably not optimised for your processor, but I'm not sure if this will make a noticeable difference or not.

Offline Iguleder

  • Newbie
  • *
  • Posts: 12
Re: Compiling the kernel
« Reply #2 on: December 01, 2009, 12:47:31 AM »
Basically, each kernel has its own modules.

If you recompile the same kernel version as TC's (2.6.29), the modules are alright, you can keep them. However, if you change it with a newer/older kernel, make sure to remaster TC with the right modules, because the extensions won't work with a different kernel.

By the way, if you replace the kernel, you may face other problems, because the toolchain (the C library, specifically) is compiled against the kernel headers, and may be incompatible with the newer kernel. It depends on the way TC is built ... in my distro I compiled the C library for the latest (2.6.31.6) kernel headers without support for older kernels. If TC is built this way, you shouldn't replace the kernel, the maximum you can do is replacing the 2.6.29.x TC has with the latest 2.6.29.x release (each 2.6.Y has its own headers).

My suggestion: stick with defaults. TC does not stand for "Turbo Charged|, TC is not meant to be super-optimized or something ... that's why it's i486 with i686 optimizations and not just i686. If you really want TC to be like that, you can rebuild it with your own, manually compiled binaries.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Compiling the kernel
« Reply #3 on: December 01, 2009, 01:03:12 AM »
glibc-2.9 in tinycore-2.x was compiled against the 2.6.29.1 kernel headers and with "--enable-kernel=2.6.16"

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Re: Compiling the kernel
« Reply #4 on: December 01, 2009, 02:05:51 AM »
I was planning on messing with the stock kernel.

I'm aware that changing versions also means replacing the modules but I wasn't sure about how much one can change the default kernel before things get messy.

The reason I want to do it is really only to be able to say "I've done it..."  ;D

Edit: I've done it. Didn't work. Modules refused to load.  8)


« Last Edit: December 01, 2009, 12:04:44 PM by 4-stroke »
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." - Douglas Adams

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: Compiling the kernel
« Reply #5 on: December 04, 2009, 03:00:16 PM »
- don't change the name
- don't touch the module options (for example "forced module unloading")
- don't make the kernel uniprocessor (turn off SMP)

Check the enabled flags of any module with modinfo. The cpu optimization might be one of them.
The only barriers that can stop you are the ones you create yourself.

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Re: Compiling the kernel
« Reply #6 on: December 04, 2009, 10:31:02 PM »
The second time I tried it I made sure to only change the processor type and nothing else.

The funny thing is that the powernow-k8 module is optimized for a 486.  ::)
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." - Douglas Adams