where can I find a good enough default config to compile the Linux kernel?
i want to compile a custom linux kernel for myself. because i dont know every option of开发者_开发问答 kernel therefore i am looking for a good default config for start.
You should check out KernelCheck. It's basically an app that will help you figure out what kernel options are worth tweaking for your particular system. It will also automatically download, compile and install the selected kernel for you.
If you have a good running kernel that has builtin support for stored configuration (i.e. /proc/config.gz
exists), then you could copy that kernel configuration and use it as a starting point:
zcat /proc/config.gz > /path/to/kernel/source/.config
Look in the repository of the Linux distribution you are using, they often have a generic or a huge kernel .config
, those are the "best choices".
From the Linux kernel source tree, type make help
and look for the lines that include defconfig
. Default configurations for various platforms are typically included here. Once you find the one that matches your platform, type, for example make defconfig
to get your default .config
file. For example, to build on a Nexus S, I use make herring_defconfig
. (herring is, I guess, the code name for the Nexus S hardware, which can incidentally be found if you look at /proc/cpuinfo
on the Nexus S)
If you are not building for x86 (for example, like in my case, if you are building for Android) be sure to remember to export ARCH
(for example, export ARCH=arm
before running make
). Otherwise, make help
will not show the correct defconfig targets for the architecture you want to build.
I haven't done this in a while but aren't there sane defaults in the config dialogs?
This question is old, but I feel compelled to add http://kernel-seeds.org/ as a very viable option for a starting point to compile a fitting custom kernel -- as there are seeds for the vanilla sources, even if you are not on gentoo.
精彩评论