简体   繁体   English

我在哪里可以找到足够好的默认配置来编译Linux内核?

[英]where can I find a good enough default config to compile the Linux kernel?

i want to compile a custom linux kernel for myself. 我想为自己编译一个自定义的Linux内核。 because i dont know every option of kernel therefore i am looking for a good default config for start. 因为我不知道内核的每个选项因此我正在寻找一个良好的默认配置开始。

You should check out KernelCheck . 你应该看看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. 它还将自动为您下载,编译和安装所选内核。

如果你有一个内置支持存储配置的良好运行内核(即存在/proc/config.gz ),那么你可以复制该内核配置并将其用作起点:

zcat /proc/config.gz > /path/to/kernel/source/.config

查看您正在使用的Linux发行版的存储库,它们通常具有通用或巨大的内核.config ,这些是“最佳选择”。

From the Linux kernel source tree, type make help and look for the lines that include defconfig . 在Linux内核源代码树中,键入make help并查找包含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. 找到与您的平台匹配的版本后,键入,例如make defconfig以获取默认的.config文件。 For example, to build on a Nexus S, I use make herring_defconfig . 例如,要构建Nexus S,我使用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) (我想,鲱鱼是Nexus S硬件的代号,如果你看一下Nexus S上的/proc/cpuinfo ,可以偶然找到它)

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 ). 如果你不是为x86构建(例如,在我的情况下,如果你正在为Android构建),请务必记住导出ARCH (例如,在运行make之前export ARCH=arm )。 Otherwise, make help will not show the correct defconfig targets for the architecture you want to build. 否则, make help将不会显示您要构建的体系结构的正确defconfig目标。

我有一段时间没有这样做但在配置对话框中没有明智的默认值?

这个问题很老,但是我觉得有必要将http://kernel-seeds.org/作为一个非常可行的选项添加到编译适合的自定义内核的起点 - 因为有香草源的种子,即使你不是gentoo。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM