}␊ |
}␊ |
else if ( gBootFileType == kBlockDeviceType )␊ |
{␊ |
if (!gHaveKernelCache) ␊ |
{␊ |
// Non-prelinked kernel, load system mkext. ␊ |
// NOTE: In it's default state, XNU cannot be both prelinked, and load additional drivers␊ |
// from the bootloader. There is, however, a patch that changes this and allows␊ |
// for both to occure.␊ |
␊ |
// Also try to load Extensions from boot helper partitions.␊ |
if (gBootVolume->flags & kBVFlagBooter)␊ |
{␊ |
strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/");␊ |
if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
{␊ |
strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/");␊ |
if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
{␊ |
strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/");␊ |
FileLoadDrivers(dirSpecExtra, 0);␊ |
}␊ |
}␊ |
}␊ |
␊ |
if (gMKextName[0] != '\0')␊ |
{␊ |
verbose("LoadDrivers: Loading from [%s]\n", gMKextName);␊ |
if ( LoadDriverMKext(gMKextName) != 0 )␊ |
{␊ |
error("Could not load %s\n", gMKextName);␊ |
return -1;␊ |
}␊ |
}␊ |
else␊ |
{␊ |
strcpy(gExtensionsSpec, dirSpec);␊ |
strcat(gExtensionsSpec, "System/Library/");␊ |
FileLoadDrivers(gExtensionsSpec, 0);␊ |
}␊ |
␊ |
}␊ |
␊ |
//Azi: dependencies still need to be added to E/E.mkext!!␊ |
␉{␊ |
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).␊ |
if (gRAMDiskVolume && !gRAMDiskBTAliased)␊ |
{␊ |
strcpy(dirSpecExtra, "rd(0,0)/Extra/");␊ |
FileLoadDrivers(dirSpecExtra, 0);␊ |
strcpy(dirSpecExtra, "rd(0,0)/Extra/");␊ |
FileLoadDrivers(dirSpecExtra, 0);␊ |
}␊ |
␉␉␊ |
␊ |
// Next try to load Extra extensions from the selected root partition.␊ |
strcpy(dirSpecExtra, "/Extra/");␊ |
if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
{␊ |
// If failed, then try to load Extra extensions from the boot partition␊ |
// in case we have a separate booter partition or a bt(0,0) aliased ramdisk.␊ |
if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)␊ |
|| (gRAMDiskVolume && gRAMDiskBTAliased) )␊ |
{␊ |
// Next try a specfic OS version folder ie 10.5␊ |
␉ // in case we have a separate booter partition or a bt(0,0) aliased ramdisk.␊ |
␉ if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)␊ |
␉ || (gRAMDiskVolume && gRAMDiskBTAliased) )␊ |
␉ {␊ |
␉ // Next try a specfic OS version folder ie 10.5␊ |
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);␊ |
␉ if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
␉ {␉␊ |
␉ // Next we'll try the base␊ |
␉ strcpy(dirSpecExtra, "bt(0,0)/Extra/");␊ |
␉ FileLoadDrivers(dirSpecExtra, 0);␊ |
␉ }␊ |
␉ }␊ |
}␊ |
␊ |
// Also try to load Extensions from boot helper partitions.␊ |
if (gBootVolume->flags & kBVFlagBooter)␊ |
{␊ |
strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/");␊ |
if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
{␊ |
strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/");␊ |
if (FileLoadDrivers(dirSpecExtra, 0) != 0)␊ |
{␊ |
// Next we'll try the base␊ |
strcpy(dirSpecExtra, "bt(0,0)/Extra/");␊ |
strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/");␊ |
FileLoadDrivers(dirSpecExtra, 0);␊ |
}␊ |
}␊ |
}␊ |
␊ |
if (gMKextName[0] != '\0')␊ |
{␊ |
verbose("LoadDrivers: Loading from [%s]\n", gMKextName);␊ |
if ( LoadDriverMKext(gMKextName) != 0 )␊ |
{␊ |
error("Could not load %s\n", gMKextName);␊ |
return -1;␊ |
}␊ |
}␊ |
else␊ |
{␊ |
strcpy(gExtensionsSpec, dirSpec);␊ |
strcat(gExtensionsSpec, "System/Library/");␊ |
FileLoadDrivers(gExtensionsSpec, 0);␊ |
}␊ |
}␊ |
else␊ |
{␊ |