//==========================================================================␊ |
// execKernel - Load the kernel image (mach-o) and jump to its entry point.␊ |
␊ |
static int ExecKernel(void *binary)␊ |
int ExecKernel(void *binary)␊ |
{␊ |
entry_t kernelEntry;␊ |
int ret;␊ |
|
␊ |
if ( ret != 0 )␊ |
return ret;␊ |
␉␊ |
// Reserve space for boot args␊ |
reserveKernBootStruct();␊ |
␉␊ |
// Load boot drivers from the specifed root path.␊ |
␉execute_hook("DecodedKernel", (void*)binary, NULL, NULL, NULL);␊ |
␊ |
␉␊ |
␉␊ |
␉setupFakeEfi();␊ |
␉␊ |
if (!gHaveKernelCache) {␊ |
|
}␊ |
#endif ␊ |
bool dummyVal;␊ |
␉if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) {␊ |
␉if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal)␊ |
␉{␊ |
␉␉printf("Press any key to continue...");␊ |
␉␉getc();␊ |
␉}␊ |
|
␉␉load_all_modules();␊ |
␉}␊ |
␉␊ |
␉execute_hook("ModulesLoaded", NULL, NULL, NULL, NULL);␊ |
␊ |
␉␊ |
#ifndef OPTION_ROM␊ |
// Loading preboot ramdisk if exists.␊ |