我正在尝试为OS X High Sierra 10.13.3构建并运行xnu-4570.41.2 kernel。我正在根据ssen's blog和this more recent tutorial等指南进行本地编译。编译内核后,将其加载到High Sierra 10.13.3 VirtualBox VM上,在那里替换内核,以便从我的内核引导。
尽管VM正在引导并运行我的内核(从替换内核前后以及添加到引导过程中的打印语句的uname -a
输出中可以看出差异),我在执行过程中看到以下错误内核扩展预链接过程。它们会在引导过程中出现,并且在按照指导说明用我自己的VM内核替换后,每当我运行sudo kextcache -invalidate /
时都会出现。
kxld[com.apple.iokit.IOStorageFamily]: In interface com.apple.kpi.mach of __kernel__, couldn't find symbol _mach_bridge_register_regwrite_timestamp_callback
kxld[com.apple.iokit.IOStorageFamily]: In interface com.apple.kpi.private of __kernel__, couldn't find symbol _kern_buflet_get_data_length
kxld[com.apple.iokit.IOStorageFamily]: In interface com.apple.kpi.private of __kernel__, couldn't find symbol _kern_buflet_get_data_limit
kxld[com.apple.iokit.IOStorageFamily]: In interface com.apple.kpi.private of __kernel__, couldn't find symbol _kern_buflet_get_data_offset
...
kxld[com.apple.nke.applicationfirewall]: In interface com.apple.kpi.private of __kernel__, couldn't find symbol _xcpm_mbox_lock
kxld[com.apple.nke.applicationfirewall]: In interface com.apple.kpi.private of __kernel__, couldn't find symbol _xcpm_mbox_unlock
kxld[com.apple.nke.applicationfirewall]: In interface com.apple.kpi.bsd of __kernel__, couldn't find symbol _bpf_tap_packet_in
kxld[com.apple.nke.applicationfirewall]: In interface com.apple.kpi.bsd of __kernel__, couldn't find symbol _bpf_tap_packet_out
这些只是大约18,000个此类错误的示例。尽管这些错误并不能阻止正常工作的PrelinkedKernel的构建,但显然在内核编译或安装中缺少一些步骤。为什么会发生这些错误?有谁知道我该怎么解决?
答案 0 :(得分:0)
根据开放源代码堆栈交换所提供的this question谈论的我缺少的一些xcpm
符号,我得出的结论是这些符号丢失了,因为它们来自Apple专有文件用xnu开源发行。
更新:这些丢失的符号错误可以通过在xnu/config/Private.exports
中为其声明来解决。通过kernelshaman's Makefile构建内核会自动为您添加这些符号。