我试图编译 linux 内核,但遇到了一些错误。在运行顶级 Makefile 时,我收到以下错误:-
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
HOSTCC scripts/selinux/mdp/mdp
scripts/selinux/mdp/mdp.c:32:19: error: flask.h: No such file or directory
scripts/selinux/mdp/mdp.c:56:29: error: class_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:61:35: error: initial_sid_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:66:35: error: common_perm_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:91:24: error: av_inherit.h: No such file or directory
scripts/selinux/mdp/mdp.c:95:28: error: av_permissions.h: No such file or directory
scripts/selinux/mdp/mdp.c:103:31: error: av_perm_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c: In function ‘main’:
scripts/selinux/mdp/mdp.c:140: error: ‘initial_sid_to_string’ undeclared (first use in this function)
scripts/selinux/mdp/mdp.c:140: error: (Each undeclared identifier is reported only once
scripts/selinux/mdp/mdp.c:140: error: for each function it appears in.)
make[3]: *** [scripts/selinux/mdp/mdp] Error 1
make[2]: *** [scripts/selinux/mdp] Error 2
make[1]: *** [scripts/selinux] Error 2
make: *** [scripts] Error 2
在构建之前,我配置了使用 make oldconfig
似乎错误日志中的文件应该在配置期间生成。但不知何故,它们没有被生成,因此错误。搜索了网络,但仍然无法修复错误。我对内核编程很陌生。任何帮助将不胜感激。
谢谢。