You are not logged in.

#1 2010-09-21 21:06:39

kdotj
Member
Registered: 2010-09-12
Posts: 24

Recompiling the Kernel

Hey guys, I have been playing around with compiling my own kernel on Arch. I have mainly been the method outlined on the Arch Wiki about customising the Kernel26 package, from ABS and using PKGBUILD. I can successfully get kernels to compile and use them problem free.

However, I'm new to this and doing it just as a learning experience and for fun. My question is, when I come to configuring the new kernel, say by using "menuconfig" or "gconfig" for example, if I were to just leave it how it is and not change any of the selections... Would this just effectively give me the standard Arch kernel when compiled?
Being new to this kernel building business I would be grateful if someone could point me toward tips on how to optimise my kernel... What I should looking for etc. Is there a way to set the settings to optimal for your system?


Thanks in advance

Offline

#2 2010-09-21 21:09:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Recompiling the Kernel

Nope, the stock arch kernel has some patches applied and its own .config... have a look at the PKGBUILD for kernel26-ck and modify it to suite your needs.  It has a menuconfig step built into it so you might just wanna run with it.  In addition to a custom kernel, you also get the bonus of ck's brainfuck scheduler which rocks tongue

Last edited by graysky (2010-09-21 21:17:39)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2010-09-21 21:11:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Recompiling the Kernel

W/o knowing what your current system is, no one will be able to help you: is a netbook, a powerful workstation or ...?
I'm not sure if you need kernel optimization. You can try one w/o modules, -ck or other 'exotic' variants, different i/o schedulers etc.

Offline

#4 2010-09-21 21:12:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Recompiling the Kernel

The guy who maintains this link:http://www.kernel-seeds.org/ hangs out on the gentoo forums.

He goes by the nick: pappy_mcfae.  He is a sharp dude when it comes to kernel configuration.  Check his web site.  He welcomes people from all distros, but he definitely belongs to the roll-your-own Gentoo camp.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2010-09-21 21:14:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Recompiling the Kernel

ewaller wrote:

The guy who maintains this link:http://www.kernel-seeds.org/ hangs out on the gentoo forums.

An example of how to use the kernel seeds: http://zen-kernel.org/tutorials/creatin … figuration

Last edited by karol (2010-09-21 21:19:56)

Offline

#6 2010-09-21 21:17:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Recompiling the Kernel

My suggested mods:

Enable the BFS as mentioned above (this PKGBUILD will ask you):

BFS cpu scheduler (SCHED_BFS) [Y/n/?] (NEW)

Processor type and features>Processor family>Core 2/newer Xeon <-- note this isn't universal, it's right for my system!  See if there's something specific to your CPU.
Processor type and features>Processor family>SMT (Hyperthreading) scheduler support (disabled) <-- again, it's right by my system which doesn't have hyperthreading on the CPU.
Processor type and features>Processor family>Timer frequency (1000 HZ)

Beyond those, the standard arch config has preemptible kernel enabled which is a nice tweak.  Dunno what else you wanna do performance-wise.  Give it a try.

Also note that you'll need the nvidia-ck package if you're running an nvidia card.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2010-09-21 21:46:32

kagerato
Member
Registered: 2007-09-10
Posts: 45
Website

Re: Recompiling the Kernel

If you have a kernel that's working fine, boot it and try grabbing its configuration from /proc/config.gz .  The kernel in question has to have had a particular option enabled for this file to exist, but they often do (especially stock kernels).

You'll want to ungzip that and copy it to the Linux source directory (as .config) to use it.

As a side note, it's usually not worth building your own custom kernel unless you have special patches to apply, or intend to minimalize the entire configuration (and resulting modules).  The performance difference is often minor.

Since you say you're just doing it for fun, well, enjoy.  You will probably at least learn the names and corresponding kernel modules of all the hardware in your system if you go down the minimal route smile

Offline

#8 2010-09-21 22:53:51

kdotj
Member
Registered: 2010-09-12
Posts: 24

Re: Recompiling the Kernel

Thanks for all of the replies guys...
The system in question is a netbook, Intel Atom 1.66 GHz with 1gb RAM (with integrated intel graphics).

I have read up on numerous threads and websites about how it is not necessary to compile your own kernel unless you have reason to. Which is why I'm only doing it for fun really for the learning.
Thanks to all for the links, I will check out the kernel26-ch for sure though.
Seeing as this is a netbook, can I do away with CD-ROM support etc as I don't have one? And not include support for file systems I know I won't use?

Offline

#9 2010-09-21 23:05:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Recompiling the Kernel

kdotj wrote:

I will check out the kernel26-ch for sure though.

That's kernel26-ck as in Con Kolivas.

kdotj wrote:

Seeing as this is a netbook, can I do away with CD-ROM support etc as I don't have one? And not include support for file systems I know I won't use?

Yes, you can.

Offline

#10 2010-09-21 23:58:07

kdotj
Member
Registered: 2010-09-12
Posts: 24

Re: Recompiling the Kernel

Thanks Karol

karol wrote:

That's kernel26-ck as in Con Kolivas.

Thanks for the correction lol, I followed the link anyway haha

Offline

Board footer

Powered by FluxBB