gpt4 book ai didi

linux - 生成 Linux 内核 .config 文件使源文件夹变得不干净

转载 作者:太空宇宙 更新时间:2023-11-04 12:30:40 25 4
gpt4 key购买 nike

我目前正在尝试重建一个 linux 内核,并且正在尝试一些困难。

我已经使用 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 使源文件夹不干净,我应该如何构建?

最佳答案

您应该检查您的内核源代码中是否存在“include/config”目录。

prepare3 目标检查“.config”文件和“include/config”目录。您可以通过在 Makefile 中搜索“prepare3”找到它

关于linux - 生成 Linux 内核 .config 文件使源文件夹变得不干净,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43398817/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com