• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

ok, i know im a new. so teach me oh wise ones. recompiling a kernel..

SinNisTeR

Diamond Member
who what when where why is this all about, i dont squat about recompiling a kernel, i may never need to. but im curious and would like to know the steps of how to do and why to do it. thanks you guys! 🙂
 
basically, you recompile a kernel because you want to add/remove support for certain things from your kernel, like specific hardware, network protocols, file systems, etc. your kernel can support these things by either

1. you compile support into the kernel (called "monolithic")
2. you compile it seperately as a module.

compiling into the kernel is nice because it can make things somewhat more simple, with modules you have to add them to /etc/modules so they're loaded at boot. however, modules are much more flexible, and you can build a kernel with tons of options via modules and only load the ones you currently need and that way your kernel isnt huge.

when you install a distro, usually its a very generic kernel that will work on many different types of hardware, so it can be a bit bigger. by compiling your own, you specify only the things you need, and thus you will have less kernel bloat.

also by compiling it on your machine it is specifically optimized for your machine and will theoretically perform better.

read up here, and read the kernel howto @ linuxdoc.org.

the steps to making your own kernel really arent all that complicated, the theory behind it is what takes longer to learn.
 
cd /linuxkernelsourcedir && make menuconfig (select options) && make -j 2 modules; make modules_install; make -j 2 bzlilo (assuming u use lilo not grub or any others)

reboot, select new kernel (hint its going to be Linux)
 


<< cd /linuxkernelsourcedir && make menuconfig (select options) && make -j 2 modules; make modules_install; make -j 2 bzlilo (assuming u use lilo not grub or any others)

reboot, select new kernel (hint its going to be Linux)
>>



Well, the -j 2 swith will only serve you if you have two processors, there's no use in having two jobs on one processor!
And I think you forgot about make dep, as well as make clean and make mrproper to clean up....

Read the documentation is in this case a must do... not just a RTFM question...
 
Well, the -j 2 swith will only serve you if you have two processors, there's no use in having two jobs on one processor!

I remember reading somewhere that it's best to use 1 more process than you have processors, it ensures the CPU(s) is always busy.

And I think you forgot about make dep, as well as make clean and make mrproper to clean up....

make dep is important, but clean and mrproper aren't really, infact I don't run them so if I change something or add a module I don't have to recompile the whole thing for the 1 change.
 
thanks for the info you guys, exactly what i was looking for. will get to those two manuals mentioned. 🙂🙂🙂🙂
 


<< I remember reading somewhere that it's best to use 1 more process than you have processors, it ensures the CPU(s) is always busy. >>

That's what my buddy says, too.
 


<<

<< I remember reading somewhere that it's best to use 1 more process than you have processors, it ensures the CPU(s) is always busy. >>

That's what my buddy says, too.
>>



Perhaps with the smallest things, but the fact is that if you only have one processor and two concurring processes they will fighting for that processor all the time which mean a big overhead while the processor changes context beetween those processes. Off course that
if the execution time of the process is so smal that it will run in the time slot available to it this overhead will be minimal, but it will still
be there...
 
I remember Ace's testing kernel compile times, I think it was when the AMD760 showed up.

Running uni proc they still achieved a pretty decent boost in compile times using -j2.

Of course the gain was much bigger for mp systems, but still...
 


<< Running uni proc they still achieved a pretty decent boost in compile times using -j2. >>



? Well I'll have to give a try, In the modules compilation I can understand because it's very small objects,
but the kernel itself...stange!

Can anyone give me a link... my network is acting strange and it's to slow to search for it
 
Back
Top