Index: trunk/i386/boot2/drivers.c =================================================================== --- trunk/i386/boot2/drivers.c (revision 2728) +++ trunk/i386/boot2/drivers.c (revision 2729) @@ -669,6 +669,7 @@ { fileName = prop->string; snprintf(gFileSpec, 4096, "%s%s", module->executablePath, fileName); + length = LoadThinFatFile(gFileSpec, &executableAddr); if (length == 0) { @@ -678,7 +679,9 @@ // printf("%s length = %d addr = 0x%x\n", gFileSpec, length, driverModuleAddr); getchar(); } else + { length = 0; + } if (length != -1) { @@ -699,6 +702,7 @@ driver = (DriverInfoPtr)driverAddr; driver->plistAddr = (char *)(driverAddr + sizeof(DriverInfo)); driver->plistLength = module->plistLength; + if (length != 0) { driver->executableAddr = (void *)(driverAddr + sizeof(DriverInfo) + @@ -710,16 +714,19 @@ driver->executableAddr = 0; driver->executableLength = 0; } + driver->bundlePathAddr = (void *)(driverAddr + sizeof(DriverInfo) + module->plistLength + driver->executableLength); driver->bundlePathLength = module->bundlePathLength; // Save the plist, module and bundle. strlcpy(driver->plistAddr, module->plistAddr, driver->plistLength); + if (length != 0) { memcpy(driver->executableAddr, executableAddr, length); } + strlcpy(driver->bundlePathAddr, module->bundlePath, module->bundlePathLength); // Add an entry to the memory map. @@ -1004,6 +1011,7 @@ // Bungo: scan binary for Darwin Kernel Version string uint32_t offset = 0; strncpy(gDarwinBuildVerStr, "Darwin Kernel Version", sizeof(gDarwinBuildVerStr)); + while ((offset < 0xFFFFFFFF - (uint32_t)binary - 256) && memcmp(binary + offset, gDarwinBuildVerStr, 21)) { offset++; Index: trunk/i386/boot2/boot.c =================================================================== --- trunk/i386/boot2/boot.c (revision 2728) +++ trunk/i386/boot2/boot.c (revision 2729) @@ -316,7 +316,7 @@ prev_time = time; } } - verbose("Kernel Cache file path (Mac OS X 10.6.X): %s\n", kernelCacheFile); + verbose("Kernel Cache file path (Mac OS X 10.6.X): %s\n", kernelCachePath); } closedir(cacheDir); } @@ -325,7 +325,7 @@ // 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); + verbose("Kernel Cache file path (Mac OS X 10.7 and newer): %s\n", kernelCachePath); } }