Chameleon

Chameleon Commit Details

Date:2015-06-11 18:49:12 (8 years 10 months ago)
Author:ErmaC
Commit:2713
Parents: 2712
Message:Merge changes from Enoch Branch.
Changes:
M/trunk/i386/boot2/drivers.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/boot2/gui.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/disk.c
M/trunk/i386/boot2/boot.h

File differences

trunk/i386/libsaio/disk.c
569569
570570
571571
572
572573
573574
574575
......
577578
578579
579580
581
580582
581583
582584
......
955957
956958
957959
960
961
958962
959963
960964
......
12551259
12561260
12571261
1262
1263
1264
12581265
12591266
12601267
......
13821389
13831390
13841391
1392
1393
13851394
13861395
13871396
......
14121421
14131422
14141423
1424
14151425
14161426
14171427
......
14711481
14721482
14731483
1474
1484
14751485
14761486
14771487
......
17951805
17961806
17971807
1798
1808
17991809
18001810
18011811
const void *probeBuffer = malloc(PROBEFS_SIZE);
if (probeBuffer == NULL)
{
verbose("\t[probeFileSystem] Error: can't alloc memory for probe buffer.\n");
goto exit;
}
if (error)
{
verbose("\t[probeFileSystem] Error: can't read from device=%02Xh.\n", biosdev);
goto exit;
}
struct driveInfodi;
boot_drive_info_t*dp;
verbose("\tAttempting to scan FDISK boot volumes [biosdev=%02Xh]:\n", biosdev);
/* Initialize disk info */
if (getDriveInfo(biosdev, &di) != 0)
struct Block0*block0_p;
unsigned intblksize;
unsigned intfactor;
verbose("\tAttempting to scan APM boot volumes [biosdev=%02Xh]:\n", biosdev);
void*buffer = malloc(BPS);
if (!buffer)
static BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr)
{
verbose("\tAttempting to scan GPT boot volumes [biosdev=%02Xh]:\n", biosdev);
struct DiskBVMap *map = NULL;
void *buffer = malloc(BPS);
// means the FDISK code will wind up parsing it.
if ( fdiskID )
{
verbose("\t[diskScanGPTBootVolumes] Error! Two GPT protective MBR (fdisk=0xEE) partitions found on same device, skipping.\n");
goto scanErr;
}
UInt32gptCheck= 0;
UInt32gptCount= 0;
UInt32gptID= 0;
gpt_ent*gptMap= 0;
gpt_ent*gptMap= NULL;
UInt32gptSize= 0;
gptBlock = OSSwapLittleToHostInt64(headerMap->hdr_lba_table);
//if ( YOSEMITE ){}
//if ( GALA ){}
//if ( ELCAPITAN ){}
}
trunk/i386/libsaio/fake_efi.c
731731
732732
733733
734
734
735735
736736
737737
......
755755
756756
757757
758
758
759759
760760
761761
......
769769
770770
771771
772
772
773773
774774
775775
{
Node *chosenNode;
chosenNode = DT__FindNode("/chosen", false);
if (chosenNode == 0)
if (chosenNode == NULL)
{
stop("setupChosenNode: Couldn't get '/chosen' node");
}
DT__AddProperty(chosenNode, MACHINE_SIG_PROP, sizeof(Platform.HWSignature), (EFI_UINT32 *)&Platform.HWSignature);
if (MacOSVerCurrent >= MacOSVer2Int("10.10"))
if ( YOSEMITE || ELCAPITAN )
{
//
// Pike R. Alpha - 12 October 2014
#else
EFI_UINT32 randomValue, tempValue, cpuTick;
EFI_UINT32 ecx, esi, edi = 0;
EFI_UINT32 rcx, rdx, rsi, rdi;
EFI_UINT64 rcx, rdx, rsi, rdi;
randomValue = tempValue = ecx = esi = edi = 0;// xor%ecx,%ecx
cpuTick = rcx = rdx = rsi = rdi = 0;
trunk/i386/boot2/drivers.c
253253
254254
255255
256
256
257257
258258
259259
}
else
{
if ( MAVERICKS || YOSEMITE ) // ( MAVERICKS || YOSEMITE || GALA ) // issue 352
if ( MAVERICKS || YOSEMITE || ELCAPITAN ) // issue 352
{
strlcpy(gExtensionsSpec, dirSpec, 4087); /* 4096 - sizeof("Library/") */
strcat(gExtensionsSpec, "Library/");
trunk/i386/boot2/boot.c
322322
323323
324324
325
325
326326
327327
328328
......
776776
777777
778778
779
779
780780
781781
782782
783783
784784
785
785
786786
787787
788788
}
else
{
// Lion, Mountain Lion, Mavericks and Yosemite prelink kernel cache file
// Lion, Mountain Lion, Mavericks, Yosemite and El Capitan prelink kernel cache file
// for 10.7 10.8 10.9 10.10 10.11
snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%skernelcache", kDefaultCachePathSnow);
verbose("Kernel Cache file path (Mac OS X 10.7 and newer): %s\n", kernelCacheFile);
// bootFile must start with a / if it not start with a device name
if (!bootFileWithDevice && (bootInfo->bootFile)[0] != '/')
{
if ( !YOSEMITE ) // ( !YOSEMITE || !GALA ) Is not Yosemite 10.10 or Gala 10.11
if ( !YOSEMITE || !ELCAPITAN ) //Is not Yosemite 10.10 or El Capitan 10.11
{
snprintf(bootFile, sizeof(bootFile), "/%s", bootInfo->bootFile); // append a leading /
}
else
{
snprintf(bootFile, sizeof(bootFile), kDefaultKernelPathForYos"%s", bootInfo->bootFile); // Yosemite
snprintf(bootFile, sizeof(bootFile), kDefaultKernelPathForYos"%s", bootInfo->bootFile); // Yosemite or El Capitan
}
}
else
trunk/i386/boot2/boot.h
3030
3131
3232
33
33
3434
3535
3636
......
5757
5858
5959
60
60
6161
6262
6363
#include "libsaio.h"
// OS X Versions
//#define GALA checkOSVersion("10.11") // Gala
#define ELCAPITAN checkOSVersion("10.11") // El Capitan
#define YOSEMITE checkOSVersion("10.10") // Yosemite
#define MAVERICKS checkOSVersion("10.9") // Mavericks
#define MOUNTAIN_LION checkOSVersion("10.8") // Mountain Lion
//kernel path
#define kDefaultKernelPathPreYos"/"
#define kDefaultKernelPathForYos"/System/Library/Kernels/" //for Yosemite and newer
#define kDefaultKernelPathForYos"/System/Library/Kernels/" //for Yosemite and El Capitan
/*
* Keys used in system Boot.plist
trunk/i386/boot2/gui.c
5454
5555
5656
57
58
57
58
5959
6060
6161
......
7373
7474
7575
76
77
76
77
7878
7979
8080
......
148148
149149
150150
151
152
151
152
153153
154154
155155
......
167167
168168
169169
170
171
170
171
172172
173173
174174
......
394394
395395
396396
397
398
397
398
399399
400400
401401
......
413413
414414
415415
416
417
416
417
418418
419419
420420
......
10781078
10791079
10801080
1081
1081
10821082
10831083
1084
1085
1086
1087
1084
1085
1086
1087
10881088
10891089
10901090
iDeviceGeneric_o,
iDeviceHFS,
iDeviceHFS_o,
//iDeviceHFS_gala,
//iDeviceHFS_gala_o,
iDeviceHFS_cap,
iDeviceHFS_cap_o,
iDeviceHFS_yos,
iDeviceHFS_yos_o,
iDeviceHFS_mav,
iDeviceHFSRAID,
iDeviceHFSRAID_o,
//iDeviceHFSRAID_gala,
//iDeviceHFSRAID_gala_o,
iDeviceHFSRAID_cap,
iDeviceHFSRAID_cap_o,
iDeviceHFSRAID_yos,
iDeviceHFSRAID_yos_o,
iDeviceHFSRAID_mav,
{.name = "device_generic_o", .image = NULL},
{.name = "device_hfsplus", .image = NULL},
{.name = "device_hfsplus_o", .image = NULL},
//{.name = "device_hfsplus_gala", .image = NULL},
//{.name = "device_hfsplus_gala_o", .image = NULL},
{.name = "device_hfsplus_cap", .image = NULL},
{.name = "device_hfsplus_cap_o", .image = NULL},
{.name = "device_hfsplus_yos", .image = NULL},
{.name = "device_hfsplus_yos_o", .image = NULL},
{.name = "device_hfsplus_mav", .image = NULL},
{.name = "device_hfsraid", .image = NULL},
{.name = "device_hfsraid_o", .image = NULL},
//{.name = "device_hfsraid_gala", .image = NULL},
//{.name = "device_hfsraid_gala_o", .image = NULL},
{.name = "device_hfsraid_cap", .image = NULL},
{.name = "device_hfsraid_cap_o", .image = NULL},
{.name = "device_hfsraid_yos", .image = NULL},
{.name = "device_hfsraid_yos_o", .image = NULL},
{.name = "device_hfsraid_mav", .image = NULL},
LOADPNG(device_generic_o, iDeviceGeneric);
LOADPNG(device_hfsplus, iDeviceGeneric);
LOADPNG(device_hfsplus_o, iDeviceHFS);
//LOADPNG(device_hfsplus_gala, iDeviceHFS);
//LOADPNG(device_hfsplus_gala_o, iDeviceHFS_gala);
LOADPNG(device_hfsplus_cap, iDeviceHFS);
LOADPNG(device_hfsplus_cap_o, iDeviceHFS_cap);
LOADPNG(device_hfsplus_yos, iDeviceHFS);
LOADPNG(device_hfsplus_yos_o, iDeviceHFS_yos);
LOADPNG(device_hfsplus_mav, iDeviceHFS);
LOADPNG(device_hfsraid, iDeviceHFS);
LOADPNG(device_hfsraid_o, iDeviceHFSRAID);
//LOADPNG(device_hfsraid_gala, iDeviceHFSRAID);
//LOADPNG(device_hfsraid_gala_o, iDeviceHFSRAID_gala);
LOADPNG(device_hfsraid_cap, iDeviceHFSRAID);
LOADPNG(device_hfsraid_cap_o, iDeviceHFSRAID_cap);
LOADPNG(device_hfsraid_yos, iDeviceHFSRAID);
LOADPNG(device_hfsraid_yos_o, iDeviceHFSRAID_yos);
LOADPNG(device_hfsraid_mav, iDeviceHFSRAID);
break;
case '1':
if (device->OSVersion[4] == '0') { // 10.10
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_yos : iDeviceHFS_yos);
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_yos : iDeviceHFS_yos); // Yosemite
break;
}
//if (device->OSVersion[4] == '1') { // 10.11
//devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_??? : iDeviceHFS_???);
//break;
//}
if (device->OSVersion[4] == '1') { // 10.11
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_cap : iDeviceHFS_cap); // El Capitan
break;
}
default:
devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID : iDeviceHFS);
break;

Archive Download the corresponding diff file

Revision: 2713