在自定义内核源中创建 buildworld 时无法找到标头

在自定义内核源中创建 buildworld 时无法找到标头

我正在尝试在 freebsd 中安装自定义内核,这是我遵循的步骤:

  1. 从镜像在虚拟机上安装 freebsd 9.1
  2. 从 HardenedBSD 获取源代码(分支 Hardened/9/kernsep)
  3. 从源代码树(/hardenedBSD)执行“make buildworld”

此时,make buildworld 给我一个错误,编译器无法找到“nk/nk_cpufunc.h”,而自定义内核在 sys/cpufunc.h 中使用 #include 声明。错误消息如下:

In file included from /usr/home/realyuki/hardenedBSD/lib/libc/amd64/gen/getcontextx.c:35:
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:42:27: error: nk/nk_cpufunc.h: No such file or directory
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:43:25: error: sys/nk/vmmu.h: No such file or directory
In file included from /usr/home/realyuki/hardenedBSD/lib/libc/amd64/sys/__vdso_gettc.c:33:
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:42:27: error: nk/nk_cpufunc.h: No such file or directory
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:43:25: error: sys/nk/vmmu.h: No such file or directory
In file included from /usr/home/realyuki/hardenedBSD/lib/libc/stdlib/malloc.c:179:
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:42:27: error: nk/nk_cpufunc.h: No such file or directory
/usr/obj/usr/home/realyuki/hardenedBSD/tmp/usr/include/machine/cpufunc.h:43:25: error: sys/nk/vmmu.h: No such file or directory
mkdep: compile failed
*** [.depend] Error code 1

Stop in /usr/home/realyuki/hardenedBSD/lib/libc.
*** [lib/libc__L] Error code 1

Stop in /usr/home/realyuki/hardenedBSD.
*** [libraries] Error code 1

Stop in /usr/home/realyuki/hardenedBSD.
*** [_libraries] Error code 1

Stop in /usr/home/realyuki/hardenedBSD.
*** [buildworld] Error code 1

Stop in /usr/home/realyuki/hardenedBSD.

我将不胜感激任何建议。

相关内容