Chameleon

Chameleon Commit Details

Date:2012-05-07 16:51:42 (7 years 6 months ago)
Author:Cosmosis Jones
Commit:1939
Parents: 1938
Message:ML lazy patch. from conti/nawcom/others..
Changes:
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsaio/bootstruct.c

File differences

trunk/i386/libsaio/bootstruct.c
110110
111111
112112
113
113
114114
115115
116116
reserveKernBootStruct(void)
{
if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0')
&& (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7'))
&& (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7' || gMacOSVersion[3] == '8'))
{
void *oldAddr = bootArgs;
bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args));
trunk/i386/boot2/boot.c
196196
197197
198198
199
199
200200
201201
202202
......
238238
239239
240240
241
242
241
242
243243
244244
245245
......
338338
339339
340340
341
341
342342
343343
344344
......
615615
616616
617617
618
618
619619
620620
621621
finalizeBootStruct();
// Jump to kernel's entry point. There's no going back now.
if (checkOSVersion("10.7")) {
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) {
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
if (cacheFile[0] != 0)
strlcpy(kernelCacheFile, cacheFile, sizeof(kernelCacheFile));
else {
// Lion prelink kernel cache file
if (checkOSVersion("10.7")) {
// Lion and Mountain Lion prelink kernel cache file
if ((checkOSVersion("10.7")) || (checkOSVersion("10.8"))) {
sprintf(kernelCacheFile, "%skernelcache", kDefaultCachePathSnow);
}
// Snow Leopard prelink kernel cache file
// Since the kernel cache file exists and is the most recent try to load it
verbose("Loading kernel cache %s\n", kernelCachePath);
if (checkOSVersion("10.7")) {
if (checkOSVersion("10.7") || checkOSVersion("10.8")) {
ret = LoadThinFatFile(kernelCachePath, binary);
} else {
ret = LoadFile(kernelCachePath);
// If boot from boot helper partitions and OS is Lion use prelink kernel.
// We need to find a solution to load extra mkext with a prelink kernel.
if (gBootVolume->flags & kBVFlagBooter && checkOSVersion("10.7"))
if (gBootVolume->flags & kBVFlagBooter && (checkOSVersion("10.7") || checkOSVersion("10.8")))
useKernelCache = true;
else
useKernelCache = false; // by default don't use prelink kernel cache

Archive Download the corresponding diff file

Revision: 1939