在xnu构建之后修复kextcache“找不到符号”错误

问题描述 投票:2回答:1

我正在尝试为OS X High Sierra 10.13.3构建并运行xnu-4570.41.2 kernel。我根据ssen's blogthis more recent tutorial等指南在当地编译它。编译内核后,我将其加载到High Sierra 10.13.3 VirtualBox VM上,替换内核,以便从内核启动。

虽然VM正在启动并运行我的内核(可以在我替换内核之前和之后uname -a输出的差异以及我添加到启动过程中的print语句中看到),我在内核扩展预链接过程中看到了以下错误。它们出现在启动过程中,每当我根据指南的说明用我自己的内核替换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,但内核编译或安装中显然缺少一些步骤。为什么会出现这些错误?有谁知道我怎么解决它们?

macos macos-high-sierra kernel-extension darwin xnu
1个回答
0
投票

基于来自开源堆栈交换的this question谈论我遗漏的一些xcpm符号,我得出结论,这些符号缺失,因为它们来自Apple不会随xnu开源发布的专有文件。

更新:可以通过在xnu/config/Private.exports中为它们指定声明来解决这些缺失符号错误。通过kernelshaman's Makefile构建内核会自动为您添加这些符号。

© www.soinside.com 2019 - 2024. All rights reserved.