WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling the kernel  (Read 5081 times)

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Compiling the kernel
« on: November 29, 2009, 09:32:38 AM »
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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14579
Re: Compiling the kernel
« Reply #1 on: November 29, 2009, 10:43:43 AM »
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: November 30, 2009, 09:47:31 PM »
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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14579
Re: Compiling the kernel
« Reply #3 on: November 30, 2009, 10:03:12 PM »
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: November 30, 2009, 11:05:51 PM »
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, 09:04:44 AM 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: 10970
Re: Compiling the kernel
« Reply #5 on: December 04, 2009, 12: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, 07: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