Chameleon

Chameleon Commit Details

Date:2018-10-14 20:38:14 (5 years 6 months ago)
Author:ErmaC
Commit:2918
Parents: 2917
Message:Added device-colors and CFBundleIdentifier (Credits to Pike R. Alpha)
Changes:
M/trunk/i386/boot2/drivers.c
M/branches/ErmaC/Enoch/i386/boot2/drivers.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsaio/fake_efi.c
M/branches/ErmaC/Enoch/i386/boot2/boot.c
M/branches/ErmaC/Enoch/i386/libsaio/fake_efi.c

File differences

trunk/i386/libsaio/fake_efi.c
466466
467467
468468
469
469470
470471
471472
......
629630
630631
631632
633
634
632635
633636
634637
static const char SYSTEM_TYPE_PROP[] = "system-type";
static const char MODEL_PROP[] = "Model";
static const char BOARDID_PROP[] = "board-id";
static const char DEV_COLORS[] = "device-colors";
static const char DEV_PATH_SUP[] = "DevicePathsSupported";
static const char START_POWER_EV[] = "StartupPowerEvents";
static const char MACHINE_SIG_PROP[] = "machine-signature";
DT__AddProperty(efiPlatformNode, START_POWER_EV, sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8 *) &STARTUP_POWER_EVENTS);
DT__AddProperty(efiPlatformNode, DEV_COLORS, sizeof(DEV_COLORS), (EFI_UINT8 *) &DEV_COLORS);
DT__AddProperty(efiPlatformNode, DEV_PATH_SUP, sizeof(DEVICE_PATHS_SUPPORTED), (EFI_UINT8 *) &DEVICE_PATHS_SUPPORTED);
DT__AddProperty(efiPlatformNode, SYSTEM_ID_PROP, UUID_LEN, (EFI_UINT32 *)Platform.UUID);
trunk/i386/boot2/drivers.c
836836
837837
838838
839
839840
840841
841842
......
868869
869870
870871
871
872
872
873
874
875
876
877
878
879
880
881
882
873883
874884
875885
......
12431253
12441254
12451255
1256
12461257
12471258
12481259
longpos = 0;
TagPtrmoduleDict;
TagPtrrequired;
TagPtridentifier;
ModulePtrtmpModule;
while (1)
if ( (required == 0) || (required->type != kTagTypeString) || !strncmp(required->string, "Safe Boot", sizeof("Safe Boot")))
{
XMLFreeTag(moduleDict);
return -2;
identifier = XMLGetProperty(moduleDict, "CFBundleIdentifier");
if (strcmp(identifier->string, "com.apple.driver.AppleSMC") == 0)
{
//verbose("\tForced load of: AppleSMC.kext");
}
else
{
XMLFreeTag(moduleDict);
return -2;
}
}
tmpModule = malloc(sizeof(Module));
// High Sierra
case 0xA0D0000: gDarwinMajor = 17; gDarwinMinor = 0; gDarwinRev = 0; break; // 10.13
case 0xA0D0100: gDarwinMajor = 17; gDarwinMinor = 1; gDarwinRev = 0; break; // 10.13.1
// Mojave
// default = last known kernel
default: gDarwinMajor = 17; gDarwinMinor = 1; gDarwinRev = 0; break; // 10.13.1;
trunk/i386/boot2/boot.c
11921192
11931193
11941194
1195
1195
11961196
1197
1198
11971199
11981200
11991201
// ===============================================================================
bootArgs->csrCapabilities= CSR_VALID_FLAGS;
bootArgs->csrCapabilities= CSR_VALID_CAPABILITIES; // CSR_VALID_FLAGS
bootArgs->boot_SMC_plimit= 0;
bootArgs->bootProgressMeterStart= 0;
bootArgs->bootProgressMeterEnd= 0;
}
}
branches/ErmaC/Enoch/i386/libsaio/fake_efi.c
472472
473473
474474
475
475476
476477
477478
......
635636
636637
637638
639
640
638641
639642
640643
......
834837
835838
836839
840
841
842
843
844
837845
838846
839847
......
844852
845853
846854
855
856
857
858
859
847860
848861
849862
static const char SYSTEM_TYPE_PROP[] = "system-type";
static const char MODEL_PROP[] = "Model";
static const char BOARDID_PROP[] = "board-id";
static const char DEV_COLORS[] = "device-colors";
static const char DEV_PATH_SUP[] = "DevicePathsSupported";
static const char START_POWER_EV[] = "StartupPowerEvents";
static const char MACHINE_SIG_PROP[] = "machine-signature";
DT__AddProperty(efiPlatformNode, START_POWER_EV, sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8 *) &STARTUP_POWER_EVENTS);
DT__AddProperty(efiPlatformNode, DEV_COLORS, sizeof(DEV_COLORS), (EFI_UINT8 *) &DEV_COLORS);
DT__AddProperty(efiPlatformNode, DEV_PATH_SUP, sizeof(DEVICE_PATHS_SUPPORTED), (EFI_UINT8 *) &DEVICE_PATHS_SUPPORTED);
DT__AddProperty(efiPlatformNode, SYSTEM_ID_PROP, UUID_LEN, (EFI_UINT32 *)Platform.UUID);
verbose("Adding booter spec to the Platform Expert \n");
// booter-build-time (Fri Apr 14 16:21:16 PDT 2017) 10.12.5
//static EFI_UINT8 const booterBuildTime[] =
//{
// 0x46, 0x72, 0x69, 0x20, 0x41, 0x70, 0x72, 0x20, 0x31, 0x34, 0x20, 0x31, 0x36, 0x3A, 0x32, 0x31, 0x3A, 0x31, 0x36, 0x20, 0x50, 0x44, 0x54, 0x20, 0x32, 0x30, 0x31, 0x37, 0x00
//};
//DT__AddProperty(chosenNode, "booter-build-time", sizeof(booterBuildTime), (EFI_UINT8*) &booterBuildTime);
DT__AddProperty(chosenNode, "booter-build-time", sizeof(I386BOOT_BUILDDATE), I386BOOT_BUILDDATE);
// booter-name
DT__AddProperty(chosenNode, "booter-name", sizeof(booterName), (EFI_UINT8*) &booterName);
// booter-version (version:324.50.13) 10.12.5
//static EFI_UINT8 const booterVersion[] =
//{
// 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x33, 0x32, 0x34, 0x2E, 0x35, 0x30, 0x2E, 0x31, 0x33, 0x00
//};
//DT__AddProperty(chosenNode, "booter-version", sizeof(booterVersion), (EFI_UINT8*) &booterVersion);
DT__AddProperty(chosenNode, "booter-version", sizeof(I386BOOT_CHAMELEONREVISION), I386BOOT_CHAMELEONREVISION);
}
}
branches/ErmaC/Enoch/i386/boot2/drivers.c
12161216
12171217
12181218
1219
12191220
12201221
12211222
......
12511252
12521253
12531254
1254
1255
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
12561266
12571267
12581268
......
16271637
16281638
16291639
1640
16301641
16311642
16321643
longpos = 0;
TagPtrmoduleDict;
TagPtrrequired;
TagPtridentifier;
ModulePtrtmpModule;
while (1)
{
if ( (required == 0) || (required->type != kTagTypeString) || !strncmp(required->string, "Safe Boot", sizeof("Safe Boot")))
{
XMLFreeTag(moduleDict);
return -2;
identifier = XMLGetProperty(moduleDict, "CFBundleIdentifier");
if (strcmp(identifier->string, "com.apple.driver.AppleSMC") == 0)
{
//verbose("\tForced load of: AppleSMC.kext");
}
else
{
XMLFreeTag(moduleDict);
return -2;
}
}
}
// High Sierra
case 0xA0D0000: gDarwinMajor = 17; gDarwinMinor = 0; gDarwinRev = 0; break; // 10.13
case 0xA0D0100: gDarwinMajor = 17; gDarwinMinor = 1; gDarwinRev = 0; break; // 10.13.1
// Mojave
// default = last known kernel
default: gDarwinMajor = 17; gDarwinMinor = 1; gDarwinRev = 0; break; // 10.13.1;
branches/ErmaC/Enoch/i386/boot2/boot.c
13641364
13651365
13661366
1367
1367
13681368
1369
1370
13691371
13701372
13711373
// ===============================================================================
bootArgs->csrCapabilities= CSR_VALID_FLAGS;
bootArgs->csrCapabilities= CSR_VALID_CAPABILITIES; // CSR_VALID_FLAGS
bootArgs->boot_SMC_plimit= 0;
bootArgs->bootProgressMeterStart= 0;
bootArgs->bootProgressMeterEnd= 0;
}
}

Archive Download the corresponding diff file

Revision: 2918