Chameleon

Chameleon Commit Details

Date:2013-10-10 14:56:31 (5 years 7 months ago)
Author:ErmaC
Commit:2265
Parents: 2264
Message:Apply zenith432 patch (Load drivers from /Library/Extensions when using '-f' with OS 10.9) http://forge.voodooprojects.org/p/chameleon/issues/352/
Changes:
M/trunk/i386/boot2/drivers.c

File differences

trunk/i386/boot2/drivers.c
134134
135135
136136
137
137
138138
139
139
140140
141141
142142
......
243243
244244
245245
246
247
248
249
250
246251
247252
248253
......
275280
276281
277282
278
283
279284
280285
281286
282
287
283288
284289
285290
286291
287292
288293
289
294
290295
291296
292297
......
389394
390395
391396
392
397
393398
394399
395400
......
558563
559564
560565
561
562566
563567
564568
......
748752
749753
750754
751
752
755
753756
754757
755758
......
798801
799802
800803
801
804
802805
803806
804807
......
808811
809812
810813
814
811815
816
812817
818
813819
820
814821
822
815823
816824
817825
lowHalf %= 65521L;
highHalf %= 65521L;
result = (highHalf << 16) | lowHalf;
return result;
}
}
else
{
if (gMacOSVersion[3] == '9') {
strcpy(gExtensionsSpec, dirSpec);
strcat(gExtensionsSpec, "Library/");
FileLoadDrivers(gExtensionsSpec, 0);
}
strcpy(gExtensionsSpec, dirSpec);
strcat(gExtensionsSpec, "System/Library/");
FileLoadDrivers(gExtensionsSpec, 0);
sprintf (altDirSpec, "%s%s", dirSpec, extDirSpec);
ret = GetFileInfo(altDirSpec, "Extensions.mkext", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat))
{
ret = GetFileInfo(dirSpec, "Extensions", &flags, &time2);
if ((ret != 0)
|| ((flags & kFileTypeMask) != kFileTypeDirectory)
|| (((gBootMode & kBootModeSafe) == 0) && (time == (time2 + 1))))
{
sprintf(gDriverSpec, "%sExtensions.mkext", altDirSpec);
verbose("LoadDrivers: Loading from [%s]\n", gDriverSpec);
if (LoadDriverMKext(gDriverSpec) == 0)
return 0;
}
}
if (tries == -1) return -1;
return 0;
return 0;
}
//==========================================================================
long length, driverAddr, driverLength;
void *executableAddr = 0;
module = gModuleHead;
while (module != 0)
required = XMLGetProperty(moduleDict, kPropOSBundleRequired);
//if ( (required != NULL) && (required->type == kTagTypeString) && !strcmp(required->string, "Safe Boot"))
if ( (required != NULL) && ((required->type != kTagTypeString) || (!strcmp(required->string, "Safe Boot"))) )
if ( (required == 0) || (required->type != kTagTypeString) || !strcmp(required->string, "Safe Boot"))
{
XMLFreeTag(moduleDict);
return -2;
printf("compressed_size: 0x%x\n", kernel_header->compressed_size);
getchar();
#endif
if (kernel_header->signature == OSSwapBigToHostConstInt32('comp'))
{
if (kernel_header->compress_type != OSSwapBigToHostConstInt32('lzss'))
}
#if NOTDEF
if (kernel_header->platform_name[0] && strcmp(gPlatformName, kernel_header->platform_name))
{
return -1;
}
if (kernel_header->root_path[0] && strcmp(gBootFile, kernel_header->root_path))
{
return -1;
}
#endif
uncompressed_size = OSSwapBigToHostInt32(kernel_header->uncompressed_size);
binary = buffer = malloc(uncompressed_size);

Archive Download the corresponding diff file

Revision: 2265