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