Chameleon

Chameleon Commit Details

Date:2011-07-24 23:29:52 (12 years 9 months ago)
Author:Azimutz
Commit:1215
Parents: 1214
Message:Sync with trunk (r1214).
Changes:
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
M/branches/azimutz/trunkGraphicsEnablerModules

File differences

branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
603603
604604
605605
606
607
608
606
607
608
609
610
611
612
613
614
615
609616
610
617
611618
612
613
614
615
616
617
618
619
620
621
619622
620623
621624
622
623
625
626
627
628
629
630
631
624632
625
626633
627
634
628635
629636
630637
631
638
639
632640
633641
634
642
643
635644
636645
637646
638647
639648
640649
641
650
651
642652
643653
644654
645
655
656
646657
647658
648659
verbose("Kernel cache did not load %s\n ", bootFile);
}
bootFile = bootInfo->bootFile;
if (checkOSVersion("10.7"))
{
bootFile = gBootKernelCacheFile;
}
else
{
sprintf(bootFile, "/%s", bootInfo->bootFile);
}
// Try to load kernel image from alternate locations on boot helper partitions.
sprintf(bootFileSpec, "com.apple.boot.P/%s", bootFile);
sprintf(bootFileSpec, "com.apple.boot.P%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
sprintf(bootFileSpec, "com.apple.boot.R/%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
sprintf(bootFileSpec, "com.apple.boot.S/%s", bootFile);
if (ret == -1)
{
sprintf(bootFileSpec, "com.apple.boot.R%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
// No alternate location found, using the original kernel image path.
strcpy(bootFileSpec, bootFile);
sprintf(bootFileSpec, "com.apple.boot.S%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
// No alternate location found, using the original kernel image path.
strcpy(bootFileSpec, bootFile);
}
}
}
}
if (checkOSVersion("10.7"))
{
//Lion, dont load kernel if haz cache
if (!trycache) {
if (!trycache)
{
verbose("Loading kernel %s\n", bootFileSpec);
ret = LoadThinFatFile(bootFileSpec, &binary);
if (ret <= 0 && archCpuType == CPU_TYPE_X86_64) {
if (ret <= 0 && archCpuType == CPU_TYPE_X86_64)
{
archCpuType = CPU_TYPE_I386;
ret = LoadThinFatFile(bootFileSpec, &binary);
}
}
else ret = 1;
}
else {
else
{
//Snow Leopard or older
verbose("Loading kernel %s\n", bootFileSpec);
ret = LoadThinFatFile(bootFileSpec, &binary);
if (ret <= 0 && archCpuType == CPU_TYPE_X86_64) {
if (ret <= 0 && archCpuType == CPU_TYPE_X86_64)
{
archCpuType = CPU_TYPE_I386;
ret = LoadThinFatFile(bootFileSpec, &binary);
}

Archive Download the corresponding diff file

Revision: 1215