You are not logged in.
Pages: 1
I am trying to build my own kernel manually myself.
I knew that by default many kernel features are built as "modules".
However, I am sure that I don't need lots of modules, such as some hardware drivers.
My question is what benefit I will achieve by not building some modules (besides saving some hard disk space and shorten build time).
Will I achieve any performance gain? Will my boot speed accelerated?
Offline
Neither method really gains anything over the other. I personally build all the stuff I need into the kernel simply because my hardware is not going to change any time soon, and If it did I would just rebuild the kernel.
Modules provide some flexibility as far as not loading drivers for something if it gets broken in a kernel update or something, but then your better of just using the last kernel that worked anyway. The stock kernels use modules so they can support everything without bloating the kernel itself, saying that stock kernels do have some stuff to support older hardware built in that you probably dont need.
If you understand what hardware you have and what drivers it needs, build it in, you will gain a couple of seconds on boot times. If you really have no idea about your hardware/drivers just build a stock arch kernel and change whatever options you want, aside from a longer compile time you dont loose anything by building the 3.5k modules or whatever it is now, as far as memory/cpu time.
Offline
If I understand correctly what you're asking, then the answer is *no*. There is no difference. The modules you don't use are just lying on the disk, and have no influence whatsoever on anything (except the free disk space) until you load them into the kernel. Which you (or udev) don't, if they're not needed.
Offline
There is however an increase in the time it takes to _build_ the kernel if you just build everything This is a good time to learn about your hardware
Plus, if you decide to make it fully customized to your own needs, you might actually learn a little bit about what it takes to make a good config, what things are needed to make other things run, etc... This has the added downside that it takes a while to get right and your first experiments might run a bit slower than the avg kernel, but you learn stuff, which might come in handy one day
Plus, if you compile everything into the kernel (statically, no modules) there is a good chance of shaving a few seconds off of your boot time. Mind you, these are only seconds. Might not offset the time it takes to build the kernel.
This is my pov: Tinkering ftw!
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Just dont tinker by overwriting the stock arch kernel or you will end up with a headache, best to modify CONFIG_LOCALVERSION in the kernel config and build a completely separate package build.
Offline
I agree with klixon, however, I think some people do get a bit carried away on kernel compiling and recompiling...and they sometimes tend to use source based distributions.
My pov is that obsessing over building a static kernel is, well, so "90's". On modern hardware there is no benefit from it. Tinkering is fun and educational, though.
Modular is more versatile, with no performance hit, so I like the modular approach. With a modular kernel, you can remove the hard drive on a broken down PC, slap it into a working machine, and have a good chance of booting up without incident. You can also add and change hardware without thinking twice.
As you practice building your own, you'll come to find what works best for you. Enjoy.
Offline
I agree with klixon, however, I think some people do get a bit carried away on kernel compiling and recompiling...and they sometimes tend to use source based distributions.
My pov is that obsessing over building a static kernel is, well, so "90's". On modern hardware there is no benefit from it. Tinkering is fun and educational, though.
Modular is more versatile, with no performance hit, so I like the modular approach. With a modular kernel, you can remove the hard drive on a broken down PC, slap it into a working machine, and have a good chance of booting up without incident. You can also add and change hardware without thinking twice.
As you practice building your own, you'll come to find what works best for you. Enjoy.
There is an argument that it prevents one way of installing a kernel root kit. However I don't think it's really a big issue, especially for a home desktop, and more so there are better ways to get that extra bit of security without flat out disabling modules from being loaded ever .
Last edited by Zepp (2008-06-07 16:23:38)
Offline
Pages: 1