Chameleon Applications

Chameleon Applications Commit Details

Date:2011-05-28 02:53:49 (12 years 10 months ago)
Author:ErmaC
Commit:298
Parents: 297
Message:Latest trunk. Also add the Azi modules (Nvidia,AMD,ATI,Intel), added strings into localizable.strings. preparing the "make dmg".
Changes:
A/branches/iFabio/Chameleon/package/slimpkg
M/branches/iFabio/Chameleon/i386/libsaio/Makefile
M/branches/iFabio/Chameleon/i386/libsaio/saio_internal.h
M/branches/iFabio/Chameleon/i386/libsaio/smbios.c
M/branches/iFabio/Chameleon/i386/boot2/options.c
M/branches/iFabio/Chameleon/i386/modules/klibc/klibc.c
M/branches/iFabio/Chameleon/i386/libsaio/xml.c
M/branches/iFabio/Chameleon/i386/libsaio/console.c
M/branches/iFabio/Chameleon/i386/boot2/graphics.c
M/branches/iFabio/Chameleon/i386/libsa/Makefile
M/branches/iFabio/Chameleon/i386/modules/uClibc++/Makefile
M/branches/iFabio/Chameleon/Make.rules
M/branches/iFabio/Chameleon/CHANGES
M/branches/iFabio/Chameleon/i386/modules/Cconfig
M/branches/iFabio/Chameleon/i386/libsaio/ati.c
M/branches/iFabio/Chameleon/i386/libsaio/biosfn.c
M/branches/iFabio/Chameleon/Makefile
M/branches/iFabio/Chameleon/i386/modules/Makefile
M/branches/iFabio/Chameleon/i386/cdboot/Makefile
M/branches/iFabio/Chameleon/i386/modules/Resolution/Makefile
M/branches/iFabio/Chameleon/package/builddmg
M/branches/iFabio/Chameleon/i386/libsaio/cpu.c
M/branches/iFabio/Chameleon/i386/libsaio/fake_efi.c
M/branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile
M/branches/iFabio/Chameleon/i386/boot2/Makefile
M/branches/iFabio/Chameleon/i386/libsa/prf.c
M/branches/iFabio/Chameleon/package/Resources/English.lproj/Localizable.strings
M/branches/iFabio/Chameleon/i386/boot2/boot.c
M/branches/iFabio/Chameleon/i386/modules/klibc/Makefile
M/branches/iFabio/Chameleon/i386/libsa/libsa.h
M/branches/iFabio/Chameleon/i386/libsaio/bootstruct.c
M/branches/iFabio/Chameleon/TODO
M/branches/iFabio/Chameleon/i386/libsaio/nvidia.c
M/branches/iFabio/Chameleon/i386/libsa/printf.c
M/branches/iFabio/Chameleon/i386/Makefile
M/branches/iFabio/Chameleon/i386/boot2/boot.h
M/branches/iFabio/Chameleon/i386/boot2/modules.c
M/branches/iFabio/Chameleon/i386/libsa/string.c
M/branches/iFabio/Chameleon/i386/config/Makefile
M/branches/iFabio/Chameleon/i386/libsaio/pci.h
M/branches/iFabio/Chameleon/i386/boot2/modules.h
M/branches/iFabio/Chameleon/Chameleon.xcodeproj/project.pbxproj
M/branches/iFabio/Chameleon/i386/libsaio/msdos.c
M/branches/iFabio/Chameleon/i386/boot2/gui.c
M/branches/iFabio/Chameleon/i386/libsaio/platform.h
M/branches/iFabio/Chameleon/i386/libsaio/usb.c
M/branches/iFabio/Chameleon/i386/modules/MakeInc.dir

File differences

branches/iFabio/Chameleon/Chameleon.xcodeproj/project.pbxproj
1515
1616
1717
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
18300
19301
20302
......
290572
291573
292574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
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
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
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
293968
294969
295970
......
313988
314989
315990
991
316992
317993
318994
0172D0DC11FB66820030222E /* dram_controllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dram_controllers.h; sourceTree = "<group>"; };
0172D0DD11FB66820030222E /* dram_controllers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dram_controllers.c; sourceTree = "<group>"; };
019DFBAF11FB94090013E8CC /* MEMTEST86_LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MEMTEST86_LICENSE; sourceTree = "<group>"; };
0389369E137D4A74004AD9DC /* HelloWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HelloWorld.cpp; sourceTree = "<group>"; };
038936A0137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
038936A2137D4A74004AD9DC /* modules */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = modules; sourceTree = "<group>"; };
038936A3137D4A74004AD9DC /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = "<group>"; };
038936A5137D4A74004AD9DC /* __ashldi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __ashldi3.c; sourceTree = "<group>"; };
038936A6137D4A74004AD9DC /* __ashrdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __ashrdi3.c; sourceTree = "<group>"; };
038936A7137D4A74004AD9DC /* __clzsi2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __clzsi2.c; sourceTree = "<group>"; };
038936A8137D4A74004AD9DC /* __divdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __divdi3.c; sourceTree = "<group>"; };
038936A9137D4A74004AD9DC /* __divsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __divsi3.c; sourceTree = "<group>"; };
038936AA137D4A74004AD9DC /* __lshrdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __lshrdi3.c; sourceTree = "<group>"; };
038936AB137D4A74004AD9DC /* __moddi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __moddi3.c; sourceTree = "<group>"; };
038936AC137D4A74004AD9DC /* __modsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __modsi3.c; sourceTree = "<group>"; };
038936AD137D4A74004AD9DC /* __udivdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivdi3.c; sourceTree = "<group>"; };
038936AE137D4A74004AD9DC /* __udivmoddi4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivmoddi4.c; sourceTree = "<group>"; };
038936AF137D4A74004AD9DC /* __udivmodsi4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivmodsi4.c; sourceTree = "<group>"; };
038936B0137D4A74004AD9DC /* __udivsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivsi3.c; sourceTree = "<group>"; };
038936B1137D4A74004AD9DC /* __umoddi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __umoddi3.c; sourceTree = "<group>"; };
038936B2137D4A74004AD9DC /* __umodsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __umodsi3.c; sourceTree = "<group>"; };
038936B3137D4A74004AD9DC /* atexit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atexit.c; sourceTree = "<group>"; };
038936B4137D4A74004AD9DC /* atexit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atexit.h; sourceTree = "<group>"; };
038936B5137D4A74004AD9DC /* atoi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atoi.c; sourceTree = "<group>"; };
038936B6137D4A74004AD9DC /* atol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atol.c; sourceTree = "<group>"; };
038936B7137D4A74004AD9DC /* atoll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atoll.c; sourceTree = "<group>"; };
038936B8137D4A74004AD9DC /* atox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atox.c; sourceTree = "<group>"; };
038936B9137D4A74004AD9DC /* bsearch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bsearch.c; sourceTree = "<group>"; };
038936BA137D4A74004AD9DC /* calloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = calloc.c; sourceTree = "<group>"; };
038936BB137D4A74004AD9DC /* exit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = exit.c; sourceTree = "<group>"; };
038936BC137D4A74004AD9DC /* jrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jrand48.c; sourceTree = "<group>"; };
038936BD137D4A74004AD9DC /* klibc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = klibc.c; sourceTree = "<group>"; };
038936BE137D4A74004AD9DC /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
038936BF137D4A74004AD9DC /* limits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = limits.h; sourceTree = "<group>"; };
038936C0137D4A74004AD9DC /* lrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lrand48.c; sourceTree = "<group>"; };
038936C1137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
038936C2137D4A74004AD9DC /* memccpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memccpy.c; sourceTree = "<group>"; };
038936C3137D4A74004AD9DC /* memchr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memchr.c; sourceTree = "<group>"; };
038936C4137D4A74004AD9DC /* memmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memmem.c; sourceTree = "<group>"; };
038936C5137D4A74004AD9DC /* memmove.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memmove.c; sourceTree = "<group>"; };
038936C6137D4A74004AD9DC /* memrchr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memrchr.c; sourceTree = "<group>"; };
038936C7137D4A74004AD9DC /* memswap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memswap.c; sourceTree = "<group>"; };
038936C8137D4A74004AD9DC /* mrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mrand48.c; sourceTree = "<group>"; };
038936C9137D4A74004AD9DC /* nrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nrand48.c; sourceTree = "<group>"; };
038936CA137D4A74004AD9DC /* onexit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = onexit.c; sourceTree = "<group>"; };
038936CB137D4A74004AD9DC /* qsort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = qsort.c; sourceTree = "<group>"; };
038936CC137D4A74004AD9DC /* seed48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = seed48.c; sourceTree = "<group>"; };
038936CD137D4A74004AD9DC /* sha1hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha1hash.c; sourceTree = "<group>"; };
038936CE137D4A74004AD9DC /* snprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snprintf.c; sourceTree = "<group>"; };
038936CF137D4A74004AD9DC /* srand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = srand48.c; sourceTree = "<group>"; };
038936D0137D4A74004AD9DC /* sscanf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sscanf.c; sourceTree = "<group>"; };
038936D1137D4A74004AD9DC /* strcasecmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strcasecmp.c; sourceTree = "<group>"; };
038936D2137D4A74004AD9DC /* strdup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strdup.c; sourceTree = "<group>"; };
038936D3137D4A74004AD9DC /* strlcat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strlcat.c; sourceTree = "<group>"; };
038936D4137D4A74004AD9DC /* strncasecmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strncasecmp.c; sourceTree = "<group>"; };
038936D5137D4A74004AD9DC /* strndup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strndup.c; sourceTree = "<group>"; };
038936D6137D4A74004AD9DC /* strnlen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strnlen.c; sourceTree = "<group>"; };
038936D7137D4A74004AD9DC /* strntoimax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strntoimax.c; sourceTree = "<group>"; };
038936D8137D4A74004AD9DC /* strntoumax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strntoumax.c; sourceTree = "<group>"; };
038936D9137D4A74004AD9DC /* strpbrk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strpbrk.c; sourceTree = "<group>"; };
038936DA137D4A74004AD9DC /* strsep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strsep.c; sourceTree = "<group>"; };
038936DB137D4A74004AD9DC /* strtoimax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoimax.c; sourceTree = "<group>"; };
038936DC137D4A74004AD9DC /* strtok.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtok.c; sourceTree = "<group>"; };
038936DD137D4A74004AD9DC /* strtok_r.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtok_r.c; sourceTree = "<group>"; };
038936DE137D4A74004AD9DC /* strtol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtol.c; sourceTree = "<group>"; };
038936DF137D4A74004AD9DC /* strtoll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoll.c; sourceTree = "<group>"; };
038936E0137D4A74004AD9DC /* strtotimespec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimespec.c; sourceTree = "<group>"; };
038936E1137D4A74004AD9DC /* strtotimeval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimeval.c; sourceTree = "<group>"; };
038936E2137D4A74004AD9DC /* strtotimex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimex.c; sourceTree = "<group>"; };
038936E3137D4A74004AD9DC /* strtoul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoul.c; sourceTree = "<group>"; };
038936E4137D4A74004AD9DC /* strtoull.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoull.c; sourceTree = "<group>"; };
038936E5137D4A74004AD9DC /* strtoumax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoumax.c; sourceTree = "<group>"; };
038936E6137D4A74004AD9DC /* strtox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtox.c; sourceTree = "<group>"; };
038936E7137D4A74004AD9DC /* strxspn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strxspn.c; sourceTree = "<group>"; };
038936E8137D4A74004AD9DC /* strxspn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strxspn.h; sourceTree = "<group>"; };
038936E9137D4A74004AD9DC /* version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = version; sourceTree = "<group>"; };
038936EA137D4A74004AD9DC /* vsnprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsnprintf.c; sourceTree = "<group>"; };
038936EB137D4A74004AD9DC /* vsscanf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsscanf.c; sourceTree = "<group>"; };
038936EC137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
038936ED137D4A74004AD9DC /* MakeInc.dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MakeInc.dir; sourceTree = "<group>"; };
038936EF137D4A74004AD9DC /* algorithm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = algorithm; sourceTree = "<group>"; };
038936F0137D4A74004AD9DC /* associative_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associative_base; sourceTree = "<group>"; };
038936F1137D4A74004AD9DC /* basic_definitions */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = basic_definitions; sourceTree = "<group>"; };
038936F2137D4A74004AD9DC /* bitset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitset; sourceTree = "<group>"; };
038936F3137D4A74004AD9DC /* cassert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cassert; sourceTree = "<group>"; };
038936F4137D4A74004AD9DC /* cctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cctype; sourceTree = "<group>"; };
038936F5137D4A74004AD9DC /* cerrno */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cerrno; sourceTree = "<group>"; };
038936F6137D4A74004AD9DC /* cfloat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cfloat; sourceTree = "<group>"; };
038936F7137D4A74004AD9DC /* char_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = char_traits; sourceTree = "<group>"; };
038936F8137D4A74004AD9DC /* climits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = climits; sourceTree = "<group>"; };
038936F9137D4A74004AD9DC /* clocale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = clocale; sourceTree = "<group>"; };
038936FA137D4A74004AD9DC /* cmath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cmath; sourceTree = "<group>"; };
038936FB137D4A74004AD9DC /* complex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = complex; sourceTree = "<group>"; };
038936FC137D4A74004AD9DC /* csetjmp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csetjmp; sourceTree = "<group>"; };
038936FD137D4A74004AD9DC /* csignal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csignal; sourceTree = "<group>"; };
038936FE137D4A74004AD9DC /* cstdarg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdarg; sourceTree = "<group>"; };
038936FF137D4A74004AD9DC /* cstddef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstddef; sourceTree = "<group>"; };
03893700137D4A74004AD9DC /* cstdio */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdio; sourceTree = "<group>"; };
03893701137D4A74004AD9DC /* cstdlib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdlib; sourceTree = "<group>"; };
03893702137D4A74004AD9DC /* cstring */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstring; sourceTree = "<group>"; };
03893703137D4A74004AD9DC /* ctime */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ctime; sourceTree = "<group>"; };
03893704137D4A74004AD9DC /* cwchar */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwchar; sourceTree = "<group>"; };
03893705137D4A74004AD9DC /* cwctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwctype; sourceTree = "<group>"; };
03893706137D4A74004AD9DC /* deque */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = deque; sourceTree = "<group>"; };
03893707137D4A74004AD9DC /* edid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edid.h; sourceTree = "<group>"; };
03893708137D4A74004AD9DC /* exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = exception; sourceTree = "<group>"; };
03893709137D4A74004AD9DC /* fstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fstream; sourceTree = "<group>"; };
0389370A137D4A74004AD9DC /* func_exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = func_exception; sourceTree = "<group>"; };
0389370B137D4A74004AD9DC /* functional */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = functional; sourceTree = "<group>"; };
0389370C137D4A74004AD9DC /* iomanip */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iomanip; sourceTree = "<group>"; };
0389370D137D4A74004AD9DC /* ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ios; sourceTree = "<group>"; };
0389370E137D4A74004AD9DC /* iosfwd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iosfwd; sourceTree = "<group>"; };
0389370F137D4A74004AD9DC /* iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iostream; sourceTree = "<group>"; };
03893710137D4A74004AD9DC /* istream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream; sourceTree = "<group>"; };
03893711137D4A74004AD9DC /* istream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream_helpers; sourceTree = "<group>"; };
03893712137D4A74004AD9DC /* iterator */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator; sourceTree = "<group>"; };
03893713137D4A74004AD9DC /* iterator_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator_base; sourceTree = "<group>"; };
03893714137D4A75004AD9DC /* limits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = limits; sourceTree = "<group>"; };
03893715137D4A75004AD9DC /* list */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = list; sourceTree = "<group>"; };
03893716137D4A75004AD9DC /* locale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale; sourceTree = "<group>"; };
03893717137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03893718137D4A75004AD9DC /* map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map; sourceTree = "<group>"; };
03893719137D4A75004AD9DC /* map.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map.old; sourceTree = "<group>"; };
0389371A137D4A75004AD9DC /* memory */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = memory; sourceTree = "<group>"; };
0389371B137D4A75004AD9DC /* new */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = new; sourceTree = "<group>"; };
0389371C137D4A75004AD9DC /* numeric */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = numeric; sourceTree = "<group>"; };
0389371D137D4A75004AD9DC /* ostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream; sourceTree = "<group>"; };
0389371E137D4A75004AD9DC /* ostream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream_helpers; sourceTree = "<group>"; };
0389371F137D4A75004AD9DC /* queue */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = queue; sourceTree = "<group>"; };
03893720137D4A75004AD9DC /* set */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set; sourceTree = "<group>"; };
03893721137D4A75004AD9DC /* set.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set.old; sourceTree = "<group>"; };
03893722137D4A75004AD9DC /* sstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sstream; sourceTree = "<group>"; };
03893723137D4A75004AD9DC /* stack */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stack; sourceTree = "<group>"; };
03893724137D4A75004AD9DC /* stdexcept */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stdexcept; sourceTree = "<group>"; };
03893725137D4A75004AD9DC /* streambuf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = streambuf; sourceTree = "<group>"; };
03893726137D4A75004AD9DC /* string */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string; sourceTree = "<group>"; };
03893727137D4A75004AD9DC /* string_iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string_iostream; sourceTree = "<group>"; };
03893728137D4A75004AD9DC /* support */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support; sourceTree = "<group>"; };
03893729137D4A75004AD9DC /* system_configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system_configuration.h; sourceTree = "<group>"; };
0389372A137D4A75004AD9DC /* type_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = type_traits; sourceTree = "<group>"; };
0389372B137D4A75004AD9DC /* typeinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = typeinfo; sourceTree = "<group>"; };
0389372C137D4A75004AD9DC /* types */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = types; sourceTree = "<group>"; };
0389372D137D4A75004AD9DC /* unwind-cxx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unwind-cxx.h"; sourceTree = "<group>"; };
0389372E137D4A75004AD9DC /* utility */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utility; sourceTree = "<group>"; };
0389372F137D4A75004AD9DC /* valarray */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valarray; sourceTree = "<group>"; };
03893730137D4A75004AD9DC /* vector */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vector; sourceTree = "<group>"; };
03893731137D4A75004AD9DC /* Modules.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Modules.txt; sourceTree = "<group>"; };
03893733137D4A75004AD9DC /* 915resolution.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = 915resolution.c; sourceTree = "<group>"; };
03893734137D4A75004AD9DC /* 915resolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 915resolution.h; sourceTree = "<group>"; };
03893735137D4A75004AD9DC /* edid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = edid.c; sourceTree = "<group>"; };
03893737137D4A75004AD9DC /* edid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edid.h; sourceTree = "<group>"; };
03893738137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03893739137D4A75004AD9DC /* Resolution.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Resolution.c; sourceTree = "<group>"; };
0389373A137D4A75004AD9DC /* shortatombios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shortatombios.h; sourceTree = "<group>"; };
0389373D137D4A75004AD9DC /* abi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abi.cpp; sourceTree = "<group>"; };
0389373E137D4A75004AD9DC /* algorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = algorithm.cpp; sourceTree = "<group>"; };
0389373F137D4A75004AD9DC /* associative_base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = associative_base.cpp; sourceTree = "<group>"; };
03893740137D4A75004AD9DC /* bitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bitset.cpp; sourceTree = "<group>"; };
03893741137D4A75004AD9DC /* char_traits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = char_traits.cpp; sourceTree = "<group>"; };
03893742137D4A75004AD9DC /* complex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = complex.cpp; sourceTree = "<group>"; };
03893743137D4A75004AD9DC /* del_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_op.cpp; sourceTree = "<group>"; };
03893744137D4A75004AD9DC /* del_opnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opnt.cpp; sourceTree = "<group>"; };
03893745137D4A75004AD9DC /* del_opv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opv.cpp; sourceTree = "<group>"; };
03893746137D4A75004AD9DC /* del_opvnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opvnt.cpp; sourceTree = "<group>"; };
03893747137D4A75004AD9DC /* deque.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deque.cpp; sourceTree = "<group>"; };
03893748137D4A75004AD9DC /* eh_alloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eh_alloc.cpp; sourceTree = "<group>"; };
03893749137D4A75004AD9DC /* eh_globals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eh_globals.cpp; sourceTree = "<group>"; };
0389374A137D4A75004AD9DC /* exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = exception.cpp; sourceTree = "<group>"; };
0389374B137D4A75004AD9DC /* fstream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fstream.cpp; sourceTree = "<group>"; };
0389374C137D4A75004AD9DC /* func_exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = func_exception.cpp; sourceTree = "<group>"; };
0389374E137D4A75004AD9DC /* algorithm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = algorithm; sourceTree = "<group>"; };
0389374F137D4A75004AD9DC /* associative_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associative_base; sourceTree = "<group>"; };
03893750137D4A75004AD9DC /* basic_definitions */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = basic_definitions; sourceTree = "<group>"; };
03893751137D4A75004AD9DC /* bitset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitset; sourceTree = "<group>"; };
03893752137D4A75004AD9DC /* cassert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cassert; sourceTree = "<group>"; };
03893753137D4A75004AD9DC /* cctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cctype; sourceTree = "<group>"; };
03893754137D4A75004AD9DC /* cerrno */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cerrno; sourceTree = "<group>"; };
03893755137D4A75004AD9DC /* cfloat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cfloat; sourceTree = "<group>"; };
03893756137D4A75004AD9DC /* char_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = char_traits; sourceTree = "<group>"; };
03893757137D4A75004AD9DC /* climits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = climits; sourceTree = "<group>"; };
03893758137D4A75004AD9DC /* clocale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = clocale; sourceTree = "<group>"; };
03893759137D4A75004AD9DC /* cmath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cmath; sourceTree = "<group>"; };
0389375A137D4A75004AD9DC /* complex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = complex; sourceTree = "<group>"; };
0389375B137D4A75004AD9DC /* csetjmp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csetjmp; sourceTree = "<group>"; };
0389375C137D4A75004AD9DC /* csignal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csignal; sourceTree = "<group>"; };
0389375D137D4A75004AD9DC /* cstdarg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdarg; sourceTree = "<group>"; };
0389375E137D4A75004AD9DC /* cstddef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstddef; sourceTree = "<group>"; };
0389375F137D4A75004AD9DC /* cstdio */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdio; sourceTree = "<group>"; };
03893760137D4A75004AD9DC /* cstdlib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdlib; sourceTree = "<group>"; };
03893761137D4A75004AD9DC /* cstring */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstring; sourceTree = "<group>"; };
03893762137D4A75004AD9DC /* ctime */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ctime; sourceTree = "<group>"; };
03893763137D4A75004AD9DC /* cwchar */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwchar; sourceTree = "<group>"; };
03893764137D4A75004AD9DC /* cwctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwctype; sourceTree = "<group>"; };
03893765137D4A75004AD9DC /* deque */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = deque; sourceTree = "<group>"; };
03893766137D4A75004AD9DC /* exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = exception; sourceTree = "<group>"; };
03893767137D4A75004AD9DC /* fstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fstream; sourceTree = "<group>"; };
03893768137D4A75004AD9DC /* func_exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = func_exception; sourceTree = "<group>"; };
03893769137D4A75004AD9DC /* functional */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = functional; sourceTree = "<group>"; };
0389376A137D4A75004AD9DC /* iomanip */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iomanip; sourceTree = "<group>"; };
0389376B137D4A75004AD9DC /* ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ios; sourceTree = "<group>"; };
0389376C137D4A75004AD9DC /* iosfwd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iosfwd; sourceTree = "<group>"; };
0389376D137D4A75004AD9DC /* iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iostream; sourceTree = "<group>"; };
0389376E137D4A75004AD9DC /* istream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream; sourceTree = "<group>"; };
0389376F137D4A75004AD9DC /* istream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream_helpers; sourceTree = "<group>"; };
03893770137D4A75004AD9DC /* iterator */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator; sourceTree = "<group>"; };
03893771137D4A75004AD9DC /* iterator_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator_base; sourceTree = "<group>"; };
03893772137D4A75004AD9DC /* limits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = limits; sourceTree = "<group>"; };
03893773137D4A75004AD9DC /* list */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = list; sourceTree = "<group>"; };
03893774137D4A75004AD9DC /* locale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale; sourceTree = "<group>"; };
03893775137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03893776137D4A75004AD9DC /* map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map; sourceTree = "<group>"; };
03893777137D4A75004AD9DC /* map.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map.old; sourceTree = "<group>"; };
03893778137D4A75004AD9DC /* memory */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = memory; sourceTree = "<group>"; };
03893779137D4A75004AD9DC /* new */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = new; sourceTree = "<group>"; };
0389377A137D4A75004AD9DC /* numeric */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = numeric; sourceTree = "<group>"; };
0389377B137D4A75004AD9DC /* ostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream; sourceTree = "<group>"; };
0389377C137D4A75004AD9DC /* ostream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream_helpers; sourceTree = "<group>"; };
0389377D137D4A75004AD9DC /* queue */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = queue; sourceTree = "<group>"; };
0389377E137D4A75004AD9DC /* set */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set; sourceTree = "<group>"; };
0389377F137D4A75004AD9DC /* set.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set.old; sourceTree = "<group>"; };
03893780137D4A75004AD9DC /* sstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sstream; sourceTree = "<group>"; };
03893781137D4A75004AD9DC /* stack */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stack; sourceTree = "<group>"; };
03893782137D4A75004AD9DC /* stdexcept */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stdexcept; sourceTree = "<group>"; };
03893783137D4A75004AD9DC /* streambuf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = streambuf; sourceTree = "<group>"; };
03893784137D4A75004AD9DC /* string */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string; sourceTree = "<group>"; };
03893785137D4A75004AD9DC /* string_iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string_iostream; sourceTree = "<group>"; };
03893786137D4A75004AD9DC /* support */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support; sourceTree = "<group>"; };
03893787137D4A75004AD9DC /* system_configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system_configuration.h; sourceTree = "<group>"; };
03893788137D4A75004AD9DC /* type_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = type_traits; sourceTree = "<group>"; };
03893789137D4A75004AD9DC /* typeinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = typeinfo; sourceTree = "<group>"; };
0389378A137D4A75004AD9DC /* types */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = types; sourceTree = "<group>"; };
0389378B137D4A75004AD9DC /* unwind-cxx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unwind-cxx.h"; sourceTree = "<group>"; };
0389378C137D4A75004AD9DC /* utility */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utility; sourceTree = "<group>"; };
0389378D137D4A75004AD9DC /* valarray */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valarray; sourceTree = "<group>"; };
0389378E137D4A75004AD9DC /* vector */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vector; sourceTree = "<group>"; };
0389378F137D4A75004AD9DC /* iomanip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iomanip.cpp; sourceTree = "<group>"; };
03893790137D4A75004AD9DC /* ios.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ios.cpp; sourceTree = "<group>"; };
03893791137D4A75004AD9DC /* iostream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iostream.cpp; sourceTree = "<group>"; };
03893792137D4A75004AD9DC /* istream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = istream.cpp; sourceTree = "<group>"; };
03893793137D4A75004AD9DC /* iterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iterator.cpp; sourceTree = "<group>"; };
03893794137D4A75004AD9DC /* limits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = limits.cpp; sourceTree = "<group>"; };
03893795137D4A75004AD9DC /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = list.cpp; sourceTree = "<group>"; };
03893796137D4A75004AD9DC /* locale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locale.cpp; sourceTree = "<group>"; };
03893797137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03893798137D4A75004AD9DC /* map.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = map.cpp; sourceTree = "<group>"; };
03893799137D4A75004AD9DC /* new_handler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_handler.cpp; sourceTree = "<group>"; };
0389379A137D4A75004AD9DC /* new_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_op.cpp; sourceTree = "<group>"; };
0389379B137D4A75004AD9DC /* new_opnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opnt.cpp; sourceTree = "<group>"; };
0389379C137D4A75004AD9DC /* new_opv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opv.cpp; sourceTree = "<group>"; };
0389379D137D4A75004AD9DC /* new_opvnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opvnt.cpp; sourceTree = "<group>"; };
0389379E137D4A75004AD9DC /* numeric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = numeric.cpp; sourceTree = "<group>"; };
0389379F137D4A75004AD9DC /* ostream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ostream.cpp; sourceTree = "<group>"; };
038937A0137D4A75004AD9DC /* queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = queue.cpp; sourceTree = "<group>"; };
038937A1137D4A75004AD9DC /* set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = set.cpp; sourceTree = "<group>"; };
038937A2137D4A75004AD9DC /* sstream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sstream.cpp; sourceTree = "<group>"; };
038937A3137D4A75004AD9DC /* stack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stack.cpp; sourceTree = "<group>"; };
038937A4137D4A75004AD9DC /* stdexcept.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stdexcept.cpp; sourceTree = "<group>"; };
038937A5137D4A75004AD9DC /* streambuf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = streambuf.cpp; sourceTree = "<group>"; };
038937A6137D4A75004AD9DC /* string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string.cpp; sourceTree = "<group>"; };
038937A7137D4A75004AD9DC /* support.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = support.cpp; sourceTree = "<group>"; };
038937A8137D4A75004AD9DC /* typeinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = typeinfo.cpp; sourceTree = "<group>"; };
038937A9137D4A75004AD9DC /* uClibc++.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "uClibc++.c"; sourceTree = "<group>"; };
038937AA137D4A75004AD9DC /* utility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utility.cpp; sourceTree = "<group>"; };
038937AB137D4A75004AD9DC /* valarray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = valarray.cpp; sourceTree = "<group>"; };
038937AC137D4A75004AD9DC /* vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vector.cpp; sourceTree = "<group>"; };
03DA89351389338300B43B35 /* AMDGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AMDGraphicsEnabler.c; sourceTree = "<group>"; };
03DA89361389338300B43B35 /* ati.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ati.c; sourceTree = "<group>"; };
03DA89371389338300B43B35 /* ati_reg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati_reg.h; sourceTree = "<group>"; };
03DA89381389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03DA89391389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = "<group>"; };
03DA893B1389338300B43B35 /* ati.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ati.c; sourceTree = "<group>"; };
03DA893C1389338300B43B35 /* ati.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati.h; sourceTree = "<group>"; };
03DA893D1389338300B43B35 /* ATiGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ATiGraphicsEnabler.c; sourceTree = "<group>"; };
03DA893E1389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03DA89401389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = "<group>"; };
03DA89421389338300B43B35 /* gma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gma.c; sourceTree = "<group>"; };
03DA89431389338300B43B35 /* gma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gma.h; sourceTree = "<group>"; };
03DA89441389338300B43B35 /* IntelGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IntelGraphicsEnabler.c; sourceTree = "<group>"; };
03DA89451389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03DA89461389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = "<group>"; };
03DA89481389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
03DA89491389338300B43B35 /* nvidia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nvidia.c; sourceTree = "<group>"; };
03DA894A1389338300B43B35 /* nvidia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nvidia.h; sourceTree = "<group>"; };
03DA894B1389338300B43B35 /* NVIDIAGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = NVIDIAGraphicsEnabler.c; sourceTree = "<group>"; };
03DA894C1389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = "<group>"; };
1D145307137073F40050C0CD /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = "<group>"; };
1D2A1AF513743A2600787720 /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = "<group>"; };
65ED53931204B83200B22507 /* disk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disk.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
0389368B137D4A74004AD9DC /* modules */ = {
isa = PBXGroup;
children = (
03DA89341389338300B43B35 /* AMDGraphicsEnabler */,
03DA893A1389338300B43B35 /* ATiGraphicsEnabler */,
03DA89411389338300B43B35 /* IntelGraphicsEnabler */,
03DA89471389338300B43B35 /* NVIDIAGraphicsEnabler */,
0389369D137D4A74004AD9DC /* HelloWorld */,
038936A1137D4A74004AD9DC /* include */,
038936A4137D4A74004AD9DC /* klibc */,
038936EC137D4A74004AD9DC /* Makefile */,
038936ED137D4A74004AD9DC /* MakeInc.dir */,
038936EE137D4A74004AD9DC /* module_includes */,
03893731137D4A75004AD9DC /* Modules.txt */,
03893732137D4A75004AD9DC /* Resolution */,
0389373C137D4A75004AD9DC /* uClibc++ */,
);
path = modules;
sourceTree = "<group>";
};
0389369D137D4A74004AD9DC /* HelloWorld */ = {
isa = PBXGroup;
children = (
0389369E137D4A74004AD9DC /* HelloWorld.cpp */,
0389369F137D4A74004AD9DC /* include */,
038936A0137D4A74004AD9DC /* Makefile */,
);
path = HelloWorld;
sourceTree = "<group>";
};
0389369F137D4A74004AD9DC /* include */ = {
isa = PBXGroup;
children = (
);
path = include;
sourceTree = "<group>";
};
038936A1137D4A74004AD9DC /* include */ = {
isa = PBXGroup;
children = (
038936A2137D4A74004AD9DC /* modules */,
038936A3137D4A74004AD9DC /* types.h */,
);
path = include;
sourceTree = "<group>";
};
038936A4137D4A74004AD9DC /* klibc */ = {
isa = PBXGroup;
children = (
038936A5137D4A74004AD9DC /* __ashldi3.c */,
038936A6137D4A74004AD9DC /* __ashrdi3.c */,
038936A7137D4A74004AD9DC /* __clzsi2.c */,
038936A8137D4A74004AD9DC /* __divdi3.c */,
038936A9137D4A74004AD9DC /* __divsi3.c */,
038936AA137D4A74004AD9DC /* __lshrdi3.c */,
038936AB137D4A74004AD9DC /* __moddi3.c */,
038936AC137D4A74004AD9DC /* __modsi3.c */,
038936AD137D4A74004AD9DC /* __udivdi3.c */,
038936AE137D4A74004AD9DC /* __udivmoddi4.c */,
038936AF137D4A74004AD9DC /* __udivmodsi4.c */,
038936B0137D4A74004AD9DC /* __udivsi3.c */,
038936B1137D4A74004AD9DC /* __umoddi3.c */,
038936B2137D4A74004AD9DC /* __umodsi3.c */,
038936B3137D4A74004AD9DC /* atexit.c */,
038936B4137D4A74004AD9DC /* atexit.h */,
038936B5137D4A74004AD9DC /* atoi.c */,
038936B6137D4A74004AD9DC /* atol.c */,
038936B7137D4A74004AD9DC /* atoll.c */,
038936B8137D4A74004AD9DC /* atox.c */,
038936B9137D4A74004AD9DC /* bsearch.c */,
038936BA137D4A74004AD9DC /* calloc.c */,
038936BB137D4A74004AD9DC /* exit.c */,
038936BC137D4A74004AD9DC /* jrand48.c */,
038936BD137D4A74004AD9DC /* klibc.c */,
038936BE137D4A74004AD9DC /* LICENSE */,
038936BF137D4A74004AD9DC /* limits.h */,
038936C0137D4A74004AD9DC /* lrand48.c */,
038936C1137D4A74004AD9DC /* Makefile */,
038936C2137D4A74004AD9DC /* memccpy.c */,
038936C3137D4A74004AD9DC /* memchr.c */,
038936C4137D4A74004AD9DC /* memmem.c */,
038936C5137D4A74004AD9DC /* memmove.c */,
038936C6137D4A74004AD9DC /* memrchr.c */,
038936C7137D4A74004AD9DC /* memswap.c */,
038936C8137D4A74004AD9DC /* mrand48.c */,
038936C9137D4A74004AD9DC /* nrand48.c */,
038936CA137D4A74004AD9DC /* onexit.c */,
038936CB137D4A74004AD9DC /* qsort.c */,
038936CC137D4A74004AD9DC /* seed48.c */,
038936CD137D4A74004AD9DC /* sha1hash.c */,
038936CE137D4A74004AD9DC /* snprintf.c */,
038936CF137D4A74004AD9DC /* srand48.c */,
038936D0137D4A74004AD9DC /* sscanf.c */,
038936D1137D4A74004AD9DC /* strcasecmp.c */,
038936D2137D4A74004AD9DC /* strdup.c */,
038936D3137D4A74004AD9DC /* strlcat.c */,
038936D4137D4A74004AD9DC /* strncasecmp.c */,
038936D5137D4A74004AD9DC /* strndup.c */,
038936D6137D4A74004AD9DC /* strnlen.c */,
038936D7137D4A74004AD9DC /* strntoimax.c */,
038936D8137D4A74004AD9DC /* strntoumax.c */,
038936D9137D4A74004AD9DC /* strpbrk.c */,
038936DA137D4A74004AD9DC /* strsep.c */,
038936DB137D4A74004AD9DC /* strtoimax.c */,
038936DC137D4A74004AD9DC /* strtok.c */,
038936DD137D4A74004AD9DC /* strtok_r.c */,
038936DE137D4A74004AD9DC /* strtol.c */,
038936DF137D4A74004AD9DC /* strtoll.c */,
038936E0137D4A74004AD9DC /* strtotimespec.c */,
038936E1137D4A74004AD9DC /* strtotimeval.c */,
038936E2137D4A74004AD9DC /* strtotimex.c */,
038936E3137D4A74004AD9DC /* strtoul.c */,
038936E4137D4A74004AD9DC /* strtoull.c */,
038936E5137D4A74004AD9DC /* strtoumax.c */,
038936E6137D4A74004AD9DC /* strtox.c */,
038936E7137D4A74004AD9DC /* strxspn.c */,
038936E8137D4A74004AD9DC /* strxspn.h */,
038936E9137D4A74004AD9DC /* version */,
038936EA137D4A74004AD9DC /* vsnprintf.c */,
038936EB137D4A74004AD9DC /* vsscanf.c */,
);
path = klibc;
sourceTree = "<group>";
};
038936EE137D4A74004AD9DC /* module_includes */ = {
isa = PBXGroup;
children = (
038936EF137D4A74004AD9DC /* algorithm */,
038936F0137D4A74004AD9DC /* associative_base */,
038936F1137D4A74004AD9DC /* basic_definitions */,
038936F2137D4A74004AD9DC /* bitset */,
038936F3137D4A74004AD9DC /* cassert */,
038936F4137D4A74004AD9DC /* cctype */,
038936F5137D4A74004AD9DC /* cerrno */,
038936F6137D4A74004AD9DC /* cfloat */,
038936F7137D4A74004AD9DC /* char_traits */,
038936F8137D4A74004AD9DC /* climits */,
038936F9137D4A74004AD9DC /* clocale */,
038936FA137D4A74004AD9DC /* cmath */,
038936FB137D4A74004AD9DC /* complex */,
038936FC137D4A74004AD9DC /* csetjmp */,
038936FD137D4A74004AD9DC /* csignal */,
038936FE137D4A74004AD9DC /* cstdarg */,
038936FF137D4A74004AD9DC /* cstddef */,
03893700137D4A74004AD9DC /* cstdio */,
03893701137D4A74004AD9DC /* cstdlib */,
03893702137D4A74004AD9DC /* cstring */,
03893703137D4A74004AD9DC /* ctime */,
03893704137D4A74004AD9DC /* cwchar */,
03893705137D4A74004AD9DC /* cwctype */,
03893706137D4A74004AD9DC /* deque */,
03893707137D4A74004AD9DC /* edid.h */,
03893708137D4A74004AD9DC /* exception */,
03893709137D4A74004AD9DC /* fstream */,
0389370A137D4A74004AD9DC /* func_exception */,
0389370B137D4A74004AD9DC /* functional */,
0389370C137D4A74004AD9DC /* iomanip */,
0389370D137D4A74004AD9DC /* ios */,
0389370E137D4A74004AD9DC /* iosfwd */,
0389370F137D4A74004AD9DC /* iostream */,
03893710137D4A74004AD9DC /* istream */,
03893711137D4A74004AD9DC /* istream_helpers */,
03893712137D4A74004AD9DC /* iterator */,
03893713137D4A74004AD9DC /* iterator_base */,
03893714137D4A75004AD9DC /* limits */,
03893715137D4A75004AD9DC /* list */,
03893716137D4A75004AD9DC /* locale */,
03893717137D4A75004AD9DC /* Makefile */,
03893718137D4A75004AD9DC /* map */,
03893719137D4A75004AD9DC /* map.old */,
0389371A137D4A75004AD9DC /* memory */,
0389371B137D4A75004AD9DC /* new */,
0389371C137D4A75004AD9DC /* numeric */,
0389371D137D4A75004AD9DC /* ostream */,
0389371E137D4A75004AD9DC /* ostream_helpers */,
0389371F137D4A75004AD9DC /* queue */,
03893720137D4A75004AD9DC /* set */,
03893721137D4A75004AD9DC /* set.old */,
03893722137D4A75004AD9DC /* sstream */,
03893723137D4A75004AD9DC /* stack */,
03893724137D4A75004AD9DC /* stdexcept */,
03893725137D4A75004AD9DC /* streambuf */,
03893726137D4A75004AD9DC /* string */,
03893727137D4A75004AD9DC /* string_iostream */,
03893728137D4A75004AD9DC /* support */,
03893729137D4A75004AD9DC /* system_configuration.h */,
0389372A137D4A75004AD9DC /* type_traits */,
0389372B137D4A75004AD9DC /* typeinfo */,
0389372C137D4A75004AD9DC /* types */,
0389372D137D4A75004AD9DC /* unwind-cxx.h */,
0389372E137D4A75004AD9DC /* utility */,
0389372F137D4A75004AD9DC /* valarray */,
03893730137D4A75004AD9DC /* vector */,
);
path = module_includes;
sourceTree = "<group>";
};
03893732137D4A75004AD9DC /* Resolution */ = {
isa = PBXGroup;
children = (
03893733137D4A75004AD9DC /* 915resolution.c */,
03893734137D4A75004AD9DC /* 915resolution.h */,
03893735137D4A75004AD9DC /* edid.c */,
03893736137D4A75004AD9DC /* include */,
03893738137D4A75004AD9DC /* Makefile */,
03893739137D4A75004AD9DC /* Resolution.c */,
0389373A137D4A75004AD9DC /* shortatombios.h */,
);
path = Resolution;
sourceTree = "<group>";
};
03893736137D4A75004AD9DC /* include */ = {
isa = PBXGroup;
children = (
03893737137D4A75004AD9DC /* edid.h */,
);
path = include;
sourceTree = "<group>";
};
0389373C137D4A75004AD9DC /* uClibc++ */ = {
isa = PBXGroup;
children = (
0389373D137D4A75004AD9DC /* abi.cpp */,
0389373E137D4A75004AD9DC /* algorithm.cpp */,
0389373F137D4A75004AD9DC /* associative_base.cpp */,
03893740137D4A75004AD9DC /* bitset.cpp */,
03893741137D4A75004AD9DC /* char_traits.cpp */,
03893742137D4A75004AD9DC /* complex.cpp */,
03893743137D4A75004AD9DC /* del_op.cpp */,
03893744137D4A75004AD9DC /* del_opnt.cpp */,
03893745137D4A75004AD9DC /* del_opv.cpp */,
03893746137D4A75004AD9DC /* del_opvnt.cpp */,
03893747137D4A75004AD9DC /* deque.cpp */,
03893748137D4A75004AD9DC /* eh_alloc.cpp */,
03893749137D4A75004AD9DC /* eh_globals.cpp */,
0389374A137D4A75004AD9DC /* exception.cpp */,
0389374B137D4A75004AD9DC /* fstream.cpp */,
0389374C137D4A75004AD9DC /* func_exception.cpp */,
0389374D137D4A75004AD9DC /* include */,
0389378F137D4A75004AD9DC /* iomanip.cpp */,
03893790137D4A75004AD9DC /* ios.cpp */,
03893791137D4A75004AD9DC /* iostream.cpp */,
03893792137D4A75004AD9DC /* istream.cpp */,
03893793137D4A75004AD9DC /* iterator.cpp */,
03893794137D4A75004AD9DC /* limits.cpp */,
03893795137D4A75004AD9DC /* list.cpp */,
03893796137D4A75004AD9DC /* locale.cpp */,
03893797137D4A75004AD9DC /* Makefile */,
03893798137D4A75004AD9DC /* map.cpp */,
03893799137D4A75004AD9DC /* new_handler.cpp */,
0389379A137D4A75004AD9DC /* new_op.cpp */,
0389379B137D4A75004AD9DC /* new_opnt.cpp */,
0389379C137D4A75004AD9DC /* new_opv.cpp */,
0389379D137D4A75004AD9DC /* new_opvnt.cpp */,
0389379E137D4A75004AD9DC /* numeric.cpp */,
0389379F137D4A75004AD9DC /* ostream.cpp */,
038937A0137D4A75004AD9DC /* queue.cpp */,
038937A1137D4A75004AD9DC /* set.cpp */,
038937A2137D4A75004AD9DC /* sstream.cpp */,
038937A3137D4A75004AD9DC /* stack.cpp */,
038937A4137D4A75004AD9DC /* stdexcept.cpp */,
038937A5137D4A75004AD9DC /* streambuf.cpp */,
038937A6137D4A75004AD9DC /* string.cpp */,
038937A7137D4A75004AD9DC /* support.cpp */,
038937A8137D4A75004AD9DC /* typeinfo.cpp */,
038937A9137D4A75004AD9DC /* uClibc++.c */,
038937AA137D4A75004AD9DC /* utility.cpp */,
038937AB137D4A75004AD9DC /* valarray.cpp */,
038937AC137D4A75004AD9DC /* vector.cpp */,
);
path = "uClibc++";
sourceTree = "<group>";
};
0389374D137D4A75004AD9DC /* include */ = {
isa = PBXGroup;
children = (
0389374E137D4A75004AD9DC /* algorithm */,
0389374F137D4A75004AD9DC /* associative_base */,
03893750137D4A75004AD9DC /* basic_definitions */,
03893751137D4A75004AD9DC /* bitset */,
03893752137D4A75004AD9DC /* cassert */,
03893753137D4A75004AD9DC /* cctype */,
03893754137D4A75004AD9DC /* cerrno */,
03893755137D4A75004AD9DC /* cfloat */,
03893756137D4A75004AD9DC /* char_traits */,
03893757137D4A75004AD9DC /* climits */,
03893758137D4A75004AD9DC /* clocale */,
03893759137D4A75004AD9DC /* cmath */,
0389375A137D4A75004AD9DC /* complex */,
0389375B137D4A75004AD9DC /* csetjmp */,
0389375C137D4A75004AD9DC /* csignal */,
0389375D137D4A75004AD9DC /* cstdarg */,
0389375E137D4A75004AD9DC /* cstddef */,
0389375F137D4A75004AD9DC /* cstdio */,
03893760137D4A75004AD9DC /* cstdlib */,
03893761137D4A75004AD9DC /* cstring */,
03893762137D4A75004AD9DC /* ctime */,
03893763137D4A75004AD9DC /* cwchar */,
03893764137D4A75004AD9DC /* cwctype */,
03893765137D4A75004AD9DC /* deque */,
03893766137D4A75004AD9DC /* exception */,
03893767137D4A75004AD9DC /* fstream */,
03893768137D4A75004AD9DC /* func_exception */,
03893769137D4A75004AD9DC /* functional */,
0389376A137D4A75004AD9DC /* iomanip */,
0389376B137D4A75004AD9DC /* ios */,
0389376C137D4A75004AD9DC /* iosfwd */,
0389376D137D4A75004AD9DC /* iostream */,
0389376E137D4A75004AD9DC /* istream */,
0389376F137D4A75004AD9DC /* istream_helpers */,
03893770137D4A75004AD9DC /* iterator */,
03893771137D4A75004AD9DC /* iterator_base */,
03893772137D4A75004AD9DC /* limits */,
03893773137D4A75004AD9DC /* list */,
03893774137D4A75004AD9DC /* locale */,
03893775137D4A75004AD9DC /* Makefile */,
03893776137D4A75004AD9DC /* map */,
03893777137D4A75004AD9DC /* map.old */,
03893778137D4A75004AD9DC /* memory */,
03893779137D4A75004AD9DC /* new */,
0389377A137D4A75004AD9DC /* numeric */,
0389377B137D4A75004AD9DC /* ostream */,
0389377C137D4A75004AD9DC /* ostream_helpers */,
0389377D137D4A75004AD9DC /* queue */,
0389377E137D4A75004AD9DC /* set */,
0389377F137D4A75004AD9DC /* set.old */,
03893780137D4A75004AD9DC /* sstream */,
03893781137D4A75004AD9DC /* stack */,
03893782137D4A75004AD9DC /* stdexcept */,
03893783137D4A75004AD9DC /* streambuf */,
03893784137D4A75004AD9DC /* string */,
03893785137D4A75004AD9DC /* string_iostream */,
03893786137D4A75004AD9DC /* support */,
03893787137D4A75004AD9DC /* system_configuration.h */,
03893788137D4A75004AD9DC /* type_traits */,
03893789137D4A75004AD9DC /* typeinfo */,
0389378A137D4A75004AD9DC /* types */,
0389378B137D4A75004AD9DC /* unwind-cxx.h */,
0389378C137D4A75004AD9DC /* utility */,
0389378D137D4A75004AD9DC /* valarray */,
0389378E137D4A75004AD9DC /* vector */,
);
path = include;
sourceTree = "<group>";
};
03DA89341389338300B43B35 /* AMDGraphicsEnabler */ = {
isa = PBXGroup;
children = (
03DA89351389338300B43B35 /* AMDGraphicsEnabler.c */,
03DA89361389338300B43B35 /* ati.c */,
03DA89371389338300B43B35 /* ati_reg.h */,
03DA89381389338300B43B35 /* Makefile */,
03DA89391389338300B43B35 /* Readme.txt */,
);
path = AMDGraphicsEnabler;
sourceTree = "<group>";
};
03DA893A1389338300B43B35 /* ATiGraphicsEnabler */ = {
isa = PBXGroup;
children = (
03DA893B1389338300B43B35 /* ati.c */,
03DA893C1389338300B43B35 /* ati.h */,
03DA893D1389338300B43B35 /* ATiGraphicsEnabler.c */,
03DA893E1389338300B43B35 /* Makefile */,
03DA89401389338300B43B35 /* Readme.txt */,
);
path = ATiGraphicsEnabler;
sourceTree = "<group>";
};
03DA89411389338300B43B35 /* IntelGraphicsEnabler */ = {
isa = PBXGroup;
children = (
03DA89421389338300B43B35 /* gma.c */,
03DA89431389338300B43B35 /* gma.h */,
03DA89441389338300B43B35 /* IntelGraphicsEnabler.c */,
03DA89451389338300B43B35 /* Makefile */,
03DA89461389338300B43B35 /* Readme.txt */,
);
path = IntelGraphicsEnabler;
sourceTree = "<group>";
};
03DA89471389338300B43B35 /* NVIDIAGraphicsEnabler */ = {
isa = PBXGroup;
children = (
03DA89481389338300B43B35 /* Makefile */,
03DA89491389338300B43B35 /* nvidia.c */,
03DA894A1389338300B43B35 /* nvidia.h */,
03DA894B1389338300B43B35 /* NVIDIAGraphicsEnabler.c */,
03DA894C1389338300B43B35 /* Readme.txt */,
);
path = NVIDIAGraphicsEnabler;
sourceTree = "<group>";
};
08FB7794FE84155DC02AAC07 /* Chameleon */ = {
isa = PBXGroup;
children = (
B0056CE511F3868000754B65 /* i386 */ = {
isa = PBXGroup;
children = (
0389368B137D4A74004AD9DC /* modules */,
B0056CE611F3868000754B65 /* boot0 */,
B0056CEA11F3868000754B65 /* boot1 */,
B0056CF211F3868000754B65 /* boot2 */,
branches/iFabio/Chameleon/i386/libsaio/xml.c
6767
6868
6969
70
71
70
7271
7372
7473
......
151150
152151
153152
154
155153
156154
157155
......
305303
306304
307305
308
309
310
311
306
307
308
309
312310
313
314
315
316
311
312
313
314
317315
318
319
320
321
322
323
324
325
326
327
328
329
316
317
318
319
320
321
322
323
324
325
326
327
330328
331
332
333
334
335
329
330
331
332
333
336334
337
338
339
340
341
342
335
336
337
338
339
340
343341
344342
345343
......
360358
361359
362360
363
364361
365
366362
367363
368364
......
377373
378374
379375
380
376
381377
382378
383379
......
387383
388384
389385
390
391386
392
393387
394388
395389
......
404398
405399
406400
407
408
401
409402
410403
411
412
413
414
415
416
404
405
406
407
408
409
417410
418411
419412
......
433426
434427
435428
436
437429
438
439430
440431
441432
......
450441
451442
452443
453
444
454445
455446
456447
......
460451
461452
462453
463
464454
465
466455
467456
468457
......
477466
478467
479468
480
481
469
470
482471
483472
484473
485474
486475
487476
488
489
490
491
477
478
479
480
492481
493
494
495
496
497
498
499
500
482
483
484
485
486
487
488
489
501490
502491
503
504
505
506
492
493
494
495
507496
508
509
510
511
497
498
499
500
512501
513
514
515
516
517
502
503
504
505
506
518507
519
520
521
522
508
509
510
511
523512
524
525
526
527
528
529
530
531
513
514
515
516
517
518
519
520
532521
533
534
535
536
537
538
539
540
541
522
523
524
525
526
527
528
529
530
542531
543532
544533
......
678667
679668
680669
681
670
682671
683672
684673
......
724713
725714
726715
727
728716
729
730717
731718
732719
......
10341021
10351022
10361023
1037
1024
10381025
10391026
10401027
......
11241111
11251112
11261113
1127
11281114
11291115
11301116
return "";
}
struct Module {
struct Module {
struct Module *nextModule;
long willLoad;
TagPtr dict;
return 0;
}
// XMLGetTag(int index)
// XMLTagCount( TagPtr dict )
{
long length, pos;
char * tagName;
length = GetNextTag(buffer, &tagName, 0);
if (length == -1) return -1;
length = GetNextTag(buffer, &tagName, 0);
if (length == -1) return -1;
pos = length;
if (!strncmp(tagName, kXMLTagPList, 6))
{
length = 0;
}
if (!strncmp(tagName, kXMLTagPList, 6))
{
length = 0;
}
/***** dict ****/
else if (!strcmp(tagName, kXMLTagDict))
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0);
}
else if (!strncmp(tagName, kXMLTagDict, strlen(kXMLTagDict)) && tagName[strlen(tagName)-1] == '/')
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1);
}
else if (!strncmp(tagName, kXMLTagDict " ", strlen(kXMLTagDict " ")))
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0);
}
else if (!strcmp(tagName, kXMLTagDict))
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0);
}
else if (!strncmp(tagName, kXMLTagDict, strlen(kXMLTagDict)) && tagName[strlen(tagName)-1] == '/')
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1);
}
else if (!strncmp(tagName, kXMLTagDict " ", strlen(kXMLTagDict " ")))
{
length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0);
}
/***** key ****/
else if (!strcmp(tagName, kXMLTagKey))
{
length = ParseTagKey(buffer + pos, tag);
}
else if (!strcmp(tagName, kXMLTagKey))
{
length = ParseTagKey(buffer + pos, tag);
}
/***** string ****/
else if (!strcmp(tagName, kXMLTagString))
{
length = ParseTagString(buffer + pos, tag);
}
else if (!strncmp(tagName, kXMLTagString " ", strlen(kXMLTagString " ")))
{
else if (!strcmp(tagName, kXMLTagString))
{
length = ParseTagString(buffer + pos, tag);
}
else if (!strncmp(tagName, kXMLTagString " ", strlen(kXMLTagString " ")))
{
// TODO: save tag if if found
if(!strncmp(tagName + strlen(kXMLTagString " "), kXMLStringID, strlen(kXMLStringID)))
{
printf("ParseStringID error (0x%x)\n", *val);
getc();
return -1;
}
}
length = ParseTagString(buffer + pos, tag);
tagName[cnt] = 0;
char* val = tagName + strlen(kXMLTagString " " kXMLStringIDRef "\"");
while(*val)
{
{
if ((*val >= '0' && *val <= '9'))// 0 - 9
{
id = (id * 10) + (*val++ - '0');
printf("ParseStringIDREF error (0x%x)\n", *val);
getc();
return -1;
}
}
char* str = GetRefString(id);
length = 0;
//printf("Located IDREF, id = %d, string = %s\n", id, str);
}
}
}
/***** integer ****/
else if (!strcmp(tagName, kXMLTagInteger))
{
length = ParseTagInteger(buffer + pos, tag);
}
else if (!strncmp(tagName, kXMLTagInteger " ", strlen(kXMLTagInteger " ")))
{
else if (!strcmp(tagName, kXMLTagInteger))
{
length = ParseTagInteger(buffer + pos, tag);
}
else if (!strncmp(tagName, kXMLTagInteger " ", strlen(kXMLTagInteger " ")))
{
if(!strncmp(tagName + strlen(kXMLTagInteger " "), kXMLStringID, strlen(kXMLStringID)))
{
// ID=
printf("ParseIntegerID error (0x%x)\n", *val);
getc();
return -1;
}
}
length = ParseTagInteger(buffer + pos, tag);
tagName[cnt] = 0;
char* val = tagName + strlen(kXMLTagInteger " " kXMLStringIDRef "\"");
while(*val)
{
{
if ((*val >= '0' && *val <= '9'))// 0 - 9
{
id = (id * 10) + (*val++ - '0');
printf("ParseStringIDREF error (0x%x)\n", *val);
getc();
return -1;
}
}
int integer = (int)GetRefString(id);
length = 0;
//printf("Located IDREF, id = %d, string = %s\n", id, str);
}
else
}
else
{
length = ParseTagInteger(buffer + pos, tag);
}
}
/***** data ****/
else if (!strcmp(tagName, kXMLTagData))
{
length = ParseTagData(buffer + pos, tag);
}
else if (!strcmp(tagName, kXMLTagData))
{
length = ParseTagData(buffer + pos, tag);
}
else if (!strncmp(tagName, kXMLTagData " ", strlen(kXMLTagData " ")))
{
length = ParseTagData(buffer + pos, tag);
}
else if (!strcmp(tagName, kXMLTagDate))
{
length = ParseTagDate(buffer + pos, tag);
}
{
length = ParseTagData(buffer + pos, tag);
}
else if (!strcmp(tagName, kXMLTagDate))
{
length = ParseTagDate(buffer + pos, tag);
}
/***** date ****/
else if (!strncmp(tagName, kXMLTagDate " ", strlen(kXMLTagDate " ")))
{
length = ParseTagDate(buffer + pos, tag);
}
{
length = ParseTagDate(buffer + pos, tag);
}
/***** false ****/
else if (!strcmp(tagName, kXMLTagFalse))
{
length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse);
}
else if (!strcmp(tagName, kXMLTagFalse))
{
length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse);
}
/***** true ****/
else if (!strcmp(tagName, kXMLTagTrue))
{
length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue);
}
else if (!strcmp(tagName, kXMLTagTrue))
{
length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue);
}
/***** array ****/
else if (!strcmp(tagName, kXMLTagArray))
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0);
}
else if (!strcmp(tagName, kXMLTagArray))
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0);
}
else if (!strncmp(tagName, kXMLTagArray " ", strlen(kXMLTagArray " ")))
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0);
}
else if (!strcmp(tagName, kXMLTagArray "/"))
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1);
}
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0);
}
else if (!strcmp(tagName, kXMLTagArray "/"))
{
length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1);
}
/***** unknown ****/
else
{
*tag = 0;
length = 0;
}
if (length == -1) return -1;
return pos + length;
else
{
*tag = 0;
length = 0;
}
if (length == -1) return -1;
return pos + length;
}
//==========================================================================
char* val = buffer;
int size;
if(buffer[0] == '<')
if(buffer[0] == '<')
{
printf("Warning integer is non existant\n");
getc();
printf("ParseTagInteger hex error (0x%x) in buffer %s\n", *val, buffer);
getc();
return -1;
}
}
}
else if ( size )// Decimal value
#if DOFREE
static void
FreeSymbol( char * string )
{
{
SymbolPtr symbol, prev;
prev = 0;
}
}
bool XMLCastBoolean(TagPtr dict)
{
if(!dict) return false;
branches/iFabio/Chameleon/i386/libsaio/console.c
5252
5353
5454
55
56
57
58
59
60
61
62
55
56
57
58
59
60
61
62
6363
6464
6565
......
7171
7272
7373
74
74
75
7576
76
77
7778
7879
7980
80
81
8182
82
83
84
8385
8486
8587
......
122124
123125
124126
125
127
126128
127129
128130
129
130
131
132
131133
132134
133135
134136
135
137
136138
137139
138
140
141
142
139143
140144
141145
......
172176
173177
174178
175
179
176180
177181
178182
......
204208
205209
206210
207
211
208212
209213
210214
bool gVerboseMode;
bool gErrors;
/* Kabyl: BooterLog */
//Azi: Doubled log available size.
// 64kb are not enough to hold the full log while booting with -f argument (ignore caches).
// It also seems to fix some reported problems while booting with the mentioned argument.
// Note: 96kb are enough to hold full log, booting with -f; even so, this depends on how much
// we "play" at the boot prompt, with what patches we're playing and how much they print to the log,
// kexts loaded, etc...
// Please remove this comment when this gets checked by a "true" dev.
/** Kabyl: BooterLog
Azi: Doubled available log size; this seems to fix some hangs and instant reboots caused by
booting with -f (ignore caches). 96kb are enough to hold full log, booting with -f; even so,
this depends on how much we "play" at the boot prompt and with what patches we're playing,
depending on how much they print to the log.
**/ //Azi: closing **/ alows colapse/expand... is this desirable?? colapsing an entire page
// will also colapse comments....
#define BOOTER_LOG_SIZE(128 * 1024)
#define SAFE_LOG_SIZE134
char * last_str;
};
static void sputc(int c, struct putc_info * pi)
static int
sputc(int c, struct putc_info * pi) //Azi: exists on printf.c & gui.c
{
if (pi->last_str)
if (pi->last_str)
if (pi->str == pi->last_str)
{
*(pi->str) = '\0';
return;
return 0;
}
*(pi->str)++ = c;
*(pi->str)++ = c;
return c;
}
void initBooterLog(void)
/*
* write one character to console
*/
void putchar(int c)
int putchar(int c)
{
if ( c == '\t' )
{
for (c = 0; c < 8; c++) putc(' ');
return;
for (c = 0; c < 8; c++) bios_putchar(' ');
return c;
}
if ( c == '\n' )
{
putc('\r');
bios_putchar('\r');
}
putc(c);
bios_putchar(c);
return c;
}
int getc()
vprf(fmt, ap);
{
/* Kabyl: BooterLog */
// Kabyl: BooterLog
struct putc_info pi;
if (!msgbuf)
}
{
/* Kabyl: BooterLog */
// Kabyl: BooterLog
struct putc_info pi;
if (!msgbuf)
branches/iFabio/Chameleon/i386/libsaio/bootstruct.c
4343
4444
4545
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104104
105105
106106
......
109109
110110
111111
112
113
112
113
114
114115
115116
116117
......
125126
126127
127128
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
150151
151152
152153
......
160161
161162
162163
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
187188
188189
189190
......
194195
195196
196197
197
198
198199
199200
200201
......
209210
210211
211212
212
213213
void initKernBootStruct( void )
{
Node *node;
int nameLen;
static int init_done = 0;
if ( !init_done )
{
bootArgs = (boot_args *)malloc(sizeof(boot_args));
bootArgsPreLion = (boot_args_pre_lion *)malloc(sizeof(boot_args_pre_lion));
bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t));
if (bootArgs == 0 || bootInfo == 0)
stop("Couldn't allocate boot info\n");
bzero(bootArgs, sizeof(boot_args));
bzero(bootArgsPreLion, sizeof(boot_args_pre_lion));
bzero(bootInfo, sizeof(PrivateBootInfo_t));
// Get system memory map. Also update the size of the
// conventional/extended memory for backwards compatibility.
bootInfo->memoryMapCount =
getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax,
(unsigned long *) &bootInfo->convmem,
(unsigned long *) &bootInfo->extmem );
if ( bootInfo->memoryMapCount == 0 )
{
// BIOS did not provide a memory map, systems with
// discontiguous memory or unusual memory hole locations
// may have problems.
bootInfo->convmem = getConventionalMemorySize();
bootInfo->extmem = getExtendedMemorySize();
}
bootInfo->configEnd = bootInfo->config;
bootArgs->Video.v_display = VGA_TEXT_MODE;
DT__Initialize();
node = DT__FindNode("/", true);
if (node == 0) {
stop("Couldn't create root node");
}
getPlatformName(platformName);
nameLen = strlen(platformName) + 1;
DT__AddProperty(node, "compatible", nameLen, platformName);
DT__AddProperty(node, "model", nameLen, platformName);
gMemoryMapNode = DT__FindNode("/chosen/memory-map", true);
bootArgs->Version = kBootArgsVersion;
bootArgs->Revision = kBootArgsRevision;
bootArgsPreLion->Version = kBootArgsPreLionVersion;
bootArgsPreLion->Revision = kBootArgsPreLionRevision;
init_done = 1;
}
Node *node;
int nameLen;
static int init_done = 0;
if ( !init_done )
{
bootArgs = (boot_args *)malloc(sizeof(boot_args));
bootArgsPreLion = (boot_args_pre_lion *)malloc(sizeof(boot_args_pre_lion));
bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t));
if (bootArgs == 0 || bootInfo == 0)
stop("Couldn't allocate boot info\n");
bzero(bootArgs, sizeof(boot_args));
bzero(bootArgsPreLion, sizeof(boot_args_pre_lion));
bzero(bootInfo, sizeof(PrivateBootInfo_t));
// Get system memory map. Also update the size of the
// conventional/extended memory for backwards compatibility.
bootInfo->memoryMapCount =
getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax,
(unsigned long *) &bootInfo->convmem,
(unsigned long *) &bootInfo->extmem );
if ( bootInfo->memoryMapCount == 0 )
{
// BIOS did not provide a memory map, systems with
// discontiguous memory or unusual memory hole locations
// may have problems.
bootInfo->convmem = getConventionalMemorySize();
bootInfo->extmem = getExtendedMemorySize();
}
bootInfo->configEnd = bootInfo->config;
bootArgs->Video.v_display = VGA_TEXT_MODE;
DT__Initialize();
node = DT__FindNode("/", true);
if (node == 0) {
stop("Couldn't create root node");
}
getPlatformName(platformName);
nameLen = strlen(platformName) + 1;
DT__AddProperty(node, "compatible", nameLen, platformName);
DT__AddProperty(node, "model", nameLen, platformName);
gMemoryMapNode = DT__FindNode("/chosen/memory-map", true);
bootArgs->Version = kBootArgsVersion;
bootArgs->Revision = kBootArgsRevision;
bootArgsPreLion->Version = kBootArgsPreLionVersion;
bootArgsPreLion->Revision = kBootArgsPreLionRevision;
init_done = 1;
}
}
void
reserveKernBootStruct(void)
{
if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') && (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7'))
{
if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0')
&& (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7'))
{
void *oldAddr = bootArgs;
bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args));
bcopy(oldAddr, bootArgs, sizeof(boot_args));
void
finalizeBootStruct(void)
{
uint32_t size;
void *addr;
int i;
EfiMemoryRange *memoryMap;
MemoryRange *range;
int memoryMapCount = bootInfo->memoryMapCount;
if (memoryMapCount == 0) {
// XXX could make a two-part map here
stop("Unable to convert memory map into proper format\n");
}
// convert memory map to boot_args memory map
memoryMap = (EfiMemoryRange *)AllocateKernelMemory(sizeof(EfiMemoryRange) * memoryMapCount);
bootArgs->MemoryMap = (uint32_t)memoryMap;
bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount;
bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange);
bootArgs->MemoryMapDescriptorVersion = 0;
for (i=0; i<memoryMapCount; i++, memoryMap++) {
range = &bootInfo->memoryMap[i];
switch(range->type) {
uint32_t size;
void *addr;
int i;
EfiMemoryRange *memoryMap;
MemoryRange *range;
int memoryMapCount = bootInfo->memoryMapCount;
if (memoryMapCount == 0) {
// XXX could make a two-part map here
stop("Unable to convert memory map into proper format\n");
}
// convert memory map to boot_args memory map
memoryMap = (EfiMemoryRange *)AllocateKernelMemory(sizeof(EfiMemoryRange) * memoryMapCount);
bootArgs->MemoryMap = (uint32_t)memoryMap;
bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount;
bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange);
bootArgs->MemoryMapDescriptorVersion = 0;
for (i=0; i<memoryMapCount; i++, memoryMap++) {
range = &bootInfo->memoryMap[i];
switch(range->type) {
case kMemoryRangeACPI:
memoryMap->Type = kEfiACPIReclaimMemory;
break;
default:
memoryMap->Type = kEfiReservedMemoryType;
break;
}
memoryMap->PhysicalStart = range->base;
memoryMap->VirtualStart = range->base;
memoryMap->NumberOfPages = range->length >> I386_PGSHIFT;
memoryMap->Attribute = 0;
}
// copy bootFile into device tree
// XXX
// add PCI info somehow into device tree
// XXX
// Flatten device tree
DT__FlattenDeviceTree(0, &size);
addr = (void *)AllocateKernelMemory(size);
if (addr == 0) {
stop("Couldn't allocate device tree\n");
}
DT__FlattenDeviceTree((void **)&addr, &size);
bootArgs->deviceTreeP = (uint32_t)addr;
bootArgs->deviceTreeLength = size;
}
memoryMap->PhysicalStart = range->base;
memoryMap->VirtualStart = range->base;
memoryMap->NumberOfPages = range->length >> I386_PGSHIFT;
memoryMap->Attribute = 0;
}
// copy bootFile into device tree
// XXX
// add PCI info somehow into device tree
// XXX
// Flatten device tree
DT__FlattenDeviceTree(0, &size);
addr = (void *)AllocateKernelMemory(size);
if (addr == 0) {
stop("Couldn't allocate device tree\n");
}
DT__FlattenDeviceTree((void **)&addr, &size);
bootArgs->deviceTreeP = (uint32_t)addr;
bootArgs->deviceTreeLength = size;
// Copy BootArgs values to older structure
memcpy(&bootArgsPreLion->CommandLine, &bootArgs->CommandLine, BOOT_LINE_LENGTH);
bootArgsPreLion->MemoryMapDescriptorSize = bootArgs->MemoryMapDescriptorSize;
bootArgsPreLion->MemoryMapDescriptorVersion = bootArgs->MemoryMapDescriptorVersion;
bootArgsPreLion->deviceTreeP = bootArgs->deviceTreeP;
bootArgsPreLion->deviceTreeP = bootArgs->deviceTreeP;
bootArgsPreLion->deviceTreeLength = bootArgs->deviceTreeLength;
bootArgsPreLion->kaddr = bootArgs->kaddr;
bootArgsPreLion->performanceDataStart = bootArgs->performanceDataStart;
bootArgsPreLion->performanceDataSize = bootArgs->performanceDataSize;
bootArgsPreLion->efiRuntimeServicesVirtualPageStart = bootArgs->efiRuntimeServicesVirtualPageStart;
}
branches/iFabio/Chameleon/i386/libsaio/Makefile
2323
2424
2525
26
26
2727
2828
2929
......
5757
5858
5959
60
6160
61
6262
6363
-fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h
CPPFLAGS := $(CPPFLAGS) -nostdinc++
INC = -I. -I$(SYMROOT) -I$(LIBSADIR) -I$(BOOT2DIR) -I${SRCROOT}/i386/include
@ar q $@ $^ &> /dev/null
@echo "\t[RANLIB] $(@F)"
@ranlib $(SYMROOT)/$(@F)
# dependencies
-include $(OBJROOT)/Makedep
branches/iFabio/Chameleon/i386/libsaio/usb.c
3838
3939
4040
41
4241
4342
4443
// Add usb device to the list
void notify_usb_dev(pci_dt_t *pci_dev)
{
struct pciList* current = usbList;
if(!usbList)
{
branches/iFabio/Chameleon/i386/libsaio/nvidia.c
10761076
10771077
10781078
1079
10801079
10811080
10821081
default_NVCAP[16], default_NVCAP[17], default_NVCAP[18], default_NVCAP[19]);
#endif
devprop_add_nvidia_template(device);
devprop_add_value(device, "NVCAP", default_NVCAP, NVCAP_LEN);
devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4);
branches/iFabio/Chameleon/i386/libsaio/ati.c
296296
297297
298298
299
299300
300301
301302
......
501502
502503
503504
504
505505
506506
507507
......
11171117
11181118
11191119
1120
1120
11211121
11221122
11231123
{ 0x94C3,0x22471787,CHIP_FAMILY_RV610,"ATI Radeon HD 2400 LE",kNull},
{ 0x94C3,0x01011A93,CHIP_FAMILY_RV610,"Qimonda Radeon HD 2400 PRO",kNull},
{ 0x9501,0x30001002,CHIP_FAMILY_RV670,"ATI Radeon HD 3690",kNull},
{ 0x9501,0x25421002,CHIP_FAMILY_RV670,"ATI Radeon HD 3870",kNull},
{ 0x9501,0x4750174B,CHIP_FAMILY_RV670,"ATI Radeon HD 4750",kNull},
{ 0x6898,0x00000000,CHIP_FAMILY_CYPRESS,"ATI Radeon HD 5800 Series",kUakari},
{ 0x6899,0x00000000,CHIP_FAMILY_CYPRESS,"ATI Radeon HD 5800 Series",kUakari},
{ 0x689E,0x00000000,CHIP_FAMILY_CYPRESS,"ATI Radeon HD 5800 Series",kUakari},
{ 0x689C,0x00000000,CHIP_FAMILY_HEMLOCK,"ATI Radeon HD 5900 Series",kUakari},
{ 0x68B9,0x00000000,CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5600 Series",kVervet},
if (radeon_cards[i].device_id == pci_dev->device_id)
{
card->info = &radeon_cards[i];
if ((radeon_cards[i].subsys_id == 0x00000000) ||
if ((radeon_cards[i].subsys_id == 0x00000000) ||
(radeon_cards[i].subsys_id == pci_dev->subsys_id.subsys_id))
break;
}
branches/iFabio/Chameleon/i386/libsaio/cpu.c
254254
255255
256256
257
258257
259258
260259
if (bus_ratio_max) {
fsbFrequency = (tscFrequency / bus_ratio_max);
}
//valv: Turbo Ratio Limit
if ((intelCPU != 0x2e) && (intelCPU != 0x2f)) {
msr = rdmsr64(MSR_TURBO_RATIO_LIMIT);
branches/iFabio/Chameleon/i386/libsaio/platform.h
9090
9191
9292
93
94
93
94
9595
9696
9797
98
98
9999
100100
101
101
102102
103103
104104
#define UUID_LEN16
typedef struct _RamSlotInfo_t {
uint32_tModuleSize;// Size of Module in MB
uint32_tFrequency; // in Mhz
uint32_tModuleSize;// Size of Module in MB
uint32_tFrequency;// in Mhz
const char*Vendor;
const char*PartNo;
const char*SerialNo;
char*spd;// SPD Dump
char*spd;// SPD Dump
boolInUse;
uint8_tType;
uint8_tBankConnections; // table type 6, see (3.3.7)
uint8_tBankConnections;// table type 6, see (3.3.7)
uint8_tBankConnCnt;
} RamSlotInfo_t;
branches/iFabio/Chameleon/i386/libsaio/smbios.c
607607
608608
609609
610
611
610612
611613
612614
for (i = 0; i < numOfSetters; i++)
if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structPtr->orig->length))
{
if (SMBSetters[i].fieldOffset > structPtr->orig->length)
continue;
setterFound = true;
setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset));
}
branches/iFabio/Chameleon/i386/libsaio/biosfn.c
446446
447447
448448
449
449
450450
451451
452452
......
470470
471471
472472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501501
502
503
504
505
506
507
508
509
510
502
503
504
505
506
507
508
509
510
511511
512
513
514
515
516
517
518
512
513
514
515
516
517
518
519
519520
520
521
522
521
523522
524523
525524
......
528527
529528
530529
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
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
567565
568566
569567
570568
571569
572570
573
574
575
571
572
573
576574
577
578
579
580
581
582
583
584
585
586
587
575
576
577
578
579
580
581
582
583
584
585
588586
587
588
589
590
591
592
589593
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
594
595
596
597
598
599
600
601
602
603
631604
632
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
633635
634636
635637
636638
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
661663
662
663664
664
665
666
667
668
669
670
665
666
667
668
669
670
671
671672
672
673
674
675
673
674
675
676
676677
677678
678
679
680
681
679
680
681
682
682683
683684
684685
return bb.eax.r.h;
}
void putc(int ch)
void bios_putchar(int ch)
{
bb.intno = 0x10;
bb.ebx.r.h = 0x00; /* background black */
/* Check to see if the passed-in drive is in El Torito no-emulation mode. */
int is_no_emulation(int drive)
{
struct packet {
unsigned char packet_size;
unsigned char media_type;
unsigned char drive_num;
unsigned char ctrlr_index;
unsigned long lba;
unsigned short device_spec;
unsigned short buffer_segment;
unsigned short load_segment;
unsigned short sector_count;
unsigned char cyl_count;
unsigned char sec_count;
unsigned char head_count;
unsigned char reseved;
} __attribute__((packed));
static struct packet pkt;
bzero(&pkt, sizeof(pkt));
pkt.packet_size = 0x13;
bb.intno = 0x13;
bb.eax.r.h = 0x4b;
bb.eax.r.l = 0x01; // subfunc: get info
bb.edx.r.l = drive;
bb.esi.rr = NORMALIZED_OFFSET((unsigned)&pkt);
bb.ds = NORMALIZED_SEGMENT((unsigned)&pkt);
bios(&bb);
struct packet {
unsigned char packet_size;
unsigned char media_type;
unsigned char drive_num;
unsigned char ctrlr_index;
unsigned long lba;
unsigned short device_spec;
unsigned short buffer_segment;
unsigned short load_segment;
unsigned short sector_count;
unsigned char cyl_count;
unsigned char sec_count;
unsigned char head_count;
unsigned char reseved;
} __attribute__((packed));
static struct packet pkt;
bzero(&pkt, sizeof(pkt));
pkt.packet_size = 0x13;
bb.intno= 0x13;
bb.eax.r.h= 0x4b;
bb.eax.r.l= 0x01; // subfunc: get info
bb.edx.r.l= drive;
bb.esi.rr= NORMALIZED_OFFSET((unsigned)&pkt);
bb.ds= NORMALIZED_SEGMENT((unsigned)&pkt);
bios(&bb);
#if DEBUG
printf("el_torito info drive %x\n", drive);
printf("--> cf %x, eax %x\n", bb.flags.cf, bb.eax.rr);
printf("pkt_size: %x\n", pkt.packet_size);
printf("media_type: %x\n", pkt.media_type);
printf("drive_num: %x\n", pkt.drive_num);
printf("device_spec: %x\n", pkt.device_spec);
printf("press a key->\n");getc();
printf("el_torito info drive %x\n", drive);
printf("--> cf %x, eax %x\n", bb.flags.cf, bb.eax.rr);
printf("pkt_size: %x\n", pkt.packet_size);
printf("media_type: %x\n", pkt.media_type);
printf("drive_num: %x\n", pkt.drive_num);
printf("device_spec: %x\n", pkt.device_spec);
printf("press a key->\n");getc();
#endif
/* Some BIOSes erroneously return cf = 1 */
/* Just check to see if the drive number is the same. */
if (pkt.drive_num == drive) {
if ((pkt.media_type & 0x0F) == 0) {
/* We are in no-emulation mode. */
return 1;
/* Some BIOSes erroneously return cf = 1 */
/* Just check to see if the drive number is the same. */
if (pkt.drive_num == drive) {
if ((pkt.media_type & 0x0F) == 0) {
/* We are in no-emulation mode. */
return 1;
}
}
}
return 0;
return 0;
}
#if DEBUG
*/
void print_drive_info(boot_drive_info_t *dp)
{
// printf("buf_size = %x\n", dp->params.buf_size);
printf("info_flags = %x\n", dp->params.info_flags);
printf(" phys_cyls = %lx\n", dp->params. phys_cyls);
printf(" phys_heads = %lx\n", dp->params. phys_heads);
printf(" phys_spt = %lx\n", dp->params. phys_spt);
printf("phys_sectors = %lx%lx\n", ((unsigned long *)(&dp->params.phys_sectors))[1],
((unsigned long *)(&dp->params.phys_sectors))[0]);
printf("phys_nbps = %x\n", dp->params.phys_nbps);
// printf("dpte_offset = %x\n", dp->params.dpte_offset);
// printf("dpte_segment = %x\n", dp->params.dpte_segment);
// printf("key = %x\n", dp->params.key);
// printf("path_len = %x\n", dp->params. path_len);
// printf("reserved1 = %x\n", dp->params. reserved1);
// printf("reserved2 = %x\n", dp->params.reserved2);
//printf("bus_type[4] = %x\n", dp->params. bus_type[4]);
//printf("interface_type[8] = %x\n", dp->params. interface_type[8]);
//printf("interface_path[8] = %x\n", dp->params. interface_path[8]);
//printf("dev_path[8] = %x\n", dp->params. dev_path[8]);
// printf("reserved3 = %x\n", dp->params. reserved3);
// printf("checksum = %x\n", dp->params. checksum);
printf(" io_port_base = %x\n", dp->dpte.io_port_base);
printf(" control_port_base = %x\n", dp->dpte.control_port_base);
printf(" head_flags = %x\n", dp->dpte. head_flags);
printf(" vendor_info = %x\n", dp->dpte. vendor_info);
printf(" irq = %x\n", dp->dpte. irq);
// printf(" irq_unused = %x\n", dp->dpte. irq_unused);
printf(" block_count = %x\n", dp->dpte. block_count);
printf(" dma_channe = %x\n", dp->dpte. dma_channel);
printf(" dma_type = %x\n", dp->dpte. dma_type);
printf(" pio_type = %x\n", dp->dpte. pio_type);
printf(" pio_unused = %x\n", dp->dpte. pio_unused);
printf(" option_flags = %x\n", dp->dpte.option_flags);
// printf(" reserved = %x\n", dp->dpte.reserved);
printf(" revision = %x\n", dp->dpte. revision);
// printf(" checksum = %x\n", dp->dpte. checksum);
//printf("buf_size = %x\n", dp->params.buf_size);
printf("info_flags = %x\n", dp->params.info_flags);
printf("phys_cyls = %lx\n", dp->params. phys_cyls);
printf("phys_heads = %lx\n", dp->params. phys_heads);
printf("phys_spt = %lx\n", dp->params. phys_spt);
printf("phys_sectors = %lx%lx\n", ((unsigned long *)(&dp->params.phys_sectors))[1],
((unsigned long *)(&dp->params.phys_sectors))[0]);
printf("phys_nbps = %x\n", dp->params.phys_nbps);
//printf("dpte_offset = %x\n", dp->params.dpte_offset);
//printf("dpte_segment = %x\n", dp->params.dpte_segment);
//printf("key = %x\n", dp->params.key);
//printf("path_len = %x\n", dp->params. path_len);
//printf("reserved1 = %x\n", dp->params. reserved1);
//printf("reserved2 = %x\n", dp->params.reserved2);
//printf("bus_type[4] = %x\n", dp->params. bus_type[4]);
//printf("interface_type[8] = %x\n", dp->params. interface_type[8]);
//printf("interface_path[8] = %x\n", dp->params. interface_path[8]);
//printf("dev_path[8] = %x\n", dp->params. dev_path[8]);
//printf("reserved3 = %x\n", dp->params. reserved3);
//printf("checksum = %x\n", dp->params. checksum);
printf("io_port_base = %x\n", dp->dpte.io_port_base);
printf("control_port_base = %x\n", dp->dpte.control_port_base);
printf("head_flags = %x\n", dp->dpte. head_flags);
printf("vendor_info = %x\n", dp->dpte. vendor_info);
printf("irq = %x\n", dp->dpte. irq);
//printf("irq_unused = %x\n", dp->dpte. irq_unused);
printf("block_count = %x\n", dp->dpte. block_count);
printf("dma_channe = %x\n", dp->dpte. dma_channel);
printf("dma_type = %x\n", dp->dpte. dma_type);
printf("pio_type = %x\n", dp->dpte. pio_type);
printf("pio_unused = %x\n", dp->dpte. pio_unused);
printf("option_flags = %x\n", dp->dpte.option_flags);
//printf("reserved = %x\n", dp->dpte.reserved);
printf("revision = %x\n", dp->dpte. revision);
//printf("checksum = %x\n", dp->dpte. checksum);
}
#endif
int get_drive_info(int drive, struct driveInfo *dp)
{
boot_drive_info_t *di = &dp->di;
int ret = 0;
boot_drive_info_t *di = &dp->di;
int ret = 0;
#if UNUSED
if (maxhd == 0) {
bb.intno = 0x13;
bb.eax.r.h = 0x08;
bb.edx.r.l = 0x80;
bios(&bb);
if (bb.flags.cf == 0)
maxhd = 0x7f + bb.edx.r.l;
};
if (drive > maxhd)
return 0;
if (maxhd == 0) {
bb.intno = 0x13;
bb.eax.r.h = 0x08;
bb.edx.r.l = 0x80;
bios(&bb);
if (bb.flags.cf == 0)
maxhd = 0x7f + bb.edx.r.l;
};
if (drive > maxhd)
return 0;
#endif
bzero(dp, sizeof(struct driveInfo));
dp->biosdev = drive;
/* Check for El Torito no-emulation mode. */
dp->no_emulation = is_no_emulation(drive);
bzero(dp, sizeof(struct driveInfo));
dp->biosdev = drive;
/* Check for El Torito no-emulation mode. */
dp->no_emulation = is_no_emulation(drive);
/* Check drive for EBIOS support. */
bb.intno = 0x13;
bb.eax.r.h = 0x41;
bb.edx.r.l = drive;
bb.ebx.rr = 0x55aa;
bios(&bb);
if((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) {
/* Get flags for supported operations. */
dp->uses_ebios = bb.ecx.r.l;
}
if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) {
/* Get EBIOS drive info. */
static struct drive_params params;
params.buf_size = sizeof(params);
bb.intno = 0x13;
bb.eax.r.h = 0x48;
bb.edx.r.l = drive;
bb.esi.rr = NORMALIZED_OFFSET((unsigned)&params);
bb.ds = NORMALIZED_SEGMENT((unsigned)&params);
bios(&bb);
if(bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) {
dp->uses_ebios = 0;
di->params.buf_size = 1;
} else {
bcopy(&params, &di->params, sizeof(params));
if (drive >= BASE_HD_DRIVE &&
(dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) &&
di->params.buf_size >= 30 &&
!(di->params.dpte_offset == 0xFFFF && di->params.dpte_segment == 0xFFFF)) {
void *ptr = (void *)(di->params.dpte_offset + ((unsigned int)di->params.dpte_segment << 4));
bcopy(ptr, &di->dpte, sizeof(di->dpte));
}
/* Check drive for EBIOS support. */
bb.intno = 0x13;
bb.eax.r.h = 0x41;
bb.edx.r.l = drive;
bb.ebx.rr = 0x55aa;
bios(&bb);
if ((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) {
/* Get flags for supported operations. */
dp->uses_ebios = bb.ecx.r.l;
}
}
if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) {
/* Get EBIOS drive info. */
static struct drive_params params;
params.buf_size = sizeof(params);
bb.intno = 0x13;
bb.eax.r.h = 0x48;
bb.edx.r.l = drive;
bb.esi.rr = NORMALIZED_OFFSET((unsigned)&params);
bb.ds = NORMALIZED_SEGMENT((unsigned)&params);
bios(&bb);
if (bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) {
dp->uses_ebios = 0;
di->params.buf_size = 1;
}
else
{
bcopy(&params, &di->params, sizeof(params));
if (drive >= BASE_HD_DRIVE &&
(dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) &&
di->params.buf_size >= 30 &&
!(di->params.dpte_offset == 0xFFFF && di->params.dpte_segment == 0xFFFF)) {
void *ptr = (void *)(di->params.dpte_offset + ((unsigned int)di->params.dpte_segment << 4));
bcopy(ptr, &di->dpte, sizeof(di->dpte));
}
}
}
/*
* zef: This code will fail on recent JMicron and Intel option ROMs
*/
// if (di->params.phys_heads == 0 || di->params.phys_spt == 0) {
///* Either it's not EBIOS, or EBIOS didn't tell us. */
//bb.intno = 0x13;
//bb.eax.r.h = 0x08;
//bb.edx.r.l = drive;
//bios(&bb);
//if (bb.flags.cf == 0 && bb.eax.r.h == 0) {
// unsigned long cyl;
// unsigned long sec;
// unsigned long hds;
//
// hds = bb.edx.r.h;
// sec = bb.ecx.r.l & 0x3F;
// if((dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && (sec != 0)) {
//cyl = (di->params.phys_sectors / ((hds + 1) * sec)) - 1;
// }
// else {
//cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2);
// }
// di->params.phys_heads = hds;
// di->params.phys_spt = sec;
// di->params.phys_cyls = cyl;
//} else {
// ret = -1;
//if (di->params.phys_heads == 0 || di->params.phys_spt == 0) {
///* Either it's not EBIOS, or EBIOS didn't tell us. */
//bb.intno = 0x13;
//bb.eax.r.h = 0x08;
//bb.edx.r.l = drive;
//bios(&bb);
//if (bb.flags.cf == 0 && bb.eax.r.h == 0) {
//unsigned long cyl;
//unsigned long sec;
//unsigned long hds;
//
//hds = bb.edx.r.h;
//sec = bb.ecx.r.l & 0x3F;
//if ((dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && (sec != 0)) {
//cyl = (di->params.phys_sectors / ((hds + 1) * sec)) - 1;
//} else {
//cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2);
//}
//di->params.phys_heads = hds;
//di->params.phys_spt = sec;
//di->params.phys_cyls = cyl;
//} else {
//ret = -1;
//}
//}
// }
if (dp->no_emulation) {
/* Some BIOSes give us erroneous EBIOS support information.
* Assume that if you're on a CD, then you can use
* EBIOS disk calls.
*/
dp->uses_ebios |= EBIOS_FIXED_DISK_ACCESS;
}
if (dp->no_emulation) {
/* Some BIOSes give us erroneous EBIOS support information.
* Assume that if you're on a CD, then you can use
* EBIOS disk calls.
*/
dp->uses_ebios |= EBIOS_FIXED_DISK_ACCESS;
}
#if DEBUG
print_drive_info(di);
printf("uses_ebios = 0x%x\n", dp->uses_ebios);
printf("result %d\n", ret);
printf("press a key->\n");getc();
print_drive_info(di);
printf("uses_ebios = 0x%x\n", dp->uses_ebios);
printf("result %d\n", ret);
printf("press a key->\n");getc();
#endif
if (ret == 0) {
dp->valid = 1;
}
return ret;
if (ret == 0) {
dp->valid = 1;
}
return ret;
}
int ebiosEjectMedia(int biosdev)
branches/iFabio/Chameleon/i386/libsaio/pci.h
2323
2424
2525
26
26
2727
28
29
28
29
3030
3131
3232
3333
3434
35
36
35
36
3737
3838
39
39
4040
41
42
43
41
42
43
4444
4545
4646
......
396396
397397
398398
399
399
400400
401401
402402
403
404
405
406
407
408
409
410
411
412
403
404
405
406
407
408
409
410
411
412
413413
414414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437437
438
439
438440
439
440
441
442
443
444
445
446
447
448
449
441
442
443
444
445
446
447
448
449
450
451
450452
451453
452454
......
463465
464466
465467
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
614616
615617
616
617
618
619
620
621
618
619
620
621
622
623
622624
623625
624
625
626
627
626628
627629
628630
......
665667
666668
667669
668
669
670
671
672
673
674
670
671
672
673
674
675
676
675677
676678
677
678
679
680
679681
680682
681683
682684
683685
684686
685
687
686688
687689
688690
......
713715
714716
715717
716
718
717719
718720
719
720
721
722
721723
722
723
724
725
724726
725727
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
750752
751753
752754
......
758760
759761
760762
761
762
763
764
763765
764766
765767
} pci_dev_t;
typedef struct pci_dt_t {
pci_dev_tdev;
pci_dev_tdev;
uint16_tvendor_id;
uint16_tdevice_id;
uint16_tvendor_id;
uint16_tdevice_id;
union {
struct {
uint16_tvendor_id;
uint16_tdevice_id;
}subsys;
uint32_tsubsys_id;
} subsys;
uint32_t subsys_id;
}subsys_id;
uint16_tclass_id;
uint16_tclass_id;
struct pci_dt_t*parent;
struct pci_dt_t*children;
struct pci_dt_t*next;
struct pci_dt_t*parent;
struct pci_dt_t*children;
struct pci_dt_t*next;
} pci_dt_t;
#define PCIADDR(bus, dev, func)(1 << 31) | (bus << 16) | (dev << 11) | (func << 8)
/* Message Signaled Interrupts registers */
#define PCI_MSI_FLAGS2/* Various flags */
#define PCI_MSI_FLAGS_MASK_BIT0x100/* interrupt masking & reporting supported */
#define PCI_MSI_FLAGS_MASK_BIT0x100/* interrupt masking & reporting supported */
#define PCI_MSI_FLAGS_64BIT0x080/* 64-bit addresses allowed */
#define PCI_MSI_FLAGS_QSIZE0x070/* Message queue size configured */
#define PCI_MSI_FLAGS_QMASK0x00e/* Maximum queue size available */
#define PCI_MSI_FLAGS_ENABLE0x001/* MSI feature enabled */
#define PCI_MSI_RFU3/* Rest of capability flags */
#define PCI_MSI_ADDRESS_LO4/* Lower 32 bits */
#define PCI_MSI_ADDRESS_HI8/* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
#define PCI_MSI_DATA_328/* 16 bits of data for 32-bit devices */
#define PCI_MSI_DATA_6412/* 16 bits of data for 64-bit devices */
#define PCI_MSI_MASK_BIT_3212/* per-vector masking for 32-bit devices */
#define PCI_MSI_MASK_BIT_6416/* per-vector masking for 64-bit devices */
#define PCI_MSI_PENDING_3216/* per-vector interrupt pending for 32-bit devices */
#define PCI_MSI_PENDING_6420/* per-vector interrupt pending for 64-bit devices */
#define PCI_MSI_FLAGS_ENABLE0x001/* MSI feature enabled */
#define PCI_MSI_RFU3/* Rest of capability flags */
#define PCI_MSI_ADDRESS_LO4/* Lower 32 bits */
#define PCI_MSI_ADDRESS_HI8/* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
#define PCI_MSI_DATA_328/* 16 bits of data for 32-bit devices */
#define PCI_MSI_DATA_6412/* 16 bits of data for 64-bit devices */
#define PCI_MSI_MASK_BIT_3212/* per-vector masking for 32-bit devices */
#define PCI_MSI_MASK_BIT_6416/* per-vector masking for 64-bit devices */
#define PCI_MSI_PENDING_3216/* per-vector interrupt pending for 32-bit devices */
#define PCI_MSI_PENDING_6420/* per-vector interrupt pending for 64-bit devices */
/* PCI-X */
#define PCI_PCIX_COMMAND 2 /* Command register offset */
#define PCI_PCIX_COMMAND_DPERE 0x0001 /* Data Parity Error Recover Enable */
#define PCI_PCIX_COMMAND_ERO 0x0002 /* Enable Relaxed Ordering */
#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT 0x000c /* Maximum Memory Read Byte Count */
#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS 0x0070
#define PCI_PCIX_COMMAND_RESERVED 0xf80
#define PCI_PCIX_STATUS 4 /* Status register offset */
#define PCI_PCIX_STATUS_FUNCTION 0x00000007
#define PCI_PCIX_STATUS_DEVICE 0x000000f8
#define PCI_PCIX_STATUS_BUS 0x0000ff00
#define PCI_PCIX_STATUS_64BIT 0x00010000
#define PCI_PCIX_STATUS_133MHZ 0x00020000
#define PCI_PCIX_STATUS_SC_DISCARDED 0x00040000 /* Split Completion Discarded */
#define PCI_PCIX_STATUS_UNEXPECTED_SC 0x00080000 /* Unexpected Split Completion */
#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY 0x00100000 /* 0 = simple device, 1 = bridge device */
#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT 0x00600000 /* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */
#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS 0x03800000
#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE 0x1c000000
#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS 0x20000000 /* Received Split Completion Error Message */
#define PCI_PCIX_STATUS_266MHZ0x40000000 /* 266 MHz capable */
#define PCI_PCIX_STATUS_533MHZ 0x80000000 /* 533 MHz capable */
#define PCI_PCIX_SIZEOF4
#define PCI_PCIX_COMMAND2/* Command register offset */
#define PCI_PCIX_COMMAND_DPERE0x0001/* Data Parity Error Recover Enable */
#define PCI_PCIX_COMMAND_ERO0x0002/* Enable Relaxed Ordering */
#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT0x000c/* Maximum Memory Read Byte Count */
#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS0x0070
#define PCI_PCIX_COMMAND_RESERVED0xf80
#define PCI_PCIX_STATUS4/* Status register offset */
#define PCI_PCIX_STATUS_FUNCTION0x00000007
#define PCI_PCIX_STATUS_DEVICE0x000000f8
#define PCI_PCIX_STATUS_BUS0x0000ff00
#define PCI_PCIX_STATUS_64BIT0x00010000
#define PCI_PCIX_STATUS_133MHZ0x00020000
#define PCI_PCIX_STATUS_SC_DISCARDED0x00040000/* Split Completion Discarded */
#define PCI_PCIX_STATUS_UNEXPECTED_SC0x00080000/* Unexpected Split Completion */
#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY0x00100000/* 0 = simple device, 1 = bridge device */
#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT0x00600000/* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */
#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS0x03800000
#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE0x1c000000
#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS0x20000000/* Received Split Completion Error Message */
#define PCI_PCIX_STATUS_266MHZ0x40000000/* 266 MHz capable */
#define PCI_PCIX_STATUS_533MHZ0x80000000/* 533 MHz capable */
#define PCI_PCIX_SIZEOF4
//Azi: check this gui top to bottom!!
/* PCI-X Bridges */
#define PCI_PCIX_BRIDGE_SEC_STATUS 2 /* Secondary bus status register offset */
#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT 0x0001
#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ 0x0002
#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED 0x0004 /* Split Completion Discarded on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC 0x0008 /* Unexpected Split Completion on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN 0x0010 /* Split Completion Overrun on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED 0x0020
#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ 0x01c0
#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED 0xfe00
#define PCI_PCIX_BRIDGE_STATUS 4 /* Primary bus status register offset */
#define PCI_PCIX_BRIDGE_STATUS_FUNCTION 0x00000007
#define PCI_PCIX_BRIDGE_SEC_STATUS2 /* Secondary bus status register offset */
#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT0x0001
#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ0x0002
#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED0x0004 /* Split Completion Discarded on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC0x0008 /* Unexpected Split Completion on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN0x0010 /* Split Completion Overrun on secondary bus */
#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED0x0020
#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ0x01c0
#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED0xfe00
#define PCI_PCIX_BRIDGE_STATUS4 /* Primary bus status register offset */
#define PCI_PCIX_BRIDGE_STATUS_FUNCTION0x00000007
#define PCI_PCIX_BRIDGE_STATUS_DEVICE 0x000000f8
#define PCI_PCIX_BRIDGE_STATUS_BUS 0x0000ff00
#define PCI_PCIX_BRIDGE_STATUS_64BIT 0x00010000
#define PCI_PCIX_BRIDGE_SIZEOF 12
/* PCI Express */
#define PCI_EXP_FLAGS0x2/* Capabilities register */
#define PCI_EXP_FLAGS_VERS0x000f/* Capability version */
#define PCI_EXP_FLAGS_TYPE0x00f0/* Device/Port type */
#define PCI_EXP_TYPE_ENDPOINT0x0/* Express Endpoint */
#define PCI_EXP_TYPE_LEG_END0x1/* Legacy Endpoint */
#define PCI_EXP_TYPE_ROOT_PORT 0x4/* Root Port */
#define PCI_EXP_TYPE_UPSTREAM0x5/* Upstream Port */
#define PCI_EXP_TYPE_DOWNSTREAM 0x6/* Downstream Port */
#define PCI_EXP_TYPE_PCI_BRIDGE 0x7/* PCI/PCI-X Bridge */
#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8/* PCI/PCI-X to PCIE Bridge */
#define PCI_EXP_TYPE_ROOT_INT_EP 0x9/* Root Complex Integrated Endpoint */
#define PCI_EXP_TYPE_ROOT_EC 0xa/* Root Complex Event Collector */
#define PCI_EXP_FLAGS_SLOT0x0100/* Slot implemented */
#define PCI_EXP_FLAGS_IRQ0x3e00/* Interrupt message number */
#define PCI_EXP_DEVCAP0x4/* Device capabilities */
#define PCI_EXP_DEVCAP_PAYLOAD0x07/* Max_Payload_Size */
#define PCI_EXP_DEVCAP_PHANTOM0x18/* Phantom functions */
#define PCI_EXP_DEVCAP_EXT_TAG0x20/* Extended tags */
#define PCI_EXP_DEVCAP_L0S0x1c0/* L0s Acceptable Latency */
#define PCI_EXP_DEVCAP_L10xe00/* L1 Acceptable Latency */
#define PCI_EXP_DEVCAP_ATN_BUT0x1000/* Attention Button Present */
#define PCI_EXP_DEVCAP_ATN_IND0x2000/* Attention Indicator Present */
#define PCI_EXP_DEVCAP_PWR_IND0x4000/* Power Indicator Present */
#define PCI_EXP_DEVCAP_RBE0x8000/* Role-Based Error Reporting */
#define PCI_EXP_DEVCAP_PWR_VAL0x3fc0000 /* Slot Power Limit Value */
#define PCI_EXP_DEVCAP_PWR_SCL0xc000000 /* Slot Power Limit Scale */
#define PCI_EXP_DEVCAP_FLRESET0x10000000 /* Function-Level Reset */
#define PCI_EXP_DEVCTL0x8/* Device Control */
#define PCI_EXP_DEVCTL_CERE0x0001/* Correctable Error Reporting En. */
#define PCI_EXP_DEVCTL_NFERE0x0002/* Non-Fatal Error Reporting Enable */
#define PCI_EXP_DEVCTL_FERE0x0004/* Fatal Error Reporting Enable */
#define PCI_EXP_DEVCTL_URRE0x0008/* Unsupported Request Reporting En. */
#define PCI_EXP_DEVCTL_RELAXED0x0010/* Enable Relaxed Ordering */
#define PCI_EXP_DEVCTL_PAYLOAD0x00e0/* Max_Payload_Size */
#define PCI_EXP_DEVCTL_EXT_TAG0x0100/* Extended Tag Field Enable */
#define PCI_EXP_DEVCTL_PHANTOM0x0200/* Phantom Functions Enable */
#define PCI_EXP_DEVCTL_AUX_PME0x0400/* Auxiliary Power PM Enable */
#define PCI_EXP_DEVCTL_NOSNOOP0x0800/* Enable No Snoop */
#define PCI_EXP_DEVCTL_READRQ0x7000/* Max_Read_Request_Size */
#define PCI_EXP_DEVCTL_BCRE0x8000/* Bridge Configuration Retry Enable */
#define PCI_EXP_DEVCTL_FLRESET0x8000/* Function-Level Reset [bit shared with BCRE] */
#define PCI_EXP_DEVSTA0xa/* Device Status */
#define PCI_EXP_DEVSTA_CED0x01/* Correctable Error Detected */
#define PCI_EXP_DEVSTA_NFED0x02/* Non-Fatal Error Detected */
#define PCI_EXP_DEVSTA_FED0x04/* Fatal Error Detected */
#define PCI_EXP_DEVSTA_URD0x08/* Unsupported Request Detected */
#define PCI_EXP_DEVSTA_AUXPD0x10/* AUX Power Detected */
#define PCI_EXP_DEVSTA_TRPND0x20/* Transactions Pending */
#define PCI_EXP_LNKCAP0xc/* Link Capabilities */
#define PCI_EXP_LNKCAP_SPEED0x0000f/* Maximum Link Speed */
#define PCI_EXP_LNKCAP_WIDTH0x003f0/* Maximum Link Width */
#define PCI_EXP_LNKCAP_ASPM0x00c00/* Active State Power Management */
#define PCI_EXP_LNKCAP_L0S0x07000/* L0s Acceptable Latency */
#define PCI_EXP_LNKCAP_L10x38000/* L1 Acceptable Latency */
#define PCI_EXP_LNKCAP_CLOCKPM0x40000/* Clock Power Management */
#define PCI_EXP_LNKCAP_SURPRISE 0x80000 /* Surprise Down Error Reporting */
#define PCI_EXP_LNKCAP_DLLA0x100000 /* Data Link Layer Active Reporting */
#define PCI_EXP_LNKCAP_LBNC0x200000 /* Link Bandwidth Notification Capability */
#define PCI_EXP_LNKCAP_PORT0xff000000 /* Port Number */
#define PCI_EXP_LNKCTL0x10/* Link Control */
#define PCI_EXP_LNKCTL_ASPM0x0003/* ASPM Control */
#define PCI_EXP_LNKCTL_RCB0x0008/* Read Completion Boundary */
#define PCI_EXP_LNKCTL_DISABLE0x0010/* Link Disable */
#define PCI_EXP_LNKCTL_RETRAIN0x0020/* Retrain Link */
#define PCI_EXP_LNKCTL_CLOCK0x0040/* Common Clock Configuration */
#define PCI_EXP_LNKCTL_XSYNCH0x0080/* Extended Synch */
#define PCI_EXP_LNKCTL_CLOCKPM0x0100/* Clock Power Management */
#define PCI_EXP_LNKCTL_HWAUTWD0x0200/* Hardware Autonomous Width Disable */
#define PCI_EXP_LNKCTL_BWMIE0x0400/* Bandwidth Mgmt Interrupt Enable */
#define PCI_EXP_LNKCTL_AUTBWIE0x0800/* Autonomous Bandwidth Mgmt Interrupt Enable */
#define PCI_EXP_LNKSTA0x12/* Link Status */
#define PCI_EXP_LNKSTA_SPEED0x000f/* Negotiated Link Speed */
#define PCI_EXP_LNKSTA_WIDTH0x03f0/* Negotiated Link Width */
#define PCI_EXP_LNKSTA_TR_ERR0x0400/* Training Error (obsolete) */
#define PCI_EXP_LNKSTA_TRAIN0x0800/* Link Training */
#define PCI_EXP_LNKSTA_SL_CLK0x1000/* Slot Clock Configuration */
#define PCI_EXP_LNKSTA_DL_ACT0x2000/* Data Link Layer in DL_Active State */
#define PCI_EXP_LNKSTA_BWMGMT0x4000/* Bandwidth Mgmt Status */
#define PCI_EXP_LNKSTA_AUTBW0x8000/* Autonomous Bandwidth Mgmt Status */
#define PCI_EXP_SLTCAP0x14/* Slot Capabilities */
#define PCI_EXP_SLTCAP_ATNB0x0001/* Attention Button Present */
#define PCI_EXP_SLTCAP_PWRC0x0002/* Power Controller Present */
#define PCI_EXP_SLTCAP_MRL0x0004/* MRL Sensor Present */
#define PCI_EXP_SLTCAP_ATNI0x0008/* Attention Indicator Present */
#define PCI_EXP_SLTCAP_PWRI0x0010/* Power Indicator Present */
#define PCI_EXP_SLTCAP_HPS0x0020/* Hot-Plug Surprise */
#define PCI_EXP_SLTCAP_HPC0x0040/* Hot-Plug Capable */
#define PCI_EXP_SLTCAP_PWR_VAL0x00007f80 /* Slot Power Limit Value */
#define PCI_EXP_SLTCAP_PWR_SCL0x00018000 /* Slot Power Limit Scale */
#define PCI_EXP_SLTCAP_INTERLOCK 0x020000 /* Electromechanical Interlock Present */
#define PCI_EXP_SLTCAP_NOCMDCOMP 0x040000 /* No Command Completed Support */
#define PCI_EXP_SLTCAP_PSN0xfff80000 /* Physical Slot Number */
#define PCI_EXP_SLTCTL0x18/* Slot Control */
#define PCI_EXP_SLTCTL_ATNB0x0001/* Attention Button Pressed Enable */
#define PCI_EXP_SLTCTL_PWRF0x0002/* Power Fault Detected Enable */
#define PCI_EXP_SLTCTL_MRLS0x0004/* MRL Sensor Changed Enable */
#define PCI_EXP_SLTCTL_PRSD0x0008/* Presence Detect Changed Enable */
#define PCI_EXP_SLTCTL_CMDC0x0010/* Command Completed Interrupt Enable */
#define PCI_EXP_SLTCTL_HPIE0x0020/* Hot-Plug Interrupt Enable */
#define PCI_EXP_SLTCTL_ATNI0x00c0/* Attention Indicator Control */
#define PCI_EXP_SLTCTL_PWRI0x0300/* Power Indicator Control */
#define PCI_EXP_SLTCTL_PWRC0x0400/* Power Controller Control */
#define PCI_EXP_SLTCTL_INTERLOCK 0x0800 /* Electromechanical Interlock Control */
#define PCI_EXP_SLTCTL_LLCHG0x1000/* Data Link Layer State Changed Enable */
#define PCI_EXP_SLTSTA0x1a/* Slot Status */
#define PCI_EXP_SLTSTA_ATNB0x0001/* Attention Button Pressed */
#define PCI_EXP_SLTSTA_PWRF0x0002/* Power Fault Detected */
#define PCI_EXP_SLTSTA_MRLS0x0004/* MRL Sensor Changed */
#define PCI_EXP_SLTSTA_PRSD0x0008/* Presence Detect Changed */
#define PCI_EXP_SLTSTA_CMDC0x0010/* Command Completed */
#define PCI_EXP_SLTSTA_MRL_ST0x0020/* MRL Sensor State */
#define PCI_EXP_SLTSTA_PRES0x0040/* Presence Detect State */
#define PCI_EXP_SLTSTA_INTERLOCK 0x0080 /* Electromechanical Interlock Status */
#define PCI_EXP_SLTSTA_LLCHG0x0100/* Data Link Layer State Changed */
#define PCI_EXP_RTCTL0x1c/* Root Control */
#define PCI_EXP_RTCTL_SECEE0x0001/* System Error on Correctable Error */
#define PCI_EXP_RTCTL_SENFEE0x0002/* System Error on Non-Fatal Error */
#define PCI_EXP_RTCTL_SEFEE0x0004/* System Error on Fatal Error */
#define PCI_EXP_RTCTL_PMEIE0x0008/* PME Interrupt Enable */
#define PCI_EXP_RTCTL_CRSVIS0x0010/* Configuration Request Retry Status Visible to SW */
#define PCI_EXP_RTCAP0x1e/* Root Capabilities */
#define PCI_EXP_RTCAP_CRSVIS0x0010/* Configuration Request Retry Status Visible to SW */
#define PCI_EXP_RTSTA0x20/* Root Status */
#define PCI_EXP_RTSTA_PME_REQID 0x0000ffff /* PME Requester ID */
#define PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */
#define PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */
#define PCI_EXP_DEVCAP20x24/* Device capabilities 2 */
#define PCI_EXP_DEVCTL20x28/* Device Control */
#define PCI_EXP_DEV2_TIMEOUT_RANGE(x)((x) & 0xf) /* Completion Timeout Ranges Supported */
#define PCI_EXP_DEV2_TIMEOUT_VALUE(x)((x) & 0xf) /* Completion Timeout Value */
#define PCI_EXP_DEV2_TIMEOUT_DIS0x0010/* Completion Timeout Disable Supported */
#define PCI_EXP_DEV2_ARI0x0020/* ARI Forwarding */
#define PCI_EXP_DEVSTA20x2a/* Device Status */
#define PCI_EXP_LNKCAP20x2c/* Link Capabilities */
#define PCI_EXP_LNKCTL20x30/* Link Control */
#define PCI_EXP_LNKCTL2_SPEED(x)((x) & 0xf) /* Target Link Speed */
#define PCI_EXP_LNKCTL2_CMPLNC0x0010/* Enter Compliance */
#define PCI_EXP_LNKCTL2_SPEED_DIS0x0020/* Hardware Autonomous Speed Disable */
#define PCI_EXP_LNKCTL2_DEEMPHASIS(x)(((x) >> 6) & 1) /* Selectable De-emphasis */
#define PCI_EXP_LNKCTL2_MARGIN(x)(((x) >> 7) & 7) /* Transmit Margin */
#define PCI_EXP_LNKCTL2_MOD_CMPLNC0x0400/* Enter Modified Compliance */
#define PCI_EXP_LNKCTL2_CMPLNC_SOS0x0800/* Compliance SOS */
#define PCI_EXP_LNKCTL2_COM_DEEMPHASIS(x) (((x) >> 12) & 1) /* Compliance De-emphasis */
#define PCI_EXP_LNKSTA20x32/* Link Status */
#define PCI_EXP_LINKSTA2_DEEMPHASIS(x)((x) & 1)/* Current De-emphasis Level */
#define PCI_EXP_SLTCAP20x34/* Slot Capabilities */
#define PCI_EXP_SLTCTL20x38/* Slot Control */
#define PCI_EXP_SLTSTA20x3a/* Slot Status */
#define PCI_EXP_FLAGS0x2/* Capabilities register */
#define PCI_EXP_FLAGS_VERS0x000f/* Capability version */
#define PCI_EXP_FLAGS_TYPE0x00f0/* Device/Port type */
#define PCI_EXP_TYPE_ENDPOINT0x0/* Express Endpoint */
#define PCI_EXP_TYPE_LEG_END0x1/* Legacy Endpoint */
#define PCI_EXP_TYPE_ROOT_PORT 0x4/* Root Port */
#define PCI_EXP_TYPE_UPSTREAM0x5/* Upstream Port */
#define PCI_EXP_TYPE_DOWNSTREAM 0x6/* Downstream Port */
#define PCI_EXP_TYPE_PCI_BRIDGE 0x7/* PCI/PCI-X Bridge */
#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8/* PCI/PCI-X to PCIE Bridge */
#define PCI_EXP_TYPE_ROOT_INT_EP 0x9/* Root Complex Integrated Endpoint */
#define PCI_EXP_TYPE_ROOT_EC 0xa/* Root Complex Event Collector */
#define PCI_EXP_FLAGS_SLOT0x0100/* Slot implemented */
#define PCI_EXP_FLAGS_IRQ0x3e00/* Interrupt message number */
#define PCI_EXP_DEVCAP0x4/* Device capabilities */
#define PCI_EXP_DEVCAP_PAYLOAD0x07/* Max_Payload_Size */
#define PCI_EXP_DEVCAP_PHANTOM0x18/* Phantom functions */
#define PCI_EXP_DEVCAP_EXT_TAG0x20/* Extended tags */
#define PCI_EXP_DEVCAP_L0S0x1c0/* L0s Acceptable Latency */
#define PCI_EXP_DEVCAP_L10xe00/* L1 Acceptable Latency */
#define PCI_EXP_DEVCAP_ATN_BUT0x1000/* Attention Button Present */
#define PCI_EXP_DEVCAP_ATN_IND0x2000/* Attention Indicator Present */
#define PCI_EXP_DEVCAP_PWR_IND0x4000/* Power Indicator Present */
#define PCI_EXP_DEVCAP_RBE0x8000/* Role-Based Error Reporting */
#define PCI_EXP_DEVCAP_PWR_VAL0x3fc0000 /* Slot Power Limit Value */
#define PCI_EXP_DEVCAP_PWR_SCL0xc000000 /* Slot Power Limit Scale */
#define PCI_EXP_DEVCAP_FLRESET0x10000000 /* Function-Level Reset */
#define PCI_EXP_DEVCTL0x8/* Device Control */
#define PCI_EXP_DEVCTL_CERE0x0001/* Correctable Error Reporting En. */
#define PCI_EXP_DEVCTL_NFERE0x0002/* Non-Fatal Error Reporting Enable */
#define PCI_EXP_DEVCTL_FERE0x0004/* Fatal Error Reporting Enable */
#define PCI_EXP_DEVCTL_URRE0x0008/* Unsupported Request Reporting En. */
#define PCI_EXP_DEVCTL_RELAXED0x0010/* Enable Relaxed Ordering */
#define PCI_EXP_DEVCTL_PAYLOAD0x00e0/* Max_Payload_Size */
#define PCI_EXP_DEVCTL_EXT_TAG0x0100/* Extended Tag Field Enable */
#define PCI_EXP_DEVCTL_PHANTOM0x0200/* Phantom Functions Enable */
#define PCI_EXP_DEVCTL_AUX_PME0x0400/* Auxiliary Power PM Enable */
#define PCI_EXP_DEVCTL_NOSNOOP0x0800/* Enable No Snoop */
#define PCI_EXP_DEVCTL_READRQ0x7000/* Max_Read_Request_Size */
#define PCI_EXP_DEVCTL_BCRE0x8000/* Bridge Configuration Retry Enable */
#define PCI_EXP_DEVCTL_FLRESET0x8000/* Function-Level Reset [bit shared with BCRE] */
#define PCI_EXP_DEVSTA0xa/* Device Status */
#define PCI_EXP_DEVSTA_CED0x01/* Correctable Error Detected */
#define PCI_EXP_DEVSTA_NFED0x02/* Non-Fatal Error Detected */
#define PCI_EXP_DEVSTA_FED0x04/* Fatal Error Detected */
#define PCI_EXP_DEVSTA_URD0x08/* Unsupported Request Detected */
#define PCI_EXP_DEVSTA_AUXPD0x10/* AUX Power Detected */
#define PCI_EXP_DEVSTA_TRPND0x20/* Transactions Pending */
#define PCI_EXP_LNKCAP0xc/* Link Capabilities */
#define PCI_EXP_LNKCAP_SPEED0x0000f/* Maximum Link Speed */
#define PCI_EXP_LNKCAP_WIDTH0x003f0/* Maximum Link Width */
#define PCI_EXP_LNKCAP_ASPM0x00c00/* Active State Power Management */
#define PCI_EXP_LNKCAP_L0S0x07000/* L0s Acceptable Latency */
#define PCI_EXP_LNKCAP_L10x38000/* L1 Acceptable Latency */
#define PCI_EXP_LNKCAP_CLOCKPM0x40000/* Clock Power Management */
#define PCI_EXP_LNKCAP_SURPRISE0x80000 /* Surprise Down Error Reporting */
#define PCI_EXP_LNKCAP_DLLA0x100000 /* Data Link Layer Active Reporting */
#define PCI_EXP_LNKCAP_LBNC0x200000 /* Link Bandwidth Notification Capability */
#define PCI_EXP_LNKCAP_PORT0xff000000 /* Port Number */
#define PCI_EXP_LNKCTL0x10/* Link Control */
#define PCI_EXP_LNKCTL_ASPM0x0003/* ASPM Control */
#define PCI_EXP_LNKCTL_RCB0x0008/* Read Completion Boundary */
#define PCI_EXP_LNKCTL_DISABLE0x0010/* Link Disable */
#define PCI_EXP_LNKCTL_RETRAIN0x0020/* Retrain Link */
#define PCI_EXP_LNKCTL_CLOCK0x0040/* Common Clock Configuration */
#define PCI_EXP_LNKCTL_XSYNCH0x0080/* Extended Synch */
#define PCI_EXP_LNKCTL_CLOCKPM0x0100/* Clock Power Management */
#define PCI_EXP_LNKCTL_HWAUTWD0x0200/* Hardware Autonomous Width Disable */
#define PCI_EXP_LNKCTL_BWMIE0x0400/* Bandwidth Mgmt Interrupt Enable */
#define PCI_EXP_LNKCTL_AUTBWIE0x0800/* Autonomous Bandwidth Mgmt Interrupt Enable */
#define PCI_EXP_LNKSTA0x12/* Link Status */
#define PCI_EXP_LNKSTA_SPEED0x000f/* Negotiated Link Speed */
#define PCI_EXP_LNKSTA_WIDTH0x03f0/* Negotiated Link Width */
#define PCI_EXP_LNKSTA_TR_ERR0x0400/* Training Error (obsolete) */
#define PCI_EXP_LNKSTA_TRAIN0x0800/* Link Training */
#define PCI_EXP_LNKSTA_SL_CLK0x1000/* Slot Clock Configuration */
#define PCI_EXP_LNKSTA_DL_ACT0x2000/* Data Link Layer in DL_Active State */
#define PCI_EXP_LNKSTA_BWMGMT0x4000/* Bandwidth Mgmt Status */
#define PCI_EXP_LNKSTA_AUTBW0x8000/* Autonomous Bandwidth Mgmt Status */
#define PCI_EXP_SLTCAP0x14/* Slot Capabilities */
#define PCI_EXP_SLTCAP_ATNB0x0001/* Attention Button Present */
#define PCI_EXP_SLTCAP_PWRC0x0002/* Power Controller Present */
#define PCI_EXP_SLTCAP_MRL0x0004/* MRL Sensor Present */
#define PCI_EXP_SLTCAP_ATNI0x0008/* Attention Indicator Present */
#define PCI_EXP_SLTCAP_PWRI0x0010/* Power Indicator Present */
#define PCI_EXP_SLTCAP_HPS0x0020/* Hot-Plug Surprise */
#define PCI_EXP_SLTCAP_HPC0x0040/* Hot-Plug Capable */
#define PCI_EXP_SLTCAP_PWR_VAL0x00007f80 /* Slot Power Limit Value */
#define PCI_EXP_SLTCAP_PWR_SCL0x00018000 /* Slot Power Limit Scale */
#define PCI_EXP_SLTCAP_INTERLOCK 0x020000 /* Electromechanical Interlock Present */
#define PCI_EXP_SLTCAP_NOCMDCOMP 0x040000 /* No Command Completed Support */
#define PCI_EXP_SLTCAP_PSN0xfff80000 /* Physical Slot Number */
#define PCI_EXP_SLTCTL0x18/* Slot Control */
#define PCI_EXP_SLTCTL_ATNB0x0001/* Attention Button Pressed Enable */
#define PCI_EXP_SLTCTL_PWRF0x0002/* Power Fault Detected Enable */
#define PCI_EXP_SLTCTL_MRLS0x0004/* MRL Sensor Changed Enable */
#define PCI_EXP_SLTCTL_PRSD0x0008/* Presence Detect Changed Enable */
#define PCI_EXP_SLTCTL_CMDC0x0010/* Command Completed Interrupt Enable */
#define PCI_EXP_SLTCTL_HPIE0x0020/* Hot-Plug Interrupt Enable */
#define PCI_EXP_SLTCTL_ATNI0x00c0/* Attention Indicator Control */
#define PCI_EXP_SLTCTL_PWRI0x0300/* Power Indicator Control */
#define PCI_EXP_SLTCTL_PWRC0x0400/* Power Controller Control */
#define PCI_EXP_SLTCTL_INTERLOCK 0x0800 /* Electromechanical Interlock Control */
#define PCI_EXP_SLTCTL_LLCHG0x1000/* Data Link Layer State Changed Enable */
#define PCI_EXP_SLTSTA0x1a/* Slot Status */
#define PCI_EXP_SLTSTA_ATNB0x0001/* Attention Button Pressed */
#define PCI_EXP_SLTSTA_PWRF0x0002/* Power Fault Detected */
#define PCI_EXP_SLTSTA_MRLS0x0004/* MRL Sensor Changed */
#define PCI_EXP_SLTSTA_PRSD0x0008/* Presence Detect Changed */
#define PCI_EXP_SLTSTA_CMDC0x0010/* Command Completed */
#define PCI_EXP_SLTSTA_MRL_ST0x0020/* MRL Sensor State */
#define PCI_EXP_SLTSTA_PRES0x0040/* Presence Detect State */
#define PCI_EXP_SLTSTA_INTERLOCK0x0080 /* Electromechanical Interlock Status */
#define PCI_EXP_SLTSTA_LLCHG0x0100/* Data Link Layer State Changed */
#define PCI_EXP_RTCTL0x1c/* Root Control */
#define PCI_EXP_RTCTL_SECEE0x0001/* System Error on Correctable Error */
#define PCI_EXP_RTCTL_SENFEE0x0002/* System Error on Non-Fatal Error */
#define PCI_EXP_RTCTL_SEFEE0x0004/* System Error on Fatal Error */
#define PCI_EXP_RTCTL_PMEIE0x0008/* PME Interrupt Enable */
#define PCI_EXP_RTCTL_CRSVIS0x0010/* Configuration Request Retry Status Visible to SW */
#define PCI_EXP_RTCAP0x1e/* Root Capabilities */
#define PCI_EXP_RTCAP_CRSVIS0x0010/* Configuration Request Retry Status Visible to SW */
#define PCI_EXP_RTSTA0x20/* Root Status */
#define PCI_EXP_RTSTA_PME_REQID 0x0000ffff /* PME Requester ID */
#define PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */
#define PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */
#define PCI_EXP_DEVCAP20x24/* Device capabilities 2 */
#define PCI_EXP_DEVCTL20x28/* Device Control */
#define PCI_EXP_DEV2_TIMEOUT_RANGE(x)((x) & 0xf) /* Completion Timeout Ranges Supported */
#define PCI_EXP_DEV2_TIMEOUT_VALUE(x)((x) & 0xf) /* Completion Timeout Value */
#define PCI_EXP_DEV2_TIMEOUT_DIS0x0010/* Completion Timeout Disable Supported */
#define PCI_EXP_DEV2_ARI0x0020/* ARI Forwarding */
#define PCI_EXP_DEVSTA20x2a/* Device Status */
#define PCI_EXP_LNKCAP20x2c/* Link Capabilities */
#define PCI_EXP_LNKCTL20x30/* Link Control */
#define PCI_EXP_LNKCTL2_SPEED(x)((x) & 0xf) /* Target Link Speed */
#define PCI_EXP_LNKCTL2_CMPLNC0x0010/* Enter Compliance */
#define PCI_EXP_LNKCTL2_SPEED_DIS0x0020/* Hardware Autonomous Speed Disable */
#define PCI_EXP_LNKCTL2_DEEMPHASIS(x)(((x) >> 6) & 1) /* Selectable De-emphasis */
#define PCI_EXP_LNKCTL2_MARGIN(x)(((x) >> 7) & 7) /* Transmit Margin */
#define PCI_EXP_LNKCTL2_MOD_CMPLNC0x0400/* Enter Modified Compliance */
#define PCI_EXP_LNKCTL2_CMPLNC_SOS0x0800/* Compliance SOS */
#define PCI_EXP_LNKCTL2_COM_DEEMPHASIS(x)(((x) >> 12) & 1) /* Compliance De-emphasis */
#define PCI_EXP_LNKSTA20x32/* Link Status */
#define PCI_EXP_LINKSTA2_DEEMPHASIS(x)((x) & 1)/* Current De-emphasis Level */
#define PCI_EXP_SLTCAP20x34/* Slot Capabilities */
#define PCI_EXP_SLTCTL20x38/* Slot Control */
#define PCI_EXP_SLTSTA20x3a/* Slot Status */
/* MSI-X */
#define PCI_MSIX_ENABLE0x8000
#define PCI_MSIX_MASK0x4000
#define PCI_MSIX_TABSIZE0x03ff
#define PCI_MSIX_TABLE4
#define PCI_MSIX_PBA8
#define PCI_MSIX_BIR0x7
#define PCI_MSIX_ENABLE0x8000
#define PCI_MSIX_MASK0x4000
#define PCI_MSIX_TABSIZE0x03ff
#define PCI_MSIX_TABLE4
#define PCI_MSIX_PBA8
#define PCI_MSIX_BIR0x7
/* Subsystem vendor/device ID for PCI bridges */
#define PCI_SSVID_VENDOR4
#define PCI_SSVID_DEVICE6
#define PCI_SSVID_VENDOR4
#define PCI_SSVID_DEVICE6
/* Advanced Error Reporting */
#define PCI_ERR_UNCOR_STATUS4/* Uncorrectable Error Status */
#define PCI_ERR_ROOT_SRC54
/* Virtual Channel */
#define PCI_VC_PORT_REG14
#define PCI_VC_PORT_REG28
#define PCI_VC_PORT_CTRL12
#define PCI_VC_PORT_STATUS14
#define PCI_VC_RES_CAP16
#define PCI_VC_RES_CTRL20
#define PCI_VC_RES_STATUS26
#define PCI_VC_PORT_REG14
#define PCI_VC_PORT_REG28
#define PCI_VC_PORT_CTRL12
#define PCI_VC_PORT_STATUS14
#define PCI_VC_RES_CAP16
#define PCI_VC_RES_CTRL20
#define PCI_VC_RES_STATUS26
/* Power Budgeting */
#define PCI_PWR_DSR4/* Data Select Register */
#define PCI_PWR_DATA8/* Data Register */
#define PCI_PWR_DSR4/* Data Select Register */
#define PCI_PWR_DATA8/* Data Register */
#define PCI_PWR_DATA_BASE(x)((x) & 0xff) /* Base Power */
#define PCI_PWR_DATA_SCALE(x)(((x) >> 8) & 3) /* Data Scale */
#define PCI_PWR_DATA_PM_SUB(x)(((x) >> 10) & 7) /* PM Sub State */
#define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3) /* PM State */
#define PCI_PWR_DATA_TYPE(x)(((x) >> 15) & 7) /* Type */
#define PCI_PWR_DATA_RAIL(x)(((x) >> 18) & 7) /* Power Rail */
#define PCI_PWR_CAP12/* Capability */
#define PCI_PWR_CAP12/* Capability */
#define PCI_PWR_CAP_BUDGET(x)((x) & 1)/* Included in system budget */
/* Access Control Services */
#define PCI_ARI_CTRL0x06/* ARI Control Register */
#define PCI_ARI_CTRL_MFVC0x0001/* MFVC Function Groups Enable */
#define PCI_ARI_CTRL_ACS0x0002/* ACS Function Groups Enable */
#define PCI_ARI_CTRL_FG(x)(((x) >> 4) & 7) /* Function Group */
#define PCI_ARI_CTRL_FG(x)(((x) >> 4) & 7) /* Function Group */
/* Address Translation Service */
#define PCI_ATS_CAP0x04/* ATS Capability Register */
#define PCI_ATS_CAP_IQD(x)((x) & 0x1f) /* Invalidate Queue Depth */
#define PCI_ATS_CAP0x04/* ATS Capability Register */
#define PCI_ATS_CAP_IQD(x)((x) & 0x1f) /* Invalidate Queue Depth */
#define PCI_ATS_CTRL0x06/* ATS Control Register */
#define PCI_ATS_CTRL_STU(x)((x) & 0x1f) /* Smallest Translation Unit */
#define PCI_ATS_CTRL_ENABLE0x8000/* ATS Enable */
#define PCI_ATS_CTRL_STU(x)((x) & 0x1f) /* Smallest Translation Unit */
#define PCI_ATS_CTRL_ENABLE0x8000/* ATS Enable */
/* Single Root I/O Virtualization */
#define PCI_IOV_CAP0x04/* SR-IOV Capability Register */
#define PCI_IOV_CAP_VFM0x00000001 /* VF Migration Capable */
#define PCI_IOV_CAP_IMN(x)((x) >> 21) /* VF Migration Interrupt Message Number */
#define PCI_IOV_CTRL0x08/* SR-IOV Control Register */
#define PCI_IOV_CTRL_VFE0x0001/* VF Enable */
#define PCI_IOV_CTRL_VFME0x0002/* VF Migration Enable */
#define PCI_IOV_CTRL_VFMIE0x0004/* VF Migration Interrupt Enable */
#define PCI_IOV_CTRL_MSE0x0008/* VF MSE */
#define PCI_IOV_CTRL_ARI0x0010/* ARI Capable Hierarchy */
#define PCI_IOV_STATUS0x0a/* SR-IOV Status Register */
#define PCI_IOV_STATUS_MS0x0001/* VF Migration Status */
#define PCI_IOV_INITIALVF0x0c/* Number of VFs that are initially associated */
#define PCI_IOV_TOTALVF0x0e/* Maximum number of VFs that could be associated */
#define PCI_IOV_NUMVF0x10/* Number of VFs that are available */
#define PCI_IOV_FDL0x12/* Function Dependency Link */
#define PCI_IOV_OFFSET0x14/* First VF Offset */
#define PCI_IOV_STRIDE0x16/* Routing ID offset from one VF to the next one */
#define PCI_IOV_DID0x1a/* VF Device ID */
#define PCI_IOV_SUPPS0x1c/* Supported Page Sizes */
#define PCI_IOV_SYSPS0x20/* System Page Size */
#define PCI_IOV_BAR_BASE0x24/* VF BAR0, VF BAR1, ... VF BAR5 */
#define PCI_IOV_NUM_BAR6/* Number of VF BARs */
#define PCI_IOV_MSAO0x3c/* VF Migration State Array Offset */
#define PCI_IOV_MSA_BIR(x)((x) & 7) /* VF Migration State BIR */
#define PCI_IOV_CAP0x04/* SR-IOV Capability Register */
#define PCI_IOV_CAP_VFM0x00000001 /* VF Migration Capable */
#define PCI_IOV_CAP_IMN(x)((x) >> 21) /* VF Migration Interrupt Message Number */
#define PCI_IOV_CTRL0x08/* SR-IOV Control Register */
#define PCI_IOV_CTRL_VFE0x0001/* VF Enable */
#define PCI_IOV_CTRL_VFME0x0002/* VF Migration Enable */
#define PCI_IOV_CTRL_VFMIE0x0004/* VF Migration Interrupt Enable */
#define PCI_IOV_CTRL_MSE0x0008/* VF MSE */
#define PCI_IOV_CTRL_ARI0x0010/* ARI Capable Hierarchy */
#define PCI_IOV_STATUS0x0a/* SR-IOV Status Register */
#define PCI_IOV_STATUS_MS0x0001/* VF Migration Status */
#define PCI_IOV_INITIALVF0x0c/* Number of VFs that are initially associated */
#define PCI_IOV_TOTALVF0x0e/* Maximum number of VFs that could be associated */
#define PCI_IOV_NUMVF0x10/* Number of VFs that are available */
#define PCI_IOV_FDL0x12/* Function Dependency Link */
#define PCI_IOV_OFFSET0x14/* First VF Offset */
#define PCI_IOV_STRIDE0x16/* Routing ID offset from one VF to the next one */
#define PCI_IOV_DID0x1a/* VF Device ID */
#define PCI_IOV_SUPPS0x1c/* Supported Page Sizes */
#define PCI_IOV_SYSPS0x20/* System Page Size */
#define PCI_IOV_BAR_BASE0x24/* VF BAR0, VF BAR1, ... VF BAR5 */
#define PCI_IOV_NUM_BAR6/* Number of VF BARs */
#define PCI_IOV_MSAO0x3c/* VF Migration State Array Offset */
#define PCI_IOV_MSA_BIR(x)((x) & 7) /* VF Migration State BIR */
#define PCI_IOV_MSA_OFFSET(x)((x) & 0xfffffff8) /* VF Migration State Offset */
/*
*2:0 = function
*/
#define PCI_DEVFN(slot,func)((((slot) & 0x1f) << 3) | ((func) & 0x07))
#define PCI_SLOT(devfn)(((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn)((devfn) & 0x07)
#define PCI_SLOT(devfn)(((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn)((devfn) & 0x07)
/* Device classes and subclasses */
branches/iFabio/Chameleon/i386/libsaio/msdos.c
4545
4646
4747
48
4948
5049
5150
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define tolower(c) (((c)>='A' && c<='Z')?((c) | 0x20):(c))
#include "libsaio.h"
#include "sl.h"
branches/iFabio/Chameleon/i386/libsaio/fake_efi.c
2222
2323
2424
25
25
2626
2727
2828
2929
3030
31
31
3232
3333
3434
35
35
3636
37
37
3838
3939
4040
......
4343
4444
4545
46
46
4747
4848
4949
......
5353
5454
5555
56
5756
5857
5958
......
6463
6564
6665
67
6866
6967
7068
......
152150
153151
154152
155
156153
157154
158155
......
409406
410407
411408
412
409
413410
414
411
415412
416413
417
414
418415
419
416
420417
421418
422419
......
441438
442439
443440
444
445441
446442
447443
......
461457
462458
463459
464
465460
466461
467462
......
490485
491486
492487
493
494488
495489
496490
......
516510
517511
518512
519
520513
521514
522515
......
614607
615608
616609
617
618610
619611
620
621
622
623
624
625
626
627
628
612
613
614
615
616
617
618
619
620
629621
630622
631623
632624
633
634625
635626
636627
......
665656
666657
667658
668
669659
670660
671661
672662
673663
674664
675
676665
677666
678667
......
728717
729718
730719
731
732720
733721
734722
/*
* Modern Darwin kernels require some amount of EFI because Apple machines all
* have EFI. Modifying the kernel source to not require EFI is of course
* have EFI. Modifying the kernel source to not require EFI is of course
* possible but would have to be maintained as a separate patch because it is
* unlikely that Apple wishes to add legacy support to their kernel.
*
* As you can see from the Apple-supplied code in bootstruct.c, it seems that
* the intention was clearly to modify this booter to provide EFI-like structures
* to the kernel rather than modifying the kernel to handle non-EFI stuff. This
* to the kernel rather than modifying the kernel to handle non-EFI stuff. This
* makes a lot of sense from an engineering point of view as it means the kernel
* for the as yet unreleased EFI-only Macs could still be booted by the non-EFI
* DTK systems so long as the kernel checked to ensure the boot tables were
* filled in appropriately. Modern xnu requires a system table and a runtime
* filled in appropriately.Modern xnu requires a system table and a runtime
* services table and performs no checks whatsoever to ensure the pointers to
* these tables are non-NULL.Therefore, any modern xnu kernel will page fault
* these tables are non-NULL. Therefore, any modern xnu kernel will page fault
* early on in the boot process if the system table pointer is zero.
*
* Even before that happens, the tsc_init function in modern xnu requires the FSB
*
* As of this writing, the current implementation found here is good enough
* to make the currently available xnu kernel boot without modification on a
* system with an appropriate processor. With a minor source modification to
* system with an appropriate processor. With a minor source modification to
* the tsc_init function to remove the explicit check for Core or Core 2
* processors the kernel can be made to boot on other processors so long as
* the code can be executed by the processor and the machine contains the
/*==========================================================================
* Utility function to make a device tree string from an EFI_GUID
*/
static inline char * mallocStringForGuid(EFI_GUID const *pGuid)
{
char *string = malloc(37);
/*==========================================================================
* Function to map 32 bit physical address to 64 bit virtual address
*/
static uint64_t ptov64(uint32_t addr)
{
return ((uint64_t)addr | 0xFFFFFF8000000000ULL);
* Because we build against modern headers with kBootArgsRevision 4 we
* also take care to set efiMode = 32.
*/
void setupEfiTables32(void)
{
// We use the fake_efi_pages struct so that we only need to do one kernel
#define SMBIOS_ANCHOR_UINT32_LE 0x5f4d535f
#define EFI_ACPI_TABLE_GUID \
{ \
{ \
0xeb9d2d30, 0x2d88, 0x11d3, { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
}
#define EFI_ACPI_20_TABLE_GUID \
{ \
{ \
0x8868e871, 0xe4f1, 0x11d3, { 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
}
EFI_GUID gEfiAcpiTableGuid = EFI_ACPI_TABLE_GUID;
EFI_GUID gEfiAcpi20TableGuid = EFI_ACPI_20_TABLE_GUID;
/*
* Get an smbios option string option to convert to EFI_CHAR16 string
*/
static EFI_CHAR16* getSmbiosChar16(const char * key, size_t* len)
{
const char*src = getStringForKey(key, &bootInfo->smbiosConfig);
/*
* Get the SystemID from the bios dmi info
*/
staticEFI_CHAR8* getSmbiosUUID()
{
static EFI_CHAR8 uuid[UUID_LEN];
* 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
* Must be called AFTER setup Acpi because we need to take care of correct
* facp content to reflect in ioregs
*/
void setupSystemType()
{
Node *node = DT__FindNode("/", false);
/*
* Must be called AFTER getSmbios
*/
void setupBoardId()
{
Node *node;
node = DT__FindNode("/", false);
if (node == 0) {
stop("Couldn't get root node");
}
const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig);
if (boardid)
DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16*)boardid);
}
Node *node;
node = DT__FindNode("/", false);
if (node == 0) {
stop("Couldn't get root node");
}
const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig);
if (boardid)
DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16*)boardid);
}
/*
* Load the smbios.plist override config file if any
*/
static void setupSmbiosConfigFile(const char *filename)
{
chardirSpecSMBIOS[128] = "";
// get a chance to scan mem dynamically if user asks for it while having the config options loaded as well,
// as opposed to when it was in scan_platform(); also load the orig. smbios so that we can access dmi info without
// patching the smbios yet
scan_mem();
}
/*
* Installs all the needed configuration table entries
*/
static void setupEfiConfigurationTable()
{
smbios_p = (EFI_PTR32)getSmbios(SMBIOS_PATCHED);
/*
* Entrypoint from boot.c
*/
void setupFakeEfi(void)
{
// Generate efi device strings
branches/iFabio/Chameleon/i386/libsaio/saio_internal.h
4747
4848
4949
50
50
5151
5252
5353
......
9191
9292
9393
94
94
9595
9696
9797
extern int ebioswrite(int dev, long sec, int count);
extern int get_drive_info(int drive, struct driveInfo *dp);
extern int ebiosEjectMedia(int biosdev);
extern void putc(int ch);
extern void bios_putchar(int ch);
extern void putca(int ch, int attr, int repeat);
extern int getc(void);
extern void pause();
extern bool gErrors;
extern void initBooterLog(void);
extern void setupBooterLog(void);
extern void putchar(int ch);
extern int putchar(int ch);
extern int getchar(void);
extern void msglog(const char * format, ...);
extern int printf(const char *format, ...);
branches/iFabio/Chameleon/i386/boot2/graphics.c
12091209
12101210
12111211
1212
1213
1212
1213
12141214
12151215
12161216
......
12191219
12201220
12211221
1222
1223
1222
1223
12241224
12251225
12261226
{
currentIndicator = 0;
}
putc(indicator[currentIndicator++]);
putc('\b');
putchar(indicator[currentIndicator++]);
putchar('\b');
}
}
{
if ( getVideoMode() == VGA_TEXT_MODE )
{
putc(' ');
putc('\b');
putchar(' ');
putchar('\b');
}
}
branches/iFabio/Chameleon/i386/boot2/Makefile
77
88
99
10
11
1012
1113
1214
......
2123
2224
2325
24
26
2527
2628
2729
......
4143
4244
4345
44
46
4547
4648
4749
......
6163
6264
6365
64
6566
6667
6768
......
7576
7677
7778
79
7880
79
80
81
81
82
83
8284
8385
8486
......
9294
9395
9496
95
97
9698
9799
98100
......
106108
107109
108110
109
111
110112
111113
112114
......
118120
119121
120122
121
122
123
124
125123
126124
127125
128126
129127
130128
131
132129
133130
134131
......
139136
140137
141138
142
139
143140
144141
145142
......
152149
153150
154151
155
152
156153
157154
158155
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
VPATH = $(SYMROOT)
#Makefile for i386 boot program
#define FLOPPY and SMALL using DEFINES macro as necessary
-fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h
CPPFLAGS := $(CPPFLAGS) -nostdinc++ -include $(SRCROOT)/autoconf.h
DEFINES=
# The ordering is important;
# boot2.o must be first.
OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o lzss.o mboot.o \
ramdisk.o picopng.o resume.o bmdecompress.o graphic_utils.o gui.o modules.o modules_support.o
ramdisk.o picopng.o resume.o bmdecompress.o graphic_utils.o gui.o modules.o modules_support.o boot_modules.o
# button.o browser.o scrollbar.o == NOTYET
UTILDIR = ../util
PATCH_ADDR = $(shell echo ${SYMBOL_ADDR}-${DATA_ADDR}+${DATA_OFFSET} | bc)
all: $(DIRS_NEEDED) boot
ifeq (${CONFIG_EMBED_THEME}, y)
endif
@${MKDIRS} $(OBJROOT)/../boot2_modules/
@echo "\t[LD] boot.sys"
@$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@$(CC) -Wl,-segaddr,__INIT,$(BOOT2ADDR) -Wl,-segalign,20 -Wl,-preload \
-nostdlib -arch i386 -static \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext
ifeq (${CONFIG_MODULES}, y)
@$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
-o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext
@# Second pass, fixup global var locations
@${RM} $(SYMROOT)/${SYMBOLS_MODULE}
@$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
-o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext
@$(LD) -arch i386 \
-undefined dynamic_lookup \
-macosx_version_min 10.6 \
-o $(OBJROOT)/Symbols_LINKER_ONLY.dylib
endif
@make embed_symbols# this is done in a sub process after boot.sys exists so the strings are populated correctly
@${RM} $(SYMROOT)/boot2.sys
@##size $(SYMROOT)/boot.sys
@ls -l $(SYMROOT)/boot
@( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \
exit 1;\
fi)
embed_symbols:
ifeq (${CONFIG_MODULES}, y)
@echo ================= Embedding Symbols.dylib =================
@echo "\t[MACHOCONV] boot"
@$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot
$(SYMROOT)/vers.h:
@echo "#define I386BOOT_VERSION \"5.0.132\"" > $(SYMROOT)/vers.h
@echo "#define I386BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $(SYMROOT)/vers.h
branches/iFabio/Chameleon/i386/boot2/boot.c
134134
135135
136136
137
138
139
140
137
138
139
140
141141
142
143
144
145
146
147
148
149
150
151
152
153
142
143
144
145
146
147
148
149
150
151
152
153
154154
155155
156156
157
158
157
158
159159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179179
180
181
182
183
184
185
186
180
181
182
183
184
185
186
187187
188188
189189
190190
191
191
192192
193
193
194194
195
196
197
198
199
200
201
202
195
196
197
203198
199
200
201
202
203
204204
205205
206
207
206
207
208208
209209
210210
211
212
211
212
213213
214214
215215
......
221221
222222
223223
224
225
226
224
225
227226
228227
229228
......
492491
493492
494493
495
496
497
498
499
500
494
495
496
497
498
499
500
501
502
503
501504
502505
503506
......
567570
568571
569572
573
570574
575
571576
572577
573578
......
575580
576581
577582
583
578584
579585
586
580587
581588
589
582590
583591
584592
......
622630
623631
624632
625
626633
627634
628635
......
649656
650657
651658
652
653
654
659
660
661
655662
656663
657664
static int ExecKernel(void *binary)
{
entry_t kernelEntry;
int ret;
bootArgs->kaddr = bootArgs->ksize = 0;
entry_t kernelEntry;
int ret;
bootArgs->kaddr = bootArgs->ksize = 0;
execute_hook("ExecKernel", (void*)binary, NULL, NULL, NULL);
ret = DecodeKernel(binary,
&kernelEntry,
(char **) &bootArgs->kaddr,
(int *)&bootArgs->ksize );
if ( ret != 0 )
return ret;
// Reserve space for boot args
reserveKernBootStruct();
ret = DecodeKernel(binary,
&kernelEntry,
(char **) &bootArgs->kaddr,
(int *)&bootArgs->ksize );
if ( ret != 0 )
return ret;
// Reserve space for boot args
reserveKernBootStruct();
// Notify modules that the kernel has been decoded
execute_hook("DecodedKernel", (void*)binary, NULL, NULL, NULL);
// Load boot drivers from the specifed root path.
if (!gHaveKernelCache)
// Load boot drivers from the specifed root path.
if (!gHaveKernelCache)
LoadDrivers("/");
clearActivityIndicator();
if (gErrors) {
printf("Errors encountered while starting up the computer.\n");
printf("Pausing %d seconds...\n", kBootErrorTimeout);
sleep(kBootErrorTimeout);
}
setupFakeEfi();
md0Ramdisk();
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
// Cleanup the PXE base code.
if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) {
clearActivityIndicator();
if (gErrors) {
printf("Errors encountered while starting up the computer.\n");
printf("Pausing %d seconds...\n", kBootErrorTimeout);
sleep(kBootErrorTimeout);
}
setupFakeEfi();
md0Ramdisk();
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
// Cleanup the PXE base code.
if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) {
if ( (ret = nbpUnloadBaseCode()) != nbpStatusSuccess )
{
printf("nbpUnloadBaseCode error %d\n", (int) ret);
sleep(2);
}
}
bool dummyVal;
{
printf("nbpUnloadBaseCode error %d\n", (int) ret);
sleep(2);
}
}
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) {
printf("Press any key to continue...");
getc();
}
usb_loop();
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);// Notify modules that the kernel is about to be started
// If we were in text mode, switch to graphics mode.
// This will draw the boot graphics unless we are in
// verbose mode.
if(gVerboseMode)
setVideoMode( GRAPHICS_MODE, 0 );
else
drawBootGraphics();
// If we were in text mode, switch to graphics mode.
// This will draw the boot graphics unless we are in
// verbose mode.
if(gVerboseMode)
setVideoMode( GRAPHICS_MODE, 0 );
else
drawBootGraphics();
setupBooterLog();
finalizeBootStruct();
finalizeBootStruct();
if (checkOSVersion("10.7")) {
// Masking out so that Lion doesn't doublefault
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
outb(0x21, 0xff);/* Maskout all interrupts Pic1 */
outb(0xa1, 0xff);/* Maskout all interrupts Pic2 */
// Jump to kernel's entry point. There's no going back now.
startprog( kernelEntry, bootArgsPreLion );
}
// Not reached
return 0;
// Not reached
return 0;
}
//==========================================================================
else if (checkOSVersion("10.6")) {
sprintf(gBootKernelCacheFile, "kernelcache_%s", (archCpuType == CPU_TYPE_I386) ? "i386" : "x86_64");
int lnam = sizeof(gBootKernelCacheFile) + 9; //with adler32
//Slice - TODO
/*
- but the name is longer .adler32 and more...
kernelcache_i386.E102928C.qSs0
so will opendir and scan for some files
*/
//Slice - TODO ???
// e.g. kernelcache_i386.E102928C.qSs0 = "unsaved" cache file.
//
// See kext_tools-180.2.1/kextcache_main.c:
// "Source directory has changed since starting; "
// "not saving cache file %s."
// or
// "Source kernel has changed since starting; "
// "not saving cache file %s."
char* name;
long prev_time = 0;
do {
if (trycache) {
bootFile = gBootKernelCacheFile;
verbose("Loading kernel cache %s\n", bootFile);
if (checkOSVersion("10.7")) {
ret = LoadThinFatFile(bootFile, &binary);
}
ret = LoadFile(bootFile);
binary = (void *)kLoadAddr;
}
if (ret >= 0)
break;
verbose("Kernel cache did not loaded %s\n ", bootFile);
}
bootFile = bootInfo->bootFile;
// Try to load kernel image from alternate locations on boot helper partitions.
ret = LoadThinFatFile(bootFileSpec, &binary);
}
}
} while (0);
clearActivityIndicator();
// chainboot
if (status==1) {
if (getVideoMode() == GRAPHICS_MODE) {// if we are already in graphics-mode,
setVideoMode(VGA_TEXT_MODE, 0);// switch back to text mode
}
if (getVideoMode() == GRAPHICS_MODE) {// if we are already in graphics-mode,
setVideoMode(VGA_TEXT_MODE, 0);// switch back to text mode
}
}
if ((gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit) {
branches/iFabio/Chameleon/i386/boot2/boot.h
6060
6161
6262
63
6463
6564
6665
......
7069
7170
7271
72
7373
7474
7575
76
7776
7877
7978
......
169168
170169
171170
172
173
174
175
171
172
173
174
176175
177
178
179
180
176
177
178
179
181180
182181
183182
#define kWaitForKeypressKey"Wait"
#define kUseAtiROM"UseAtiROM"/* ati.c */
#define kAtiConfig"AtiConfig"/* ati.c */
#define kATYbinimage"ATYbinimage"/* ati.c */
#define kProductVersion"ProductVersion"/* boot.c */
#define karch"arch"/* boot.c */
#define kUseKernelCache"UseKernelCache"/* boot.c */
#define kDSDT"DSDT"/* acpi_patcher.c */
#define kDropSSDT"DropSSDT"/* acpi_patcher.c */
#define kRestartFix"RestartFix"/* acpi_patcher.c */
#define kGeneratePStates"GeneratePStates"/* acpi_patcher.c */
#define kGenerateCStates"GenerateCStates"/* acpi_patcher.c */
#define kEnableC2States"EnableC2State"/* acpi_patcher.c */
extern void spinActivityIndicator();
extern void clearActivityIndicator();
extern void drawColorRectangle( unsigned short x,
unsigned short y,
unsigned short width,
unsigned short height,
unsigned char colorIndex );
unsigned short y,
unsigned short width,
unsigned short height,
unsigned char colorIndex );
extern void drawDataRectangle( unsigned short x,
unsigned short y,
unsigned short width,
unsigned short height,
unsigned char * data );
unsigned short y,
unsigned short width,
unsigned short height,
unsigned char * data );
extern int
convertImage( unsigned short width,
unsigned short height,
branches/iFabio/Chameleon/i386/boot2/modules.c
1010
1111
1212
13
1314
1415
1516
......
4041
4142
4243
44
45
46
47
4348
4449
4550
......
8792
8893
8994
95
96
97
98
99
100
90101
102
91103
92104
93105
#include "boot.h"
#include "bootstruct.h"
#include "modules.h"
#include "boot_modules.h"
#if CONFIG_MODULE_DEBUG
*/
int init_module_system()
{
// Start any modules that were compiled in first.
start_built_in_modules();
int retVal = 0;
void (*module_start)(void) = NULL;
char* module_data = symbols_module_start + BOOT2_ADDR;
return retVal;
}
void start_built_in_module(char* name, void(*start_function)(void))
{
start_function();
// Notify the module system that this module really exists, specificaly, let other module link with it
module_loaded(name /*, moduleName, moduleVersion, moduleCompat*/);
}
/*
* Load all modules in the /Extra/modules/ directory
* Module depencdies will be loaded first
branches/iFabio/Chameleon/i386/boot2/modules.h
44
55
66
7
78
89
910
......
5354
5455
5556
57
5658
5759
5860
......
105107
106108
107109
108
110
*
*/
#include <saio_types.h>
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
int init_module_system();
void load_all_modules();
void start_built_in_module(char* name, void(*start_function)(void));
int load_module(char* module);
/********************************************************************************/
void dyld_stub_binder();
#endif /* __BOOT_MODULES_H */
#endif /* __BOOT_MODULES_H */
branches/iFabio/Chameleon/i386/boot2/gui.c
180180
181181
182182
183
183
184
184185
185186
186187
......
202203
203204
204205
205
206
206
207
207208
208209
209
210
210211
211
212
212213
213214
214215
......
220221
221222
222223
223
224
224225
225226
226227
......
10621063
10631064
10641065
1065
1066
1066
1067
10671068
10681069
10691070
10701071
1071
1072
10721073
10731074
1075
10741076
10751077
10761078
static bool infoMenuNativeBoot = false;
static unsigned long screen_params[4] = {DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, 32, 0};// here we store the used screen resolution
// here we store the used screen resolution
static unsigned long screen_params[4] = {DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, 32, 0};
static int getImageIndexByName(const char *name)
{
int result;
// NOTE: This algorithm assumes that the embedded images are sorted.
// This is currently done using the make file. If the array is ever
// manually generated, this *will* fail to work properly.
// This is currently done using the make file. If the array is
// generated manualy, this *will* fail to work properly.
while((result = strcmp(name, embeddedImages[compareIndex].name)) != 0)
{
if(result > 0)// We need to search a HIGHER index
if (result > 0)// We need to search a HIGHER index
{
if(compareIndex != lowerLimit)
if (compareIndex != lowerLimit)
{
lowerLimit = compareIndex;
}
}
else // We Need to search a LOWER index
{
if(compareIndex != upperLimit)
if (compareIndex != upperLimit)
{
upperLimit = compareIndex;
}
char * last_str;
};
static void
sputc(int c, struct putc_info * pi)
static int
sputc(int c, struct putc_info * pi) //Azi: exists on console.c & printf.c
{
if (pi->last_str)
if (pi->str == pi->last_str) {
*(pi->str) = '\0';
return;
return 0;
}
*(pi->str)++ = c;
return c;
}
int gprintf( window_t * window, const char * fmt, ...)
branches/iFabio/Chameleon/i386/boot2/options.c
14861486
14871487
14881488
1489
1489
14901490
14911491
14921492
default:
if (isxdigit(key & kASCIIKeyMask) && digitsI < 2) {
putc(key & kASCIIKeyMask);
putchar(key & kASCIIKeyMask);
digits[digitsI++] = key & kASCIIKeyMask;
} else {
// TODO: Beep or something
branches/iFabio/Chameleon/i386/config/Makefile
4747
4848
4949
50
50
5151
5252
5353
......
5555
5656
5757
58
58
config: $(DIRS_NEEDED) $(SYMPROG)
@cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig
rebuild_config: $(DIRS_NEEDED) $(SYMPROG)
@cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig rebuild
.PHONY: config
#dependencies
-include $(OBJROOT)/Makedep
-include $(OBJROOT)/Makedep
branches/iFabio/Chameleon/i386/modules/Resolution/Makefile
11
22
33
4
4
55
66
77
......
99
1010
1111
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
12
MODULE_NAME = Resolution
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_START = $(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_OBJS = Resolution.o edid.o 915resolution.o
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
DEFINES=
CONFIG = hd
INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR)
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
# LIBS= -lc_static
LIBS=
VPATH = $(OBJROOT):$(SYMROOT)
SFILES =
CFILES =
HFILES =
EXPORTED_HFILES =
INSTALLED_HFILES =
OTHERFILES = Makefile
ALLSRC = $(SFILES) $(CFILES) \
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
include ../MakeInc.dir
include ../MakeInc.dir
branches/iFabio/Chameleon/i386/modules/MakeInc.dir
77
88
99
10
11
12
13
14
15
1016
1117
1218
13
14
15
16
19
1720
18
19
21
22
23
24
25
26
27
28
29
30
2031
32
33
2134
2235
2336
......
3043
3144
3245
46
47
48
49
50
51
52
53
54
55
56
3357
3458
3559
3660
3761
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
38100
39101
40102
41103
42104
43105
44
106
45107
46108
47109
......
75137
76138
77139
140
141
78142
143
144
145
146
147
148
149
79150
80
81
151
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
ifeq ($(BUILT_IN),yes)
override OBJROOT = $(SRCROOT)/obj/i386/boot2_modules/$(DIR)
override SYMROOT = $(SRCROOT)/sym/i386/
endif
include ${SRCROOT}/Make.rules
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
ifeq ($(BUILT_IN),yes)
INC = -I$(SRCROOT)/i386/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/modules/module_includes/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/
DEFINES := -D__KLIBC__ $(DEFINES)
CFLAGS:= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \
-fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h
CPPFLAGS := $(CPPFLAGS) -arch i386 -static -nostdinc++ -Wmost -Werror \
-fno-builtin -mpreferred-stack-boundary=2 \
-fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float \
-arch i386 -include $(SRCROOT)/autoconf.h
else
CFLAGS := $(CLFAGS) -nostdinc -Wmost -Werror \
-fno-builtin -mpreferred-stack-boundary=2 \
-fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float \
-arch i386 -include $(SRCROOT)/autoconf.h
endif
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
INC = -I$(SRCROOT)/i386/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/modules/module_includes/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/
DEFINES := -D__KLIBC__ $(DEFINES)
MODULE_DEPENDENCIES := $(foreach x,$(MODULE_DEPENDENCIES),-weak_library $(SYMROOT)/modules/$(x).dylib)
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
##$(error DEFINED AS $(MODULE_DEFINITION))
MODULE_DEFINITION := $(CONFIG_$(shell echo $(MODULE_NAME) | tr '[:lower:]' '[:upper:]')_MODULE)
ifeq ($(MODULE_DEFINITION),m)
ifneq ($(BUILT_IN),yes)
# Make this as a *MODULE*
all: dylib
else
# Module not selected to be compiled as a module
all:
endif
else
ifeq ($(MODULE_DEFINITION),y)
ifeq ($(BUILT_IN),yes)
# Make this *BUILT IN*
all: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(SYMROOT)/boot_modules.h $(SYMROOT)/boot_modules.c
else
# Module not selected to be built in
all:
endif
else
# Don't compile this module
all:
endif
endif
dylib: ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(SYMROOT)/modules/$(MODULE_NAME).dylib
$(SYMROOT)/modules/$(MODULE_NAME).dylib:
@echo "\t[LD] $(MODULE_NAME).dylib"
@ld -arch i386 \
-alias $(MODULE_START) start \
-alias _$(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
.PHONY: $(SYMROOT)/boot_modules.h
.PHONY: $(SYMROOT)/boot_modules.c
$(SYMROOT)/boot_modules.c:
@echo "\tstart_built_in_module(\"$(MODULE_NAME)\", &$(MODULE_START));" >> $@
$(SYMROOT)/boot_modules.h:
@echo "void $(MODULE_START)(); // $(MODULE_NAME)" >> $@
#dependencies
#-include $(OBJROOT)/Makedep
-include $(OBJROOT)/Makedep
branches/iFabio/Chameleon/i386/modules/klibc/klibc.c
1212
1313
1414
15
15
1616
17
18
1719
1820
1921
{
}
void _exit()
void _exit(int status)
{
stop("exit() called\n");
while(1) halt(); // this is never reached
}
char __toupper(char c)
branches/iFabio/Chameleon/i386/modules/klibc/Makefile
11
22
33
4
4
55
66
77
......
1111
1212
1313
14
15
14
15
1616
1717
1818
......
2121
2222
2323
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
24
MODULE_NAME = klibc
MODULE_VERSION = "1.5.20"
MODULE_COMPAT_VERSION = "1.5.20"
MODULE_START = _$(MODULE_NAME)_start
MODULE_START = $(MODULE_NAME)_start
MODULE_DEPENDENCIES =
DIR = klibc
__lshrdi3.o __moddi3.o __modsi3.o __udivdi3.o \
__udivmoddi4.o __udivmodsi4.o __udivsi3.o \
__umoddi3.o __umodsi3.o \
strntoumax.o strntoimax.o atoi.o atol.o atoll.o \
strcasecmp.o strncasecmp.o strdup.o strlcat.o strndup.o strnlen.o \
strntoumax.o strntoimax.o atol.o atoll.o \
strcasecmp.o strncasecmp.o strlcat.o strndup.o strnlen.o \
strsep.o strtoimax.o strtok_r.o strtok.o strtol.o strtoll.o strtotimespec.o strtotimeval.o \
strtoul.o strtoull.o strtoumax.o strxspn.o strpbrk.o \
bsearch.o calloc.o \
qsort.o sha1hash.o onexit.o atexit.o exit.o \
snprintf.o vsnprintf.o sscanf.o vsscanf.o\
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
DEFINES=
CONFIG = hd
INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR)
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
# LIBS= -lc_static
LIBS=
VPATH = $(OBJROOT):$(SYMROOT)
SFILES =
CFILES =
HFILES =
EXPORTED_HFILES =
INSTALLED_HFILES =
OTHERFILES = Makefile
ALLSRC = $(SFILES) $(CFILES) \
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
include ../MakeInc.dir
include ../MakeInc.dir
branches/iFabio/Chameleon/i386/modules/uClibc++/Makefile
11
2
2
33
44
5
5
66
77
88
......
1818
1919
2020
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
21
MODULE_NAME = uClibc++
MODULE_NAME = uClibcxx
MODULE_VERSION = "0.2.2"
MODULE_COMPAT_VERSION = "0.2.2"
MODULE_START = _uClibcxx_start
MODULE_START = $(MODULE_NAME)_start
MODULE_DEPENDENCIES = klibc
DIR = uClibc++
utility.o valarray.o vector.o support.o \
ios.o iostream.o istream.o ostream.o
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
DEFINES=
CONFIG = hd
INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) -Iinclude
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
# LIBS= -lc_static
LIBS=
VPATH = $(OBJROOT):$(SYMROOT)
SFILES =
CFILES =
HFILES =
EXPORTED_HFILES =
INSTALLED_HFILES =
OTHERFILES = Makefile
ALLSRC = $(SFILES) $(CFILES) \
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
include ../MakeInc.dir
include ../MakeInc.dir
branches/iFabio/Chameleon/i386/modules/Cconfig
77
88
99
10
10
11
12
13
14
source "i386/modules/klibc/Cconfig"
source "i386/modules/uClibc++/Cconfig"
source "i386/modules/HelloWorld/Cconfig"
endmenu
source "i386/modules/AMDGraphicsEnabler/Cconfig"
source "i386/modules/ATiGraphicsEnabler/Cconfig"
source "i386/modules/IntelGraphicsEnabler/Cconfig"
source "i386/modules/NVIDIAGraphicsEnabler/Cconfig"
endmenu
branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile
11
22
33
4
4
55
66
77
......
99
1010
1111
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
12
MODULE_NAME = HelloWorld
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
#MODULE_START = _$(MODULE_NAME)_start
#MODULE_START = $(MODULE_NAME)_start
MODULE_START = __Z16HelloWorld_startv
MODULE_DEPENDENCIES = uClibc++
MODULE_OBJS = HelloWorld.o
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
DEFINES=
CONFIG = hd
INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR)
LIBS=
VPATH = $(OBJROOT):$(SYMROOT)
SFILES =
CFILES =
HFILES =
EXPORTED_HFILES =
INSTALLED_HFILES =
OTHERFILES = Makefile
ALLSRC = $(SFILES) $(CFILES) \
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
include ../MakeInc.dir
include ../MakeInc.dir
branches/iFabio/Chameleon/i386/modules/Makefile
1111
1212
1313
14
14
15
1516
1617
1718
......
2223
2324
2425
25
26
2627
2728
2829
......
3738
3839
3940
41
42
43
44
45
4046
41
47
48
49
50
4251
4352
4453
54
55
56
4557
4658
4759
4860
49
61
62
63
64
65
66
67
68
69
70
71
72
73
include ${SRCROOT}/Make.rules
# The order of building is important.
SUBDIRS = klibc uClibc++ Resolution
SUBDIRS = klibc uClibc++ Resolution HelloWorld \
ATiGraphicsEnabler AMDGraphicsEnabler NVIDIAGraphicsEnabler IntelGraphicsEnabler
CFLAGS= -O3 $(MORECPP) -arch i386 -g -static
ifeq (${CONFIG_MODULES}, y)
all install: $(SYMROOT) $(OBJROOT) objroot_dirs
all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
done
@# Finish up boot_modules.c
@echo "}" >> $(SYMROOT)/boot_modules.c
else
all:
all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h
@# Finish up boot_modules.c
@echo "}" >> $(SYMROOT)/boot_modules.c
endif
.PHONY: objroot_dirs
.PHONY: $(SYMROOT)/boot_modules.h
.PHONY: $(SYMROOT)/boot_modules.c
objroot_dirs:
@rm -rf module_includes
@mkdir module_includes
@rm -rf "$(SYMROOT)/modules/"
@mkdir "$(SYMROOT)/modules/"
@mkdir "$(SYMROOT)/modules/"
$(SYMROOT)/boot_modules.c: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS})
@echo "// Autogenerated - do not modify" > $@
@echo "#include <modules.h>" >> $@
@echo "#include \"boot_modules.h\"" >> $@
@echo "void start_built_in_modules() {" >> $@
$(SYMROOT)/boot_modules.h: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS})
@echo "// Autogenerated - do not modify" > $@
@echo "void start_built_in_modules(); " > $@
branches/iFabio/Chameleon/i386/cdboot/Makefile
66
77
88
9
9
1010
1111
1212
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
DIR = cdboot
include ${SRCROOT}/Make.rules
branches/iFabio/Chameleon/i386/libsa/libsa.h
9999
100100
101101
102
102
103103
104104
105105
......
129129
130130
131131
132
132
133133
134134
135135
extern char * strstr(const char *in, const char *str);
extern int atoi(const char * str);
extern int ptol(const char * str);
extern int strlen(const char * str);
extern size_t strlen(const char * str);
extern char * strcat(char * s1, const char * s2);
extern char * strncat(char * s1, const char * s2, size_t n);
extern char * strdup(const char *s1);
/*
* prf.c
*/
extern void prf(const char * fmt, va_list ap, void (*putfn_p)(),
extern void prf(const char * fmt, va_list ap, int (*putfn_p)(),
void * putfn_arg);
/*
branches/iFabio/Chameleon/i386/libsa/printf.c
3333
3434
3535
36
37
36
37
3838
3939
4040
4141
42
42
4343
4444
45
4546
4647
4748
char * last_str;
};
static void
sputc(int c, struct putc_info * pi)
static int
sputc(int c, struct putc_info * pi) //Azi: exists on console.c & gui.c
{
if (pi->last_str)
if (pi->str == pi->last_str) {
*(pi->str) = '\0';
return;
return 0;
}
*(pi->str)++ = c;
return c;
}
/*VARARGS1*/
branches/iFabio/Chameleon/i386/libsa/string.c
9595
9696
9797
98
99
100
101
102
103
104
105
106
107
98
99
100
101
102
103
104
105
106
107
108108
109109
110110
111111
112112
113
114
115
116
117
118
119
120
121
122
113
114
115
116
117
118
119
120
121
122
123123
124124
125125
......
129129
130130
131131
132
132
133133
134134
135135
void bzero(void * dst, size_t len)
{
asm volatile ( "xorl %%eax, %%eax \n\t"
"cld \n\t"
"movl %%ecx, %%edx \n\t"
"shrl $2, %%ecx \n\t"
"rep; stosl \n\t"
"movl %%edx, %%ecx \n\t"
"andl $3, %%ecx \n\t"
"rep; stosb \n\t"
:
: "c" (len), "D" (dst)
: "memory", "%eax" );
"cld \n\t"
"movl %%ecx, %%edx \n\t"
"shrl $2, %%ecx \n\t"
"rep; stosl \n\t"
"movl %%edx, %%ecx \n\t"
"andl $3, %%ecx \n\t"
"rep; stosb \n\t"
:
: "c" (len), "D" (dst)
: "memory", "%eax" );
}
void __bzero(void * dst, size_t len)
{
asm volatile ( "xorl %%eax, %%eax \n\t"
"cld \n\t"
"movl %%ecx, %%edx \n\t"
"shrl $2, %%ecx \n\t"
"rep; stosl \n\t"
"movl %%edx, %%ecx \n\t"
"andl $3, %%ecx \n\t"
"rep; stosb \n\t"
:
: "c" (len), "D" (dst)
: "memory", "%eax" );
"cld \n\t"
"movl %%ecx, %%edx \n\t"
"shrl $2, %%ecx \n\t"
"rep; stosl \n\t"
"movl %%edx, %%ecx \n\t"
"andl $3, %%ecx \n\t"
"rep; stosb \n\t"
:
: "c" (len), "D" (dst)
: "memory", "%eax" );
}
#endif
#define tolower(c) ((int)((c) & ~0x20))
#define toupper(c) ((int)((c) | 0x20))
int strlen(const char * s)
size_t strlen(const char * s)
{
int n = 0;
while (*s++) n++;
branches/iFabio/Chameleon/i386/libsa/prf.c
6060
6161
6262
63
63
6464
6565
6666
......
9393
9494
9595
96
96
9797
9898
9999
printn(n, b, flag, minwidth, putfn_p, putfn_arg)
u_long n;
int b, flag, minwidth;
void (*putfn_p)();
int (*putfn_p)();
void *putfn_arg;
{
char prbuf[11];
void prf(
char *fmt,
unsigned int *adx,
void (*putfn_p)(),
int (*putfn_p)(),
void *putfn_arg
)
{
branches/iFabio/Chameleon/i386/libsa/Makefile
1717
1818
1919
20
20
2121
2222
2323
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float \
-nostdinc -include $(SRCROOT)/autoconf.h
CPPFLAGS := $(CPPFLAGS) -nostdinc++
INC = -I. -I$(SYMROOT) -I$(LIBSAIODIR) -I${SRCROOT}/i386/include
branches/iFabio/Chameleon/i386/Makefile
11
2
32
43
54
......
1514
1615
1716
18
19
20
2117
2218
2319
2420
21
2522
2623
2724
#Makefile for i386 boot program
#define FLOPPY and SMALL using DEFINES macro as necessary
#
# these paths are only valid in subdirectories of this directory
include ${SRCROOT}/Make.rules
VPATH = $(OBJROOT):$(SYMROOT)
# The order of building is important.
SUBDIRS = util libsa libsaio boot0 boot1 boot2 cdboot modules
all:
@cd modules; ${MAKE} BUILT_IN=yes all
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
branches/iFabio/Chameleon/package/slimpkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#!/bin/bash
# $1 Path to store built package
packagesidentity="org.chameleon"
packagename="C2RC5"
pkgroot="${0%/*}"
COL_BLACK="\x1b[30;01m"
COL_RED="\x1b[31;01m"
COL_GREEN="\x1b[32;01m" #COL_GREEN="\x1b[32;01m"
COL_YELLOW="\x1b[33;01m"
COL_MAGENTA="\x1b[35;01m"
COL_CYAN="\x1b[36;01m"
COL_WHITE="\x1b[37;01m"
COL_BLUE="\x1b[34;01m"
COL_RESET="\x1b[39;49;00m"
#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
distributioncount=0
xmlindent=0
indent[0]="\t"
indent[1]="\t\t"
indent[2]="\t\t\t"
indent[3]="\t\t\t\t"
main ()
{
# clean up the destination path
rm -R -f "${1}"
echo ""
echo -e $COL_BLACK"---------------------------"$COL_RESET
echo -e $COL_BLACK"Building $packagename Slim Package"$COL_RESET
echo -e $COL_BLACK"---------------------------"$COL_RESET
echo ""
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
# build core package
echo "================= Core ================="
((xmlindent++))
packagesidentity="org.chameleon"
mkdir -p ${1}/Core/Root/usr/sbin
mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
# cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
fixperms "${1}/Core/Root/"
cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin
#cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo "[BUILD] i386 "
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# build Chameleon package
echo "================= Chameleon ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
# build standard package
mkdir -p ${1}/Standard/Root
mkdir -p ${1}/Standard/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
echo "[BUILD] Standard "
buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build standard package
# build efi package
mkdir -p ${1}/EFI/Root
mkdir -p ${1}/EFI/Scripts/Tools
cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
echo "[BUILD] EFI "
buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
# build reset choice package
mkdir -p ${1}/noboot/Root
echo "[BUILD] Reset choice "
buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
# End build reset choice package
# build Modules package
echo "================= Modules ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.module"
modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#modules[@]} ; i++ ))
do
mkdir -p "${1}/${modules[$i]##*/}/Root"
mkdir -p "${1}/${modules[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${modules[$i]##*/} "
buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Modules packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Chameleon package
# build post install package
echo "================= Post ================="
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
echo "[BUILD] Post "
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
# build meta package
makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
# clean up
rm -R -f "${1}"
}
fixperms ()
{
# $1 path
find "${1}" -type f -exec chmod 644 {} \;
find "${1}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${1}"
}
buildpackage ()
{
# $1 Path to package to build containing Root and or Scripts
# $2 Install Location
# $3 Size
# $4 Options
if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
local packagename="${1##*/}"
local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
find "${1}" -name '.DS_Store' -delete
local filecount=$( find "${1}/Root" | wc -l )
if [ "${3}" ]; then
local installedsize="${3}"
else
local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
fi
local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
header+="identifier=\"${identifier}\" "
header+="version=\"${version}\" "
[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
header+="auth=\"root\">\n"
header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
if [ -d "${1}/Scripts" ]; then
header+="\t<scripts>\n"
for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
do
header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
done
header+="\t</scripts>\n"
chown -R 0:0 "${1}/Scripts"
pushd "${1}/Scripts" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
popd >/dev/null
fi
header+="</pkg-info>"
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"
popd >/dev/null
pushd "${1}/Temp" >/dev/null
xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
popd >/dev/null
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
if [ "${4}" ]; then
local choiceoptions="${indent[$xmlindent]}${4}\n"
fi
choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"
rm -R -f "${1}"
fi
}
makedistribution ()
{
rm -f "${1%/*}/${packagename// /}"*.pkg
find "${1}" -type f -name '*.pkg' -depth 1 | while read component
do
mkdir -p "${1}/${packagename}/${component##*/}"
pushd "${1}/${packagename}/${component##*/}" >/dev/null
xar -x -f "${1%}/${component##*/}"
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
for (( i=0; i < ${#outline[*]} ; i++));
do
echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
done
for (( i=0; i < ${#choices[*]} ; i++));
do
echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
done
echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
stage=${stage/RC/Release Candidate }
stage=${stage/FINAL/2.0 Final}
perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
find "${1}/${packagename}" -name '.DS_Store' -delete
pushd "${1}/${packagename}" >/dev/null
xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
popd >/dev/null
# Here is the place for assign a Icon to the pkg
ditto -xk "${pkgroot}/Icon.zip" "${pkgroot}/"
DeRez -only icns "${pkgroot}/Icon/Icon.icns" > tempicns.rsrc
Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
rm -f tempicns.rsrc
rm -rf "${pkgroot}/Icon"
# End
echo ""
echo -e $COL_BLACK"--------------------------------"$COL_RESET
echo -e $COL_BLACK"Building $packagename process complete!"$COL_RESET
echo -e $COL_BLACK"--------------------------------"$COL_RESET
echo ""
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
branches/iFabio/Chameleon/package/builddmg
11
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
#!/bin/bash
# $1 Path to store built package
packagesidentity="org.chameleon"
packagename="Chameleon"
pkgroot="${0%/*}"
COL_BLACK="\x1b[30;01m"
COL_RED="\x1b[31;01m"
COL_GREEN="\x1b[32;01m" #COL_GREEN="\x1b[32;01m"
COL_YELLOW="\x1b[33;01m"
COL_MAGENTA="\x1b[35;01m"
COL_CYAN="\x1b[36;01m"
COL_WHITE="\x1b[37;01m"
COL_BLUE="\x1b[34;01m"
COL_RESET="\x1b[39;49;00m"
#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
distributioncount=0
xmlindent=0
indent[0]="\t"
indent[1]="\t\t"
indent[2]="\t\t\t"
indent[3]="\t\t\t\t"
main ()
{
# clean up the destination path
rm -R -f "${1}"
echo ""
echo -e $COL_BLACK"----------------------------------"$COL_RESET
echo -e $COL_BLACK"Building $packagename Install Package"$COL_RESET
echo -e $COL_BLACK"----------------------------------"$COL_RESET
echo ""
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
# build core package
echo "================= Core ================="
((xmlindent++))
packagesidentity="org.chameleon"
mkdir -p ${1}/Core/Root/usr/sbin
mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
# cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
fixperms "${1}/Core/Root/"
cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin
#cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo "[BUILD] i386 "
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# build Chameleon package
echo "================= Chameleon ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
# build standard package
mkdir -p ${1}/Standard/Root
mkdir -p ${1}/Standard/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
echo "[BUILD] Standard "
buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build standard package
# build efi package
mkdir -p ${1}/EFI/Root
mkdir -p ${1}/EFI/Scripts/Tools
cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
echo "[BUILD] EFI "
buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
# build reset choice package
mkdir -p ${1}/noboot/Root
echo "[BUILD] Reset choice "
buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
# End build reset choice package
# build Modules package
echo "================= Modules ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.module"
modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#modules[@]} ; i++ ))
do
mkdir -p "${1}/${modules[$i]##*/}/Root"
mkdir -p "${1}/${modules[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${modules[$i]##*/} "
buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Modules packages
# build bdmesg package
#mkdir -p ${1}/Bdmesg/Root
#cp -f ${1%/*}/i386/bdmesg ${1}/Bdmesg/Root
#fixperms "${1}/Bdmesg/Root/"
# echo "[BUILD] bdmesg "
#buildpackage "${1}/Bdmesg" "/usr/sbin/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# End build bdmesg package
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Chameleon package
# build Extras package
echo "================= Extras ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"
choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.extras.com"
# build utility package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"
choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.utility.com"
# build package for Chameleon PrefPanel
mkdir -p "${1}/PrefPanel/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
echo "[BUILD] Chameleon Preference Panel "
buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for Chameleon PrefPanel
# build package for SMBIOSDefault
mkdir -p "${1}/SMBIOSDefault/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
echo "[BUILD] SMBIOSDefault "
buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for SMBIOSDefault
# build package for EFIMounter
mkdir -p "${1}/EFIMounter/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
echo "[BUILD] EFIMounter "
buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for EFIMounter
# build package for Documentation
mkdir -p "${1}/Documentation/Root"
cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
echo "[BUILD] Documentation "
buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for Documentation
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# build options packages
echo "================= Options ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
((xmlindent++))
# build base options packages
packagesidentity="org.chameleon.options.com"
options=($( find "${pkgroot}/Scripts/BaseOptions" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#options[@]} ; i++ ))
do
mkdir -p "${1}/${options[$i]##*/}/Root"
mkdir -p "${1}/${options[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${options[$i]##*/} "
buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
done
# End build base options packages
# build resolution packages
echo "================= Res. Options ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"
choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.resolution"
resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#resolutions[@]} ; i++ ))
do
mkdir -p "${1}/${resolutions[$i]##*/}/Root/"
mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${resolutions[$i]##*/} "
buildpackage "${1}/${resolutions[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build resolution packages
# build Advanced packages
echo "================= Adv. Options ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Advanced\">"
choices[$((choicescount++))]="<choice\n\tid=\"Advanced\"\n\ttitle=\"Advanced_title\"\n\tdescription=\"Advanced_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.advanced.options.pkg"
optionsadv=($( find "${pkgroot}/Scripts/Advanced" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#optionsadv[@]} ; i++ ))
do
mkdir -p "${1}/${optionsadv[$i]##*/}/Root"
mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${optionsadv[$i]##*/} "
buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Advanced packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages
# build theme packages
echo "================= Themes ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"
choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.theme.pkg"
artwork="${1%/*}"
themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#themes[@]} ; i++ ))
do
theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )
mkdir -p "${1}/${theme}/Root/"
ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+
find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+
echo "[BUILD] ${themes[$i]##*/} "
buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build theme packages
# build kext packages
echo "================= Kexts ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"
choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.kext.pkg"
kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))
for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
do
filename="${kexts[$i]##*/}"
mkdir -p "${1}/${filename%.kext}/Root"
ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
fixperms "${1}/${filename%.kext}/Root"
chown 501:20 "${1}/${filename%.kext}/Root"
echo "[BUILD] ${filename%.kext} "
buildpackage "${1}/${filename%.kext}" "/Extra/Extensions" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${filename%.kext}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build kext packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Extras package
# build post install package
echo "================= Post ================="
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
echo "[BUILD] Post "
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
# build meta package
makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
# clean up
rm -R -f "${1}"
}
fixperms ()
{
# $1 path
find "${1}" -type f -exec chmod 644 {} \;
find "${1}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${1}"
}
buildpackage ()
{
# $1 Path to package to build containing Root and or Scripts
# $2 Install Location
# $3 Size
# $4 Options
if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
local packagename="${1##*/}"
local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
find "${1}" -name '.DS_Store' -delete
local filecount=$( find "${1}/Root" | wc -l )
if [ "${3}" ]; then
local installedsize="${3}"
else
local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
fi
local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
header+="identifier=\"${identifier}\" "
header+="version=\"${version}\" "
[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
header+="auth=\"root\">\n"
header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
if [ -d "${1}/Scripts" ]; then
header+="\t<scripts>\n"
for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
do
header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
done
header+="\t</scripts>\n"
chown -R 0:0 "${1}/Scripts"
pushd "${1}/Scripts" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
popd >/dev/null
fi
header+="</pkg-info>"
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"
popd >/dev/null
pushd "${1}/Temp" >/dev/null
xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
popd >/dev/null
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
if [ "${4}" ]; then
local choiceoptions="${indent[$xmlindent]}${4}\n"
fi
choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"
rm -R -f "${1}"
fi
}
makedistribution ()
{
rm -f "${1%/*}/${packagename// /}"*.pkg
find "${1}" -type f -name '*.pkg' -depth 1 | while read component
do
mkdir -p "${1}/${packagename}/${component##*/}"
pushd "${1}/${packagename}/${component##*/}" >/dev/null
xar -x -f "${1%}/${component##*/}"
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
for (( i=0; i < ${#outline[*]} ; i++));
do
echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
done
for (( i=0; i < ${#choices[*]} ; i++));
do
echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
done
echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
# Adding Package type test (not translated)
#perl -i -p -e "s/%PKGTYPE%/TEST/g" `find "${1}/${packagename}/Resources" -type f`
#
stage=${stage/RC/Release Candidate }
stage=${stage/FINAL/2.0 Final}
perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
find "${1}/${packagename}" -name '.DS_Store' -delete
pushd "${1}/${packagename}" >/dev/null
xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
popd >/dev/null
# Here is the place for assign a Icon to the pkg
# command use to generate the file:
# ditto -c -k --sequesterRsrc --keepParent Icon.icns Icon.zip
ditto -xk "${pkgroot}/Icon.zip" "${pkgroot}/"
DeRez -only icns "${pkgroot}/Icon/Icon.icns" > tempicns.rsrc
Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
rm -f tempicns.rsrc
rm -rf "${pkgroot}/Icon"
# End
md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} )
echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5"
echo ""
echo -e $COL_BLACK"--------------------------"$COL_RESET
echo -e $COL_BLACK"Building process complete!"$COL_RESET
echo -e $COL_BLACK"--------------------------"$COL_RESET
echo ""
echo -e $COL_BLACK"Build info."
echo -e $COL_BLACK"==========="
echo -e $COL_BLUE"Package name:"$COL_BLACK"$packagename-${version}-r$revision.pkg"$COL_RESET
echo -e $COL_BLUE"MD5:"$COL_BLACK"$md5"$COL_RESET
echo -e $COL_BLUE"Version:"$COL_BLACK"$version"$COL_RESET
echo -e $COL_BLUE"Stage:"$COL_BLACK"$stage"$COL_RESET
echo -e $COL_BLUE"Date/Time:"$COL_BLACK"$builddate"$COL_RESET
echo ""
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
branches/iFabio/Chameleon/TODO
11
22
3
3
4
5
6
7
8
49
510
611
712
8
9
13
14
1015
1116
17
1218
1319
14
15
16
17
20
21
22
23
24
25
1826
1927
2028
21
22
23
24
29
30
31
32
33
2534
26
27
35
36
2837
38
2939
3040
3141
......
6979
7080
7181
72
82
7383
TODO List for Chameleon Boot Loader
====================================
- Setup makefile to use module config for determining which modules to compile in and which to compile as modules
- Bring code closer to coding_standards.txt:
- will change spaces to tabs! If someone opposes to this, please come forward :)
- Create a dummy module for any modules that are compiled in. This is needed for linking modules with
dependencies that are not compiled in.
- Fix the module system when booting chameleon with multiboot. Cleanup the xcode 4 fix.
- Integrate Prasys current work on options and quick shortcut modified version of 18seven
- Add auto detection of efistring algorithm to enable graphics enabler to be enabled by default while not
conflicting with other efi string overriden content
- Add auto detection of efi string algorithm, so graphics enabler can be enabled by default while not
conflicting with other efi string overridden content
(original idea of Galaxy)
Azi: done?
- Add a more sophisticated acpi loading mechanism to enable loading custom acpi tables when dsdtdrop=y
Here's a specification to think about:
First we must care about if a forced DSDT full path has been specified (was the pb smith had in
his first tries) and take it for the DSDT path as is.
Then we have the case where no DSDT path was set where we run our usual DSDT search algorithm to find this file.
In the latter case, the file has to be named DSDT.aml and be in one of the / /Extra or bt(0,0)/Extra directory.
First we must care about if a forced DSDT full path has been specified
(was what pb smith had in his first tries) and take it for the DSDT path as is.
Then we have the case where no DSDT path was set where we run our usual DSDT search algorithm to
find this file.
In the latter case, the file has to be named DSDT.aml and be in one of the / /Extra or bt(0,0)/Extra
directory.
Now a first idea to implement correctly the acpi tables loading would be:
Whatever the path was hardcoded in the DSDT option or was automatically found, we extract the path part of
the DSDT file that has been successfully found and we run a loop to enumerate all other acpi files in the same directory.
Now for each acpi file found, we should compare the name with an existing acpi table found in the system that
we would normally load and replace this usual injection by the content of the file.
Whether the path was hardcoded in the DSDT option or was automatically found, we extract the path part
of the DSDT file that has been successfully found and we run a loop to enumerate all other acpi
files in the same directory.
Now for each acpi file found, we should compare the name with an existing acpi table found in
the system that we would normally load and replace this usual injection by the content of the file.
Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of user
to provide any other acpi table.
Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of the
user to provide any other acpi table.
Azi: done?
- Add a new module capable of writing proprietary Chameleon data to ioreg:
Using the DT__xxx() API, we will create a set of functions to write
to log info, chameleon boot info to be retrieved by helper applications...
getc();
}
- Case unsensitive parsing for the bootConfig options:
- Case insensitive parsing for the bootConfig options:
should help the common/novice user to setup more easily.
branches/iFabio/Chameleon/Make.rules
8888
8989
9090
91
92
93
94
95
96
9197
9298
9399
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
#$(OBJROOT)/boot_modules.o:
#@echo "\t[AS] boot_modules.s"
#@cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $(SYMROOT)/boot_modules.s \
# -MD -dependency-file $*.d
#@md -u $(OBJROOT)/Makedep -f -d $*.d
$(OBJROOT)/%.o: %.s
@echo "\t[AS] $<"
branches/iFabio/Chameleon/CHANGES
1
12
2
3
4
35
46
57
......
3133
3234
3335
34
36
3537
3638
3739
......
4042
4143
4244
43
45
4446
4547
4648
47
49
50
4851
4952
5053
5154
5255
5356
54
57
5558
5659
5760
- Modules can now be selected between not compiled, compiled into chameleon, or compiled as modules.
- New makefile + configuration system.
- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in mboot.c to relocate the correct number of bytes for boot2.
- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in mboot.c to relocate the correct
number of bytes for boot2.
- Added new ATi/AMD Graphics Card Enabler.
- Added new SMBIOS patcher.
- Added module system.
- Added ATI new framebuffers support and new cards from PCEFI10.6
- improved ACPI file search algo by implementing a cache.
- Nvidia injection fix
- pciroot would not always return correct uuid in autodection mode
- pciroot would not always return correct UID in autodection mode
- Fixed the hibernation problem in boot2/resume.c
- Fixed all new booter versions with SystemType would override the facp value even if correct,
now keeps the facp value if correct and no override has been done, implemented a best effort algo.
conversions api, to be completed by function that we should reuse.
- Fixed SystemType would be always forced to a value, now optionally changed
only if overidden
only if overridden
- Kept SystemID as the only option to change manually the system-id
For theses reasons, SystemId from bootConfig and SMUUID from smbiosConfig are now DEPRECATED.
- Integrated JrCs fadt patch (kept for RC5 the existing DSDT.aml retry algo that disappeared in his patch, should be more discussed for RC6)
- Integrated JrCs fadt patch (kept for RC5 the existing DSDT.aml retry algo that disappeared in his patch,
should be more discussed for RC6)
- Added JrCs modified convention name change to coding_standards
- Now malloc (ex. MALLOC in Asere patch) is renamed malloc(size) and is an alias
to safe_malloc(size, file, line) with _FILE_ and _LINE_ preprocessor definitions
- Added a new 'Rename Partition Feature', now permitting to rename partition
like 'System reserved' to a more meaningful name
- Added SystemID option permitting to change the System UUID to a fixed value.
- Added the PciRoot autodetection feature imported from pcefi10.5
- Added the PciRoot auto detection feature imported from pcefi10.5
- Added automatic "system-id" injection from dmi bios, also compatible
with SystemID boot option and former SMUUID from smbios,plist
- Added "system-type' automatic injection (1=Desktop) plus override possibility
branches/iFabio/Chameleon/Makefile
4848
4949
5050
51
5251
52
5353
5454
5555
......
9797
9898
9999
100
100
101101
102102
103103
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$$XCFLAGS" $@ \
) || exit $$?; \
all: $(SYMROOT) $(OBJROOT) $(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/autoconf.inc $(SRCROOT)/.config
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi
@if [ -z "$(RC_ARCHS)" ]; then \
dmg: all
@if [ -e "$(SYMROOT)" ]; then \
sudo `pwd`/package/builddmg `pwd`/sym/package; \
sudo `pwd`/package/slimpkg `pwd`/sym/package; \
fi;
.PHONY: config

Archive Download the corresponding diff file

Revision: 298