Linux 3.13内核无法编译

Ace*_*Ace 1 linux kernel compiler-errors makefile compilation

在.conf中配置各种选项后,使用

$make config
Run Code Online (Sandbox Code Playgroud)

我尝试使用编译整个Linux内核

$make
Run Code Online (Sandbox Code Playgroud)

但是,它会引发如下错误:

root@localbox:/LinuxKernel/linux-3.13# make
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.
root@localbox:/LinuxKernel/linux-3.13# 
Run Code Online (Sandbox Code Playgroud)

我试图通过使用以下命令搜索.conf:

$find -name ".conf"
Run Code Online (Sandbox Code Playgroud)

但是没有结果。但是由于make config正常工作,所以我假设.config必须存在于某个地方。

请给我建议如何克服这个烦人的问题。我是第一次这样做,我不确定在尝试编译内核之前是否必须安装任何依赖项。非常感谢您的反馈。

Ola*_*che 5

可能发生了一些错误make config,例如磁盘已满或您用Ctrl-C。该.config文件(不.conf)是正确的主目录。

错误消息说已经

*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
Run Code Online (Sandbox Code Playgroud)

有几种基于文本的配置(config,oldconfig,menuconfig)和图形化的(xconfig,gconfig)配置程序。您可能想选择一个图形化的图形并运行它,例如

make gconfig
Run Code Online (Sandbox Code Playgroud)

这些图形配置器还有助于避免所有数百个不相关的问题。选择所需的选项后,请不要忘记保存.config文件并再次尝试编译内核和模块。

  • 您也可以尝试menuconfig。这是类似于gconfig的基于文本的配置器。您也可以在此处选择各个选项,而无需经历所有其他问题。它只需要ncurses,IIRC。 (2认同)