Chameleon

Chameleon Commit Details

Date:2015-07-02 02:12:15 (8 years 9 months ago)
Author:ErmaC
Commit:2727
Parents: 2726
Message:Typo and cleanup.
Changes:
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsaio/bootstruct.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/bootstruct.h
M/trunk/i386/boot2/options.c
M/trunk/i386/libsaio/stringTable.c

File differences

trunk/i386/libsaio/bootstruct.c
4747
4848
4949
50
5051
5152
5253
boot_args*bootArgs;
boot_args_pre_lion*bootArgsPreLion;
PrivateBootInfo_t*bootInfo;
Node*gMemoryMapNode;
trunk/i386/libsaio/bootstruct.h
3333
3434
3535
36
37
36
37
3838
3939
4040
/*
* Kernel boot args global also used by booter for its own data.
*/
extern boot_args *bootArgs;
extern boot_args_pre_lion *bootArgsPreLion;
extern boot_args *bootArgs;
extern boot_args_pre_lion *bootArgsPreLion;
extern Node *gMemoryMapNode;
#define VGA_TEXT_MODE 0
trunk/i386/libsaio/stringTable.c
671671
672672
673673
674
675
674676
675
676677
677
678
678
679679
680680
681681
int loadSystemConfig(config_file_t *config)
{
char *dirspec[] = {
"/com.apple.recovery.boot/com.apple.Boot.plist",// OS X Recovery
"/OS X Install Data/com.apple.Boot.plist",// OS X Installer (10.8+)
"/Mac OS X Install Data/com.apple.Boot.plist",// OS X Installer (Lion 10.7)
"/OS X Install Data/com.apple.Boot.plist",// OS X Installer (10.8+)
//"/.IABootFiles/com.apple.Boot.plist",// OS X Installer
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",// com.apple.Boot.plist
"/com.apple.recovery.boot/com.apple.Boot.plist"// OS X Recovery
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"// com.apple.Boot.plist
};
int i, fd, count, ret=-1;
trunk/i386/libsaio/fake_efi.c
501501
502502
503503
504
505504
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570505
571506
572507
......
755690
756691
757692
758
693
759694
760695
761696
......
856791
857792
858793
794
859795
860796
861797
return dst;
}
// Bungo
/*
* Get the SystemID from the bios dmi info
staticEFI_CHAR8 *getSmbiosUUID()
{
static EFI_CHAR8uuid[UUID_LEN];
inti;
intisZero;
intisOnes;
SMBByte*p;
p = (SMBByte *)Platform.UUID;
for (i=0, isZero=1, isOnes=1; i<UUID_LEN; i++)
{
if (p[i] != 0x00)
{
isZero = 0;
}
if (p[i] != 0xff)
{
isOnes = 0;
}
}
if (isZero || isOnes) // empty or setable means: no uuid present
{
verbose("No UUID present in SMBIOS System Information Table\n");
return 0;
}
memcpy(uuid, p, UUID_LEN);
return uuid;
}
// return a binary UUID value from the overriden SystemID and SMUUID if found,
// or from the bios if not, or from a fixed value if no bios value is found
static EFI_CHAR8 *getSystemID()
{
// unable to determine UUID for host. Error: 35 fix
// Rek: new SMsystemid option conforming to smbios notation standards, this option should
// belong to smbios config only ...
const char *sysId = getStringForKey(kSystemID, &bootInfo->chameleonConfig);
EFI_CHAR8*ret = getUUIDFromString(sysId);
if (!sysId || !ret) // try bios dmi info UUID extraction
{
ret = getSmbiosUUID();
sysId = 0;
}
if (!ret)
{
// no bios dmi UUID available, set a fixed value for system-id
ret=getUUIDFromString((sysId = (const char *) SYSTEM_ID));
}
verbose("Customizing SystemID with : %s\n", getStringFromUUID(ret)); // apply a nice formatting to the displayed output
return ret;
}
*/
/*
* Must be called AFTER setupAcpi because we need to take care of correct
* FACP content to reflect in ioregs
*/
DT__AddProperty(chosenNode, MACHINE_SIG_PROP, sizeof(Platform.HWSignature), (EFI_UINT32 *)&Platform.HWSignature);
if ( YOSEMITE || ELCAPITAN )
if ( MacOSVerCurrent >= MacOSVer2Int("10.10") ) // Yosemite+
{
//
// Pike R. Alpha - 12 October 2014
}
}
}
/*
trunk/i386/boot2/boot.c
771771
772772
773773
774
774775
776
775777
776778
777779
if (strncmp(bootInfo->bootFile, "bt(", sizeof("bt(") ) == 0 ||
strncmp(bootInfo->bootFile, "hd(", sizeof("hd(") ) == 0 ||
strncmp(bootInfo->bootFile, "rd(", sizeof("rd(") ) == 0)
{
bootFileWithDevice = true;
}
// bootFile must start with a / if it not start with a device name
if (!bootFileWithDevice && (bootInfo->bootFile)[0] != '/')
trunk/i386/boot2/options.c
13091309
13101310
13111311
1312
1312
13131313
13141314
13151315
......
13521352
13531353
13541354
1355
1355
13561356
13571357
13581358
......
13701370
13711371
13721372
1373
1373
13741374
13751375
13761376
MacOSVerCurrent = MacOSVer2Int(gBootVolume->OSVersion);
// so copy it and trim
gMacOSVersion[0] = 0;
if (MacOSVerCurrent >= MacOSVer2Int("10.10"))
if ( MacOSVerCurrent >= MacOSVer2Int("10.10") )
{
strncat(gMacOSVersion, gBootVolume->OSVersion, 5);
}
}
else
{
if (MacOSVerCurrent >= MacOSVer2Int("10.10")) // OS X is 10.10 or newer
if ( MacOSVerCurrent >= MacOSVer2Int("10.10") ) // OS X is 10.10 or newer
{
strlcpy( bootInfo->bootFile, kOSXKernel, sizeof(bootInfo->bootFile) );
}
}
// Ermac : Inject "kext-dev-mode=1" if OS X 10.10 is detected
if (MacOSVerCurrent >= MacOSVer2Int("10.10")) // OS X is 10.10 or newer
if ( YOSEMITE ) // OS X is 10.10
{
addBootArg("kext-dev-mode=1");
}

Archive Download the corresponding diff file

Revision: 2727