0
我目前正在尝试重建一个Linux内核,并且正在尝试一些困难。生成Linux内核.config文件使源文件夹不清洁
我使用make menuconfig修改了.config。
...
make[1]: Entering directory '/home/doe/build/linux'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
Using /home/doe/workspace/linux as source for kernel
/home/doe/workspace/linux is not clean, please run 'make mrproper'
in the '/home/doe/workspace/linux' directory.
/home/doe/workspace/linux/Makefile:1027: recipe for target 'prepare3' failed
make[1]: *** [prepare3] Error 1
...
然后我试着运行make mrproper。它工作正常,并从我的生成文件夹中删除我的.config文件。毫不奇怪,我无法构建,因为.config文件丢失。
我做了一个make defconfig,然后是make -j 8,只是试图用一些基本的配置文件构建。
...
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
Using /home/doe/workspace/linux as source for kernel
/home/doe/workspace/linux is not clean, please run 'make mrproper'
in the '/home/doe/workspace/linux' directory.
/home/doe/workspace/linux/Makefile:1027: recipe for target 'prepare3' failed
make[1]: *** [prepare3] Error 1
make[1]: *** Waiting for unfinished jobs....
HOSTLD arch/x86/tools/relocs
make[1]: *** wait: No child processes. Stop.
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
我该如何生成如果生成一个.config使源文件夹不干净?
我怀疑它可能是由于一些'env'设置。 *在'make menuconfig'中,为什么它会进入'/ home/doe/build/linux'而不是'/ home/doe/workspace/linux'?*的路径。还有一件事总是建议你也必须指定拱名(如'make ARCH = x86_64 menuconfig'),如果你还没有导出。 –
'export ARCH =; git clean -xfd && make _defconfig && make -j8'(''是您的实际defcofnig的名称,而''是正在使用的架构,您可能还需要先导出CROSS_COMPILE = ...。 –
0andriy