Index: trunk/i386/libsaio/disk.c =================================================================== --- trunk/i386/libsaio/disk.c (revision 2712) +++ trunk/i386/libsaio/disk.c (revision 2713) @@ -569,6 +569,7 @@ const void *probeBuffer = malloc(PROBEFS_SIZE); if (probeBuffer == NULL) { + verbose("\t[probeFileSystem] Error: can't alloc memory for probe buffer.\n"); goto exit; } @@ -577,6 +578,7 @@ if (error) { + verbose("\t[probeFileSystem] Error: can't read from device=%02Xh.\n", biosdev); goto exit; } @@ -955,6 +957,8 @@ struct driveInfo di; boot_drive_info_t *dp; + verbose("\tAttempting to scan FDISK boot volumes [biosdev=%02Xh]:\n", biosdev); + /* Initialize disk info */ if (getDriveInfo(biosdev, &di) != 0) @@ -1255,6 +1259,9 @@ struct Block0 *block0_p; unsigned int blksize; unsigned int factor; + + verbose("\tAttempting to scan APM boot volumes [biosdev=%02Xh]:\n", biosdev); + void *buffer = malloc(BPS); if (!buffer) @@ -1382,6 +1389,8 @@ 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); @@ -1412,6 +1421,7 @@ // 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; } @@ -1471,7 +1481,7 @@ UInt32 gptCheck = 0; UInt32 gptCount = 0; UInt32 gptID = 0; - gpt_ent *gptMap = 0; + gpt_ent *gptMap = NULL; UInt32 gptSize = 0; gptBlock = OSSwapLittleToHostInt64(headerMap->hdr_lba_table); @@ -1795,7 +1805,7 @@ // if ( YOSEMITE ){} -// if ( GALA ){} +// if ( ELCAPITAN ){} } Index: trunk/i386/libsaio/fake_efi.c =================================================================== --- trunk/i386/libsaio/fake_efi.c (revision 2712) +++ trunk/i386/libsaio/fake_efi.c (revision 2713) @@ -731,7 +731,7 @@ { Node *chosenNode; chosenNode = DT__FindNode("/chosen", false); - if (chosenNode == 0) + if (chosenNode == NULL) { stop("setupChosenNode: Couldn't get '/chosen' node"); } @@ -755,7 +755,7 @@ 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 @@ -769,7 +769,7 @@ #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; Index: trunk/i386/boot2/drivers.c =================================================================== --- trunk/i386/boot2/drivers.c (revision 2712) +++ trunk/i386/boot2/drivers.c (revision 2713) @@ -253,7 +253,7 @@ } 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/"); Index: trunk/i386/boot2/boot.c =================================================================== --- trunk/i386/boot2/boot.c (revision 2712) +++ trunk/i386/boot2/boot.c (revision 2713) @@ -322,7 +322,7 @@ } 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); @@ -776,13 +776,13 @@ // 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 Index: trunk/i386/boot2/boot.h =================================================================== --- trunk/i386/boot2/boot.h (revision 2712) +++ trunk/i386/boot2/boot.h (revision 2713) @@ -30,7 +30,7 @@ #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 @@ -57,7 +57,7 @@ //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 Index: trunk/i386/boot2/gui.c =================================================================== --- trunk/i386/boot2/gui.c (revision 2712) +++ trunk/i386/boot2/gui.c (revision 2713) @@ -54,8 +54,8 @@ iDeviceGeneric_o, iDeviceHFS, iDeviceHFS_o, -// iDeviceHFS_gala, -// iDeviceHFS_gala_o, + iDeviceHFS_cap, + iDeviceHFS_cap_o, iDeviceHFS_yos, iDeviceHFS_yos_o, iDeviceHFS_mav, @@ -73,8 +73,8 @@ iDeviceHFSRAID, iDeviceHFSRAID_o, -// iDeviceHFSRAID_gala, -// iDeviceHFSRAID_gala_o, + iDeviceHFSRAID_cap, + iDeviceHFSRAID_cap_o, iDeviceHFSRAID_yos, iDeviceHFSRAID_yos_o, iDeviceHFSRAID_mav, @@ -148,8 +148,8 @@ {.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}, @@ -167,8 +167,8 @@ {.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}, @@ -394,8 +394,8 @@ 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); @@ -413,8 +413,8 @@ 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); @@ -1078,13 +1078,13 @@ 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;