//
// plugin_start.cpp
// Lilu
//
// Copyright © 2016-2017 vit9696. All rights reserved.
//
#include <Headers/plugin_start.hpp>
#include <Headers/kern_api.hpp>
#include <Headers/kern_util.hpp>
#include <Headers/kern_version.hpp>
#ifndef LILU_CUSTOM_KMOD_INIT
bool ADDPR(startSuccess) = false;
#else
// Workaround custom kmod code and enable by default
bool ADDPR(startSuccess) = true;
#endif /* LILU_CUSTOM_KMOD_INIT */
bool ADDPR(debugEnabled) = false;
uint32_t ADDPR(debugPrintDelay) = 0;
#ifndef LILU_CUSTOM_IOKIT_INIT
OSDefineMetaClassAndStructors(PRODUCT_NAME, IOService)
PRODUCT_NAME *ADDPR(selfInstance) = nullptr;
IOService *PRODUCT_NAME::probe(IOService *provider, SInt32 *score) {
ADDPR(selfInstance) = this;
setProperty("VersionInfo", kextVersion);
auto service = IOService::probe(provider, score);
return ADDPR(startSuccess) ? service : nullptr;
}
bool PRODUCT_NAME::start(IOService *provider) {
ADDPR(selfInstance) = this;
if (!IOService::start(provider)) {
SYSLOG("init", "failed to start the parent");
return false;
}
return ADDPR(startSuccess);
}
void PRODUCT_NAME::stop(IOService *provider) {
ADDPR(selfInstance) = nullptr;
IOService::stop(provider);
}
#endif /* LILU_CUSTOM_IOKIT_INIT */
#ifndef LILU_CUSTOM_KMOD_INIT
EXPORT extern "C" kern_return_t ADDPR(kern_start)(kmod_info_t *, void *) {
// This is an ugly hack necessary on some systems where buffering kills most of debug output.
PE_parse_boot_argn("liludelay", &ADDPR(debugPrintDelay), sizeof(ADDPR(debugPrintDelay)));
auto error = lilu.requestAccess();
if (error == LiluAPI::Error::NoError) {
error = lilu.shouldLoad(ADDPR(config).product, ADDPR(config).version, ADDPR(config).runmode, ADDPR(config).disableArg, ADDPR(config).disableArgNum,
ADDPR(config).debugArg, ADDPR(config).debugArgNum, ADDPR(config).betaArg, ADDPR(config).betaArgNum, ADDPR(config).minKernel,
ADDPR(config).maxKernel, ADDPR(debugEnabled));
if (error == LiluAPI::Error::NoError) {
DBGLOG("init", "%s bootstrap %s", xStringify(PRODUCT_NAME), kextVersion);
(void)kextVersion;
ADDPR(startSuccess) = true;
ADDPR(config).pluginStart();
} else {
SYSLOG("init", "parent said we should not continue %d", error);
}
lilu.releaseAccess();
} else {
SYSLOG("init", "failed to call parent %d", error);
for (size_t i = 0; i < ADDPR(config).debugArgNum; i++) {
if (checkKernelArgument(ADDPR(config).debugArg[i])) {
ADDPR(debugEnabled) = true;
break;
}
}
if (checkKernelArgument("-liludbgall"))
ADDPR(debugEnabled) = true;
}
// Report success but actually do not start and let I/O Kit unload us.
// This works better and increases boot speed in some cases.
return KERN_SUCCESS;
}
EXPORT extern "C" kern_return_t ADDPR(kern_stop)(kmod_info_t *, void *) {
// It is not safe to unload Lilu plugins unless they were disabled!
return ADDPR(startSuccess) ? KERN_FAILURE : KERN_SUCCESS;
}
#endif /* LILU_CUSTOM_KMOD_INIT */
没有合适的资源?快使用搜索试试~ 我知道了~
华硕UX433FN(U4300FN,灵耀U2)MACos i5-8265u opencore引导-黑苹果EFI文件下载
共124个文件
plist:31个
hpp:26个
h:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 87 浏览量
2022-03-23
14:52:05
上传
评论
收藏 22.36MB ZIP 举报
温馨提示
电脑配置 型号:华硕UX433FN(U4300FN,灵耀U2) CPU:i5-8265u 显卡:Intel(R) UHD Graphics 620(独显MX150用不了) 内存:8G SSD: 512GB NVME 测试正常的功能 显卡 声卡(没有声音,但是能控制输出设备音量,可以用蓝牙设备播放声音) USB Type-C WIFI 键盘 触摸板 其他自行测试
资源推荐
资源详情
资源评论
收起资源包目录
华硕UX433FN(U4300FN,灵耀U2)MACos i5-8265u opencore引导-黑苹果EFI文件下载 (124个子文件)
AirportItlwm 10.21MB
SSDT-PLUG-DRTNIA.aml 693B
SSDT-EC-USBX-LAPTOP.aml 335B
SSDT-XOSI.aml 323B
SSDT-PNLF-CFL.aml 125B
SSDT-AWAC.aml 73B
AppleALC 1.48MB
AppleBacklightSmoother 51KB
AsusSMC 98KB
CodeResources 2KB
plugin_start.cpp 3KB
CPUFriend 46KB
CpuTscSync 43KB
.DS_Store 12KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
SSDT-BATC.dsl 18KB
OpenShell.efi 1.16MB
OpenCore.efi 746KB
HfsPlus.efi 37KB
OpenRuntime.efi 36KB
Bootstrap.efi 32KB
BOOTx64.efi 32KB
x86.h 33KB
arm64.h 27KB
capstone.h 24KB
ppc.h 21KB
arm.h 17KB
mips.h 16KB
AppleSmc.h 15KB
systemz.h 14KB
sparc.h 11KB
xcore.h 5KB
platform.h 3KB
hde64.h 2KB
MultitouchHelpers.h 1KB
VoodooInputTransducer.h 1004B
VoodooInputMessages.h 902B
VoodooInputEvent.h 493B
HibernationFixup 66KB
kern_patcher.hpp 25KB
kern_util.hpp 20KB
kern_cpu.hpp 15KB
kern_user.hpp 14KB
kern_vsmcapi.hpp 12KB
kern_api.hpp 12KB
kern_mach.hpp 10KB
kern_iokit.hpp 10KB
kern_devinfo.hpp 10KB
kern_rtc.hpp 6KB
kern_nvram.hpp 6KB
kern_disasm.hpp 5KB
kern_smcinfo.hpp 5KB
kern_value.hpp 3KB
kern_keyvalue.hpp 3KB
kern_time.hpp 3KB
kern_crypto.hpp 2KB
kern_file.hpp 2KB
kern_efi.hpp 2KB
kern_compression.hpp 2KB
kern_version.hpp 2KB
plugin_start.hpp 2KB
kern_policy.hpp 1KB
kern_compat.hpp 865B
AppleSmcBridge.hpp 701B
kern_config.hpp 634B
wrappers.inc 1KB
IntelBluetoothFirmware 14.8MB
IntelBluetoothInjector 9KB
Lilu 454KB
NVMeFix 84KB
Info.plist 310KB
Info.plist 168KB
config.plist 33KB
Info.plist 20KB
Info.plist 18KB
Info.plist 14KB
Info.plist 11KB
Info.plist 8KB
Info.plist 6KB
Info.plist 5KB
Info.plist 5KB
Info.plist 4KB
._config.plist 4KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 3KB
Info.plist 2KB
Info.plist 2KB
Info.plist 2KB
Info.plist 2KB
Info.plist 2KB
Info.plist 2KB
Info.plist 2KB
共 124 条
- 1
- 2
资源评论
资源弟
- 粉丝: 3
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功