内核编译找不到.config文件



EDIT:解决了它,请查看下面的评论。

我正试图用makeO=$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 O=$BUILD oldconfig,并在我的内核目录中执行make mrproper,然后再次运行make O=$BUILD。

最新更新