内核编译找不到.config文件

4

编辑:问题已解决,请查看下面的评论。

我正在尝试使用 make O=$BUILD 编译内核。

其中 build 是构建路径:BUILD=~/lab/build

但是我遇到了以下错误:

*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target `include/config/auto.conf', needed by`include/config/kernel.release'.  Stop.

在编译之前,我将旧的配置文件复制到了我的内核文件夹中,以便在新内核中使用。

cp -vi /boot/config-3.13.0-45-generic .config

然后我运行了:

make oldconfig 

并输入了所有默认值。

我该如何修复这个错误?


你最好先执行 make menuconfig,然后复制 .config 文件,再次执行 make menuconfig。然后运行 make O=$BUILD - Milind Dumbare
谢谢你的回答,但我已经以不同的方式编译它了,请查看我的下面的评论。 - nelthas
1个回答

4

现在我已经通过以下步骤成功编译: 在内核目录下执行make mrproper命令, 然后在执行make O=$BUILD oldconfig命令, 最后再次执行make O=$BUILD命令。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接