Chameleon

Chameleon Commit Details

Date:2017-01-07 15:03:35 (3 years 10 months ago)
Author:Bungo
Commit:2841
Parents: 2840
Message:1) Dropping DMAR (DMA Remapping table) to use stock AppleACPIplatform.kext - resolves stuck on "waitForSystemMapper" or "[PCI configuration begin]" 2) Added "ACPI" (all capitals) path 3) Small cosmetics
Changes:
M/branches/Bungo/i386/boot2/boot.c
M/branches/Bungo/Make.rules
M/branches/Bungo/i386/boot2/boot.h
M/branches/Bungo/i386/libsaio/saio_internal.h
M/branches/Bungo/i386/boot2/options.c
M/branches/Bungo/i386/libsaio/acpi_patcher.c

File differences

branches/Bungo/i386/libsaio/acpi_patcher.c
154154
155155
156156
157
157
158158
159159
160
160
161161
162162
163163
164
164
165165
166166
167167
......
169169
170170
171171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
186196
187
188
197
198
189199
190200
191201
......
281291
282292
283293
284
294
285295
286296
287297
......
329339
330340
331341
332
342
333343
334344
335345
336346
337347
338348
339
349
340350
341351
342352
343
353
344354
345355
346356
......
365375
366376
367377
368
378
369379
370380
371381
......
373383
374384
375385
376
386
377387
378388
379
389
380390
381391
382392
......
434444
435445
436446
437
447
438448
439449
440450
......
448458
449459
450460
451
461
452462
453463
454464
......
477487
478488
479489
480
490
481491
482492
483493
484494
485
486495
487
496
488497
489498
490499
......
567576
568577
569578
570
579
571580
572581
573582
......
578587
579588
580589
581
590
582591
583592
584593
......
596605
597606
598607
599
608
600609
601610
602611
603
612
604613
605614
606615
......
617626
618627
619628
620
629
621630
622631
623632
......
625634
626635
627636
628
637
629638
630639
631640
......
648657
649658
650659
660
651661
652
662
663
664
665
666
667
668
669
670
671
672
673
674
675
653676
654
655
656
657
658
659
660
661677
662678
663679
......
669685
670686
671687
672
688
673689
674690
675691
......
700716
701717
702718
719
703720
704721
705
722
706723
707
708
709
710
711724
712725
713726
......
740753
741754
742755
743
756
744757
745758
746759
......
752765
753766
754767
755
768
756769
757770
758771
......
772785
773786
774787
775
788
776789
777790
778
791
779792
780793
781794
782
795
783796
784797
785798
786799
787800
788
801
789802
790803
791804
792805
793
806
794807
795808
796809
797810
798
811
799812
800813
801814
......
807820
808821
809822
810
823
811824
812825
813826
814827
815
828
816829
817830
818831
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
868895
869896
870
871
897
898
872899
873900
874
901
875902
903
876904
877905
878
906
879907
880
881
882
883
908
884909
885910
886911
......
915940
916941
917942
918
943
919944
920945
921946
{
int fd = 0;
static char dirSpec[512];
// Try finding 'filename' in the usual places
// Start searching any potential location for ACPI Table
snprintf(dirSpec, sizeof(dirSpec), "%s", filename);
snprintf(dirSpec, sizeof(dirSpec), "%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "/Extra/%s", filename);
snprintf(dirSpec, sizeof(dirSpec), "/Extra/ACPI/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "bt(0,0)/Extra/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "bt(0,0)/Extra/Acpi/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
// NOT FOUND:
dirSpec[0] = 0;
}
}
}
}
snprintf(dirSpec, sizeof(dirSpec), "/Extra/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "bt(0,0)/Extra/ACPI/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "bt(0,0)/Extra/Acpi/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
snprintf(dirSpec, sizeof(dirSpec), "bt(0,0)/Extra/%s", filename);
fd = open(dirSpec, 0);
if (fd < 0)
{
// NOT FOUND:
dirSpec[0] = 0;
}
}
}
}
}
}
}
if (outDirspec) *outDirspec = dirSpec;
if (outDirspec) *outDirspec = dirSpec;
return fd;
}
case 1:
case 2:
case 3:
verbose(": using.\n");
verbose(", using.\n");
break;
default:
// use SMBIOS chassisType to determine PM Profile (saved previously for us)
}
// Bungo: FACS table fix and load
verbose("\tOEM table FACS@%08X, length=%d: ", fadt_mod->FACS, ((struct acpi_2_facs *)fadt_mod->FACS)->Length);
verbose("\tOEM table FACS@%08X, length=%d, ", fadt_mod->FACS, ((struct acpi_2_facs *)fadt_mod->FACS)->Length);
if ((fadt_mod->FACS > 0) && (fadt_mod->FACS < 0xFFFFFFFF) && (((struct acpi_2_facs *)fadt_mod->FACS)->Length >= 64))
{
verbose("using.\n");
}
else
{
verbose(" incorrect!\n");
verbose(" Incorrect!\n");
}
if (ver_20 && (((uint32_t)(&(fadt_mod->X_FACS)) - (uint32_t)fadt_mod + 8) <= fadt_mod->Length))
{
verbose("\tOEM table X_FACS@%08X%08X, length=%d: ", (uint32_t)(fadt_mod->X_FACS >> 32), (uint32_t)(fadt_mod->X_FACS & 0xFFFFFFFF), ((struct acpi_2_facs *)fadt_mod->X_FACS)->Length);
verbose("\tOEM table X_FACS@%08X%08X, length=%d, ", (uint32_t)(fadt_mod->X_FACS >> 32), (uint32_t)(fadt_mod->X_FACS & 0xFFFFFFFF), ((struct acpi_2_facs *)fadt_mod->X_FACS)->Length);
if (fadt_mod->FACS != fadt_mod->X_FACS)
{
verbose("differes from FACS - fixing");
if ((fadt_mod->FACS > 0) && (fadt_mod->FACS < 0xFFFFFFFF) && (((struct acpi_2_facs *)fadt_mod->FACS)->Length >= 64))
{
Platform.HWSignature = ((struct acpi_2_facs *)fadt_mod->FACS)->HWSignature;
verbose("\tHardware Signature=0x%08X: using.\n", Platform.HWSignature);
verbose("\tHardware Signature=0x%08X, using.\n", Platform.HWSignature);
}
else
{
verbose("\tFixing Hardware Signature=0x%08X.\n", Platform.HWSignature);
}
verbose("\tOEM table DSDT@%08X, length=%d: %susing.\n", fadt_mod->DSDT, ((struct acpi_2_dsdt *)fadt_mod->DSDT)->Length, new_dsdt ? "not " : "");
verbose("\tOEM table DSDT@%08X, length=%d, %susing.\n", fadt_mod->DSDT, ((struct acpi_2_dsdt *)fadt_mod->DSDT)->Length, new_dsdt ? "not " : "");
if (ver_20 && (((uint32_t)(&(fadt_mod->X_DSDT)) - (uint32_t)fadt_mod + 8) <= fadt_mod->Length))
{
verbose("\tOEM table X_DSDT@%08X%08X, length=%d: %susing.\n", (uint32_t)(fadt_mod->X_DSDT >> 32), (uint32_t)(fadt_mod->X_DSDT & 0xFFFFFFFF), ((struct acpi_2_dsdt *)fadt_mod->X_DSDT)->Length, new_dsdt ? "not " : "");
verbose("\tOEM table X_DSDT@%08X%08X, length=%d, %susing.\n", (uint32_t)(fadt_mod->X_DSDT >> 32), (uint32_t)(fadt_mod->X_DSDT & 0xFFFFFFFF), ((struct acpi_2_dsdt *)fadt_mod->X_DSDT)->Length, new_dsdt ? "not " : "");
}
// Patch DSDT address if we have loaded DSDT.aml
if (new_dsdt)
if (new_dsdt != NULL)
{
verbose("ACPIpatcher: custom table DSDT already loaded @%08X, length=%d: using.\n", new_dsdt, ((struct acpi_2_header *)new_dsdt)->Length);
verbose("ACPIpatcher: custom table DSDT already loaded @%08X, length=%d, using.\n", new_dsdt, ((struct acpi_2_header *)new_dsdt)->Length);
}
else
{
sprintf(dirSpec, "DSDT.aml");
}
verbose("ACPIpatcher: attempting to load custom table DSDT...\n", dirSpec);
verbose("ACPIpatcher: attempting to load custom table DSDT...\n");
if ((new_dsdt = loadACPITable(dirSpec)))
{
verbose("ACPIpatcher: custom table DSDT loaded @%08X, length=%d.\n", new_dsdt, ((struct acpi_2_header *)new_dsdt)->Length);
// Load ECDT table
if (new_ecdt != NULL)
{
verbose("ACPIpatcher: custom table ECDT already loaded @%08X, length=%d: using.\n", new_ecdt, ((struct acpi_2_header *)new_ecdt)->Length);
verbose("ACPIpatcher: custom table ECDT already loaded @%08X, length=%d, using.\n", new_ecdt, ((struct acpi_2_header *)new_ecdt)->Length);
}
else
{
sprintf(dirSpec, "ECDT.aml");
filename = "ECDT.aml";
verbose("ACPIpatcher: attempting to load custom table ECDT...\n");
if ((new_ecdt = loadACPITable(filename)))
if ((new_ecdt = loadACPITable(dirSpec)))
{
verbose("ACPIpatcher: custom table ECDT loaded @%08X, length=%d.\n", new_ecdt, ((struct acpi_2_header *)new_ecdt)->Length);
}
int rsdplength = version ? rsdp->Length : 20;
int l = version ? 20 : 0;
verbose("ACPIpatcher: OEM table RSDP@%08X, length=%d. ACPI version %d.0: patching.\n", rsdp, rsdplength, version + 1);
verbose("ACPIpatcher: OEM table RSDP@%08X, length=%d. ACPI version %d.0. Patching.\n", rsdp, rsdplength, version + 1);
/* FIXME: no check that memory allocation succeeded
* Copy and patch RSDP, RSDT, XSDT and FADT
memcpy(rsdp_mod, rsdp, rsdplength);
rsdt = (struct acpi_2_rsdt *)rsdp->RsdtAddress;
verbose("ACPIpatcher: OEM table RSDT@%08X, length=%d: ", rsdp->RsdtAddress, rsdt->Length);
verbose("ACPIpatcher: OEM table RSDT@%08X, length=%d, ", rsdp->RsdtAddress, rsdt->Length);
if ((rsdp->RsdtAddress > 0) && (rsdp->RsdtAddress < 0xFFFFFFFF) && (rsdt->Length < 0x10000))
{
for (i = 0; i < rsdt_entries_num; i++)
{
struct acpi_2_header *oemTable = (struct acpi_2_header *)rsdt_entries[i];
verbose("ACPIpatcher: OEM table %c%c%c%c@%08X, length=%d: ", oemTable->Signature[0], oemTable->Signature[1], oemTable->Signature[2], oemTable->Signature[3], oemTable, oemTable->Length);
verbose("ACPIpatcher: OEM table %c%c%c%c@%08X, length=%d, ", oemTable->Signature[0], oemTable->Signature[1], oemTable->Signature[2], oemTable->Signature[3], oemTable, oemTable->Length);
if (!(rsdt_entries[i] > 0) || !(rsdt_entries[i] < 0xFFFFFFFF))
{
verbose("incorrect! Dropping.\n");
verbose("Incorrect! Dropping.\n");
dropoffset++;
continue;
}
verbose("using.\n");
rsdt_entries[i-dropoffset] = rsdt_entries[i];
// get rest of ssdt tables from inside ssdt_pmref
if (getSubSSDT) { // prevent from extracting originals if user choosed generatind PSS and/or CSS tables
if (getSubSSDT) { // prevent from extracting originals if user choosed generating PSS and/or CSS tables
struct ssdt_pmref *subSSDT = (struct ssdt_pmref *)(rsdt_entries[i] + sizeof(struct acpi_2_header) + 15);
uint8_t tabNum = *((uint8_t *)subSSDT - 2) / 3; // e.g Name (SSDT, Package (0x0C) -> 0x0C / 3 = number of sub SSDTs
for (j = 0; (j < tabNum) && (ssdtotal_number < 30); j++)
verbose("ACPIpatcher: OEM table SSDT_%s@%08X, length=%d: ", ((struct acpi_2_ssdt *)subSSDT[j].addr)->OEMTableId, subSSDT[j].addr, ((struct acpi_2_ssdt *)subSSDT[j].addr)->Length);
if (!(subSSDT[j].addr > 0) || !(subSSDT[j].addr < 0xFFFFFFFF))
{
verbose("incorrect! Dropping.\n");
verbose("Incorrect! Dropping.\n");
continue;
}
verbose("using.\n");
}
continue;
}
*/
So, suggest to drop, it should be in FACP */
// Suggest to drop OEM DSDT here if present, it should be in FACP, if custom DSDT present ocourse
if (tableSign(oemTable, "DSDT") && new_dsdt)
{
verbose("dropping.\n");
dropoffset++;
continue;
}
// Dropping DMAR (DMA Remapping table) table to fix stuck on "waitForSystemMapper" or "PCI configuration begin" cause nothing wokrked for me
if (tableSign(oemTable, "DMAR"))
{
verbose("dropping.\n");
dropoffset++;
continue;
}
if (tableSign(oemTable, "DSDT"))
{
verbose("dropping.\n");
dropoffset++;
continue;
}
if (tableSign(oemTable, "ECDT") && new_ecdt)
{
verbose("dropping.\n");
{
if (oemTable->Length > 0x10000)
{
verbose("incorrect. Not modifying.\n");
verbose("Incorrect. Not modifying.\n");
continue;
}
}
// For moded rsdt calculate new lenght
rsdt_mod->Length += 4*ssdtotal_number - 4*dropoffset;
if (new_ecdt)
{
rsdt_mod->Length += 4*ssdtotal_number - 4*dropoffset + 4; // custom - dropped + ECDT
rsdt_mod->Length += 4; // + ECDT
}
else
{
rsdt_mod->Length += 4*ssdtotal_number - 4*dropoffset;
}
// Allocate moded rsdt in Kernel memory area
struct acpi_2_rsdt *rsdt_copy = (struct acpi_2_rsdt *)AllocateKernelMemory(rsdt_mod->Length);
else
{
rsdp_mod->RsdtAddress = 0;
verbose("not found or incorrect!\n");
verbose("Not found or incorrect!\n");
}
verbose("\n");
{
// FIXME: handle 64-bit address correctly
xsdt = (struct acpi_2_xsdt *)(uint32_t)rsdp->XsdtAddress;
verbose("ACPIpatcher: OEM table XSDT@%08X%08X, length=%d: ", (uint32_t)(rsdp->XsdtAddress >> 32), (uint32_t)(rsdp->XsdtAddress & 0xFFFFFFFF), xsdt->Length);
verbose("ACPIpatcher: OEM table XSDT@%08X%08X, length=%d, ", (uint32_t)(rsdp->XsdtAddress >> 32), (uint32_t)(rsdp->XsdtAddress & 0xFFFFFFFF), xsdt->Length);
if ((rsdp->XsdtAddress > 0) && (rsdp->XsdtAddress < 0xFFFFFFFF) && (xsdt->Length < 0x10000))
{
{
struct acpi_2_header *oemTable = (struct acpi_2_header *)(uint32_t)xsdt_entries[i];
verbose("ACPIpatcher: OEM table %c%c%c%c@%08X%08X, length=%d", oemTable->Signature[0], oemTable->Signature[1], oemTable->Signature[2], oemTable->Signature[3], (uint32_t)(xsdt_entries[i] >> 32), (uint32_t)(xsdt_entries[i] & 0xFFFFFFFF), oemTable->Length);
if (!(xsdt_entries[i] > 0) || !(xsdt_entries[i] < 0xFFFFFFFF))
{
verbose(": incorrect! Dropping.\n");
verbose(", Incorrect! Dropping.\n");
dropoffset++;
continue;
}
bool inRSDT = (uint32_t)oemTable == ((uint32_t *)(rsdt + 1))[i]; // check if already in RSDT
if (inRSDT)
{
verbose(" (already in RSDT)");
}
if (tableSign(oemTable, "SSDT") && !inRSDT)
{
if (drop_ssdt)
{
verbose(": dropping.\n");
verbose(", dropping.\n");
dropoffset++;
}
else
{
verbose(": using.\n");
verbose(", using.\n");
xsdt_entries[i - dropoffset] = xsdt_entries[i];
// Get rest of ssdts from ssdt_pmref
if (getSubSSDT)
verbose("ACPIpatcher: OEM table SSDT_%s@%08X, length=%d", ((struct acpi_2_ssdt *)subSSDT[j].addr)->OEMTableId, subSSDT[j].addr, ((struct acpi_2_ssdt *)subSSDT[j].addr)->Length);
if (!(subSSDT[j].addr > 0) || !(subSSDT[j].addr < 0xFFFFFFFF))
{
verbose(": incorrect! Dropping.\n");
verbose(", Incorrect! Dropping.\n");
continue;
}
new_ssdt[ssdtotal_number] = (struct acpi_2_ssdt *)subSSDT[j].addr;
ssdtotal_number++;
verbose(": using.\n");
verbose(", using.\n");
}
}
}
continue;
}
// Bungo: According to ACPI Spec. no DSDT in RSDT, so what this for?
/*
if (tableSign(oemTable, "DSDT"))
{
if (new_dsdt)
{
xsdt_entries[i-dropoffset] = (uint64_t)new_dsdt;
verbose("custom table added.\n");
}
continue;
}
*/
// Suggest to drop, it should be in FACP
if (tableSign(oemTable, "DSDT") && !inRSDT)
{
verbose(": dropping.\n");
dropoffset++;
continue;
}
if (tableSign(oemTable, "FACP") && !inRSDT)
{
if (oemTable->Length > 0x10000)
{
goto drop_xsdt;
}
verbose(": patching.\n");
fadt_mod = patch_fadt((struct acpi_2_fadt *)oemTable, new_dsdt);
xsdt_entries[i - dropoffset] = (uint64_t)fadt_mod;
// Generate _CST SSDT
if (generate_cstates && (new_ssdt[ssdtotal_number] = generate_cst_ssdt(fadt_mod)))
{
verbose("\tC-States generated\n");
generate_cstates = false; // Generate SSDT only once!
ssdtotal_number++;
}
// Generating _PSS SSDT
if (generate_pstates && (new_ssdt[ssdtotal_number] = generate_pss_ssdt((void *)fadt_mod->DSDT)))
{
verbose("\tP-States generated\n");
generate_pstates = false; // Generate SSDT only once!
ssdtotal_number++;
}
continue;
}
// Bungo: According to ACPI Spec. no DSDT in RSDT, so what this for?
/*
if (tableSign(oemTable, "DSDT"))
{
if (new_dsdt)
{
xsdt_entries[i-dropoffset] = (uint64_t)new_dsdt;
verbose("custom table added.\n");
}
continue;
}
*/
// Suggest to drop OEM DSDT here if present, it should be in FACP, if custom DSDT present ocourse
if (tableSign(oemTable, "DSDT") && new_dsdt)
{
verbose(", dropping.\n");
dropoffset++;
continue;
}
// Dropping DMAR (DMA Remapping table) table to fix stuck on "waitForSystemMapper" or "PCI configuration begin" cause nothing wokrked for me
if (tableSign(oemTable, "DMAR"))
{
verbose(", dropping.\n");
dropoffset++;
continue;
}
if (tableSign(oemTable, "ECDT") && new_ecdt)
{
verbose(", dropping.\n");
dropoffset++;
continue;
}
if (tableSign(oemTable, "FACP") && !inRSDT)
{
if (oemTable->Length > 0x10000)
{
goto drop_xsdt;
}
verbose(", patching.\n");
fadt_mod = patch_fadt((struct acpi_2_fadt *)oemTable, new_dsdt);
xsdt_entries[i - dropoffset] = (uint64_t)fadt_mod;
// Generate _CST SSDT
if (generate_cstates && (new_ssdt[ssdtotal_number] = generate_cst_ssdt(fadt_mod)))
{
verbose("\tC-States generated\n");
generate_cstates = false; // Generate SSDT only once!
ssdtotal_number++;
}
// Generating _PSS SSDT
if (generate_pstates && (new_ssdt[ssdtotal_number] = generate_pss_ssdt((void *)fadt_mod->DSDT)))
{
verbose("\tP-States generated\n");
generate_pstates = false; // Generate SSDT only once!
ssdtotal_number++;
}
continue;
}
verbose(": using.\n");
verbose(", using.\n");
xsdt_entries[i - dropoffset] = xsdt_entries[i];
}
// For moded xsdt calculate new lenght
xsdt_mod->Length += 8*ssdtotal_number - 8*dropoffset;
if (new_ecdt)
{
xsdt_mod->Length += 8*ssdtotal_number - 8*dropoffset + 8; // custom - dropped + ECDT
xsdt_mod->Length += 8; // + ECDT
}
else
{
xsdt_mod->Length += 8*ssdtotal_number - 8*dropoffset;
}
// Allocate xsdt in Kernel memory area
struct acpi_2_xsdt *xsdt_copy = (struct acpi_2_xsdt *)AllocateKernelMemory(xsdt_mod->Length);
memcpy(xsdt_copy, xsdt_mod, xsdt_mod->Length); // should be: rsdt_mod->Length - 8*ssdtotal_number - 8 but don't care
/*FIXME: Now we just hope that if MacOS doesn't find XSDT it reverts to RSDT.
* A Better strategy would be to generate
*/
verbose("not found or incorrect!\n");
verbose("Not found or incorrect!\n");
rsdp_mod->XsdtAddress=0xffffffffffffffffLL;
}
branches/Bungo/i386/libsaio/saio_internal.h
223223
224224
225225
226
226
227227
228228
229229
// Base64-decode.c
char *BASE64Decode(const char* src, int in_len, int* out_len);
// options.c
// // Bungo: options.c
extern char gMacOSVersion[OSVERSTRLEN];
extern uint32_t MacOSVerCurrent;
extern uint32_t MacOSVer2Int(const char *osver);
branches/Bungo/i386/boot2/boot.c
892892
893893
894894
895
895896
896897
897898
}
}
// Bungo
uint32_t getMacOSVerCurrent()
{
MacOSVerCurrent = MacOSVer2Int(gBootVolume->OSVersion);
branches/Bungo/i386/boot2/boot.h
233233
234234
235235
236
236
237237
238238
239239
extern void initialize_runtime();
extern void common_boot(int biosdev);
extern bool checkOSVersion(const char * version);
extern uint32_t getMacOSVerCurrent();
extern uint32_t getMacOSVerCurrent(); // Bungo
/*
* acpi_patcher.c
branches/Bungo/i386/boot2/options.c
3737
3838
3939
40
40
4141
4242
43
43
44
4445
4546
4647
......
6667
6768
6869
69
70
70
7171
7272
7373
#else
#define DBG(x...)msglog(x)
#endif
// Bungo:
chargMacOSVersion[OSVERSTRLEN];
uint32_tMacOSVerCurrent = 0;
boolshowBootBanner = true; //Azi:showinfo
//Azi: showinfo
boolshowBootBanner = true;
static boolshouldboot = false;
extern int multiboot_timeout;
void showTextBuffer(char *buf_orig, int size);
//==========================================================================
// MacOSVer2Int - converts OS ver. string to uint32 (e.g "10.9.5" -> 0x0A090500) for easy comparing
// Bungo: MacOSVer2Int - converts OS ver. string to uint32 (e.g "10.9.5" -> 0x0A090500) for easy comparing
uint32_t MacOSVer2Int(const char *osver)
{
uint32_t result = 0;
branches/Bungo/Make.rules
8383
8484
8585
86
86
8787
8888
8989
@echo "#define I386BOOT_VERSION \"5.0.132\"" > $@
@echo "#define I386BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $@
@echo "#define I386BOOT_CHAMELEONVERSION \"`cat $(SRCROOT)/version`\"" >> $@
@echo "#define I386BOOT_CHAMELEONREVISION \"2540\"" >> $@
@echo "#define I386BOOT_CHAMELEONREVISION \"`svnversion -n | tr -d [:alpha:]`\"" >> $@
CONFIG_HEADERS=$(CONFIG_FILES) $(HEADER_VERSION)

Archive Download the corresponding diff file

Revision: 2841