Chameleon

Chameleon Commit Details

Date:2011-05-15 06:28:28 (8 years 1 month ago)
Author:Azimutz
Commit:818
Parents: 817
Message:Fixed compilation issues. Removed most of the "pretty print"; breaks "make -s"(silent) which i like way better; will play with this later. On to testing... i already know the outcome, just taking the chance to document it. (still not in a working state).
Changes:
M/branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/nvidia.c
M/branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/ati.c
M/branches/azimutz/Chazi/i386/modules/HPET/Makefile
M/branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/GraphicsEnablerLegacy.c
M/branches/azimutz/Chazi/i386/modules/Makefile
M/branches/azimutz/Chazi/i386/modules/Resolution/Makefile
M/branches/azimutz/Chazi/i386/util/Makefile
M/branches/azimutz/Chazi/i386/modules/MakeInc.dir
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/nvidia.c
M/branches/azimutz/Chazi/i386/modules/Memory/Makefile
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/ati.c
M/branches/azimutz/Chazi/i386/modules/HelloWorld/Makefile
M/branches/azimutz/Chazi/i386/boot2/Makefile
M/branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/Makefile
M/branches/azimutz/Chazi/doc/BootHelp.txt
M/branches/azimutz/Chazi/i386/modules/klibc/Makefile
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/GraphicsEnabler.c
M/branches/azimutz/Chazi/i386/modules/uClibc++/Makefile
M/branches/azimutz/Chazi/i386/modules/KernelPatcher/Makefile
M/branches/azimutz/Chazi/i386/boot2/modules.c
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/Makefile
M/branches/azimutz/Chazi/i386/boot2/boot.h
M/branches/azimutz/Chazi/i386/libsaio/bootstruct.h

File differences

branches/azimutz/Chazi/i386/libsaio/bootstruct.h
2828
2929
3030
31
32
33
34
35
36
31
3732
38
33
3934
35
4036
4137
4238
//Azi: this is acting now as a mini libsaio.h :P
//#include "libsaio.h"
//#include "bios.h"
//#include "libsa.h"
//#include "saio_types.h"
//#include "saio_internal.h"
//#include "device_tree.h"
#include "bootargs.h"
#include "libsa.h"
#include "saio_types.h"
#include "bios.h"
#include "saio_internal.h"
#include "device_tree.h"
#include "bootargs.h"
/*!
Kernel boot args global also used by booter for its own data.
branches/azimutz/Chazi/i386/boot2/Makefile
7474
7575
7676
77
78
77
7978
8079
8180
82
81
8382
84
85
86
83
84
8785
88
89
86
9087
9188
9289
9390
94
95
91
92
9693
97
98
99
94
95
10096
101
102
103
97
98
10499
105100
106101
107
102
108103
109104
110105
......
112107
113108
114109
110
115111
116
117
118
119
120
121
122
123
124
125
112
113
114
115
116
117
118
119
126120
127121
128122
......
131125
132126
133127
134
128
135129
130
136131
137132
138133
......
142137
143138
144139
145
146140
147141
148142
embedtheme: art.h all
boot: machOconv embedded.h $(OBJS) $(LIBDEP)
@echo "\t[LD] boot.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@cp $(SYMROOT)/boot.sys $(SYMROOT)/boot2.sys
cp $(SYMROOT)/boot.sys $(SYMROOT)/boot2.sys
@# Generate the Symbols.dylib file
@echo "\t[dyldsymboltool] Symbols.dylib"
@$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE}
# Generate the Symbols.dylib file
$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE}
@echo "\t[LD] boot.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
$(LD) -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
@# Second pass, fixup global var locations
@${RM} $(SYMROOT)/${SYMBOLS_MODULE}
# Second pass, fixup global var locations
${RM} $(SYMROOT)/${SYMBOLS_MODULE}
@# Generate the Symbols.dylib file
@echo "\t[dyldsymboltool] Symbols.dylib"
@$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE}
# Generate the Symbols.dylib file
$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE}
@${RM} $(SYMROOT)/boot.sys
@echo "\t[LD] boot.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
${RM} $(SYMROOT)/boot.sys
$(LD) -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
#Azi: @ ??
@ld -arch i386 \
-undefined dynamic_lookup \
-dylib -read_only_relocs suppress \
-no_uuid \
-final_output Symbols \
$(filter %.o,$^) $(LIBS) \
-macosx_version_min 10.6 \
-o $(OBJROOT)/Symbols_LINKER_ONLY.dylib
@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
#Azi: -macosx_version_min warning
# @ ??
# this is done in a sub process after boot.sys exists so the strings are populated correctly
@make embed_symbols
#Azi: @ ??
${RM} $(SYMROOT)/boot2.sys
#Azi: @ ??
ls -l $(SYMROOT)/boot
@( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \
if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\
then \
exit 1;\
fi)
embed_symbols: machOconv
#Azi: @ ??
@echo ================= Embedding Symbols.dylib =================
@echo "\t[MACHOCONV] boot"
@$(SYMROOT)/machOconv $(SYMROOT)/boot2.sys $(SYMROOT)/boot &> /dev/null
@echo "\t[MACHOCONV] boot"
@$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot
prompt.o: vers.h
vers.h:
branches/azimutz/Chazi/i386/boot2/boot.h
109109
110110
111111
112
112
113
114
115
116
113117
114118
115119
#define kWakeKey "Wake" // boot.cgetBoolFK
#define kForceWakeKey "ForceWake" // boot.cgetBoolFK
#define kWakeKeyImageKey "WakeImage" // boot.cgetValFK- location???
#define kUseAtiROMKey "UseAtiROM" // ati.cgetBoolFK
#define kUseAtiROMKey "UseAtiROM" // ati.cgetBoolFK ?? modules
#define kAtiConfigKey "AtiConfig" // ati.cgetStringFK
#define kATYbinimageKey "ATYbinimage" // ati.cgetBoolFK
#define kUseNvidiaROMKey "UseNvidiaROM" // nvidia.cgetBoolFK
#define kVBIOSKey "VBIOS" // nvidia.cgetBoolFK
#define kGraphicsModeKey "Graphics Mode" // graphics.cgetNumberArraiFP- kFlag
branches/azimutz/Chazi/i386/boot2/modules.c
22
33
44
5
56
6
7
78
89
910
1011
1112
12
1313
14
15
16
1714
1815
16
1917
2018
2119
* Copyright 2010 Evan Lojewski. All rights reserved.
*
*/
#ifndef DEBUG_MODULES
#define DEBUG_MODULES 0
#define DEBUG_MODULES 1
#endif
//#include "boot.h"
//#include "libsa.h"
//#include "saio_internal.h"
//#include "bootstruct.h"
//#include "multiboot.h"
//#include "modules.h"
#include "boot.h"
#include "bootstruct.h"
#include "modules.h"
#include "memory.h"
#if DEBUG_MODULES
branches/azimutz/Chazi/i386/modules/HPET/Makefile
77
88
99
10
10
1111
12
13
14
15
16
17
18
19
20
21
22
23
2412
2513
2614
......
3422
3523
3624
37
38
39
40
41
42
43
44
4525
4626
4727
4828
49
5029
5130
5231
......
5938
6039
6140
62
41
6342
6443
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
44
DIR = HPET
include ../../MakePaths.dir
MODULE_OBJS = HPET.o
OBJROOT=../../../obj/i386/modules/$(DIR)
SYMROOT=../../../sym/i386/modules/
DSTROOT=../../../dst/i386/modules/
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
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)
HPET_OBJS = HPET.o
SFILES =
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: ${HPET_OBJS} dylib
all embedtheme: dylib
dylib: ${HPET_OBJS}
ld -arch i386 \
-undefined dynamic_lookup \
-alias $(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
$(OBJROOT)/*.o \
-weak_library $(SYMROOT)/*.dylib \
-o $(SYMROOT)/$(MODULE_NAME).dylib
HPET.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "HPET.c" $(INC) -o "$(OBJROOT)/HPET.o"
include ../../MakeInc.dir
# dependencies
-include $(OBJROOT)/Makedep
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/Resolution/Makefile
4444
4545
4646
47
47
4848
4949
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/MakeInc.dir
1414
1515
1616
17
18
17
18
19
1920
2021
2122
......
3738
3839
3940
40
41
41
42
43
44
4245
4346
44
45
47
48
49
50
4651
4752
4853
dylib: ${OBJROOT} ${MODULE_OBJS} dylib_final
dylib_final:
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib#ensure module doesn't link with old version of self
dylib_final:
#ensure module doesn't link with old version of self
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib
@echo "\t[LD] $(MODULE_NAME).dylib"
@ld -arch i386 \
@cp -rf include/* ../module_includes/ &> /dev/null || true
%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
#@echo "\t[CC] $<"
#@
$(CC) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ \
-I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
%.o: %.cpp
@echo "\t[CPP] $<"
@$(CPP) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
#@echo "\t[CPP] $<"
#@
$(CPP) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ \
-I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
clean:
@echo "\t[RM] $(OBJROOT)"
branches/azimutz/Chazi/i386/modules/klibc/Makefile
4646
4747
4848
49
5049
5150
51
5252
5353
5454
......
5959
6060
6161
62
62
6363
6464
VPATH = $(OBJROOT):$(SYMROOT)
SFILES =
CFILES =
HFILES =
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/KernelPatcher/Makefile
1
21
32
43
......
76
87
98
10
9
1110
12
13
14
15
16
17
18
19
20
21
22
23
2411
2512
2613
......
3421
3522
3623
37
38
39
40
41
42
43
44
4524
4625
4726
4827
49
5028
5129
5230
......
5937
6038
6139
62
40
6341
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
42
MODULE_NAME = KernelPatcher
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
DIR = KernelPatcher
include ../../MakePaths.dir
MODULE_OBJS = kernel_patcher.o
OBJROOT=../../../obj/i386/modules/$(DIR)
SYMROOT=../../../sym/i386/modules/
DSTROOT=../../../dst/i386/modules/
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
OPTIM = -O3
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
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)
OBJS = kernel_patcher.o
SFILES =
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme: ${OBJS} dylib
all embedtheme: dylib
dylib: ${OBJS}
ld -arch i386 \
-undefined dynamic_lookup \
-alias $(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -dead_strip_dylibs \
-no_uuid \
-bind_at_load \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
-weak_library $(SYMROOT)/Symbols.dylib \
$(OBJROOT)/*.o \
-weak_library $(SYMROOT)/*.dylib \
-o $(SYMROOT)/$(MODULE_NAME).dylib
kernel_patcher.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "kernel_patcher.c" $(INC) -o "$(OBJROOT)/kernel_patcher.o"
include ../../MakeInc.dir
# dependencies
-include $(OBJROOT)/Makedep
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/uClibc++/Makefile
5353
5454
5555
56
56
5757
5858
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/Memory/Makefile
1
21
32
43
54
6
5
76
87
98
10
9
10
1111
12
13
14
15
16
17
18
19
20
21
22
23
2412
2513
2614
......
3422
3523
3624
37
38
39
40
41
42
43
44
4525
4626
4727
4828
49
50
51
52
53
5429
5530
5631
......
6136
6237
6338
64
39
6540
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
41
MODULE_NAME = Memory
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES = klibc
DIR = Memory
include ../../MakePaths.dir
MODULE_OBJS = dram_controllers.o spd.o Memory.o
# mem.o
OBJROOT=../../../obj/i386/modules/$(DIR)
SYMROOT=../../../sym/i386/modules/
DSTROOT=../../../dst/i386/modules/
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
OPTIM = -Os -Oz
DEBUG = -DNOTHING
#DEBUG = -DDEBUG_HELLO_WORLD=1
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)
#Azi: mem.o gone on Kabyl's
MEMORY_OBJS = dram_controllers.o spd.o Memory.o
# mem.o
SFILES =
CFILES =
HFILES =
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme: ${MEMORY_OBJS} dylib
all embedtheme: dylib
#Azi: wtf ?? graphics enabler :P
dylib: ${GRAPHICS_ENABLER_OBJS}
ld -arch i386 \
-undefined dynamic_lookup \
-alias $(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
$(OBJROOT)/*.o \
-weak_library $(SYMROOT)/*.dylib \
-o $(SYMROOT)/$(MODULE_NAME).dylib
dram_controllers.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "dram_controllers.c" $(INC) -o "$(OBJROOT)/dram_controllers.o"
Memory.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "Memory.c" $(INC) -o "$(OBJROOT)/Memory.o"
spd.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "spd.c" $(INC) -o "$(OBJROOT)/spd.o"
#Azi: gone on Kabyl's
#mem.o:
#$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "mem.c" $(INC) -o "$(OBJROOT)/mem.o"
include ../../MakeInc.dir
# dependencies
-include $(OBJROOT)/Makedep
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/GraphicsEnabler.c
3131
3232
3333
34
34
3535
3636
3737
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = false;
getBoolForKey(kGraphicsEnabler, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
if (do_gfx_devprop)
{
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/nvidia.c
788788
789789
790790
791
791
792792
793793
794794
......
930930
931931
932932
933
933
934934
935935
936936
rom = malloc(NVIDIA_ROM_SIZE);
sprintf(nvFilename, "/Extra/%04x_%04x.rom", (uint16_t)nvda_dev->vendor_id, (uint16_t)nvda_dev->device_id);
if (getBoolForKey(kUseNvidiaROM, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kUseNvidiaROMKey, &doit, &bootInfo->bootConfig) && doit) {
verbose("Looking for nvidia video bios file %s\n", nvFilename);
nvBiosOveride = load_nvidia_bios_file(nvFilename, rom, NVIDIA_ROM_SIZE);
if (nvBiosOveride > 0) {
devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4);
devprop_add_value(device, "model", (uint8_t*)model, strlen(model) + 1);
devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, strlen(biosVersion) + 1);
if (getBoolForKey(kVBIOS, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kVBIOSKey, &doit, &bootInfo->bootConfig) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/Makefile
3535
3636
3737
38
38
3939
4040
4141
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/ati.c
11411141
11421142
11431143
1144
1144
11451145
11461146
1147
1147
11481148
11491149
11501150
......
11641164
11651165
11661166
1167
1167
11681168
11691169
11701170
get_vram_size();
getBoolForKey(kATYbinimage, &add_vbios, &bootInfo->bootConfig);
getBoolForKey(kATYbinimageKey, &add_vbios, &bootInfo->bootConfig);
if (add_vbios)
if (!load_vbios_file(kUseAtiROM, pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys_id))
if (!load_vbios_file(kUseAtiROMKey, pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys_id))
{
verbose("reading VBIOS from %s", card->posted ? "legacy space" : "PCI ROM");
if (card->posted)
atN = 0;
fb_name = getStringForKey(kAtiConfig, &bootInfo->bootConfig);
fb_name = getStringForKey(kAtiConfigKey, &bootInfo->bootConfig);
if (!fb_name)
{
fb_name = card_configs[card->info->cfg_name].name;
branches/azimutz/Chazi/i386/modules/HelloWorld/Makefile
3838
3939
4040
41
41
4242
4343
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/Makefile
11
22
33
4
5
4
5
6
7
68
79
810
#Makefile for i386 modules
# The order of building is important.
SUBDIRS = klibc uClibc++ Resolution
#SUBDIRS = klibc uClibc++ Resolution HelloWorld
SUBDIRS = klibc uClibc++ GraphicsEnablerLegacy KernelPatcher Memory HPET
#SUBDIRS = HelloWorld
# Resolution (only tested on Meklort's branch, never did any good for my resolution; conflicts with AutoResolution)
# GraphicsEnabler (no support for ATI legacy cards, e.g. 1000 series)
CFLAGS= -O $(MORECPP) -arch i386 -g -static
branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/GraphicsEnablerLegacy.c
3333
3434
3535
36
36
3737
3838
3939
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = false;
getBoolForKey(kGraphicsEnabler, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
if (do_gfx_devprop)
{
branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/nvidia.c
788788
789789
790790
791
791
792792
793793
794794
......
930930
931931
932932
933
933
934934
935935
936936
rom = malloc(NVIDIA_ROM_SIZE);
sprintf(nvFilename, "bt(0,0)/Extra/%04x_%04x.rom", (uint16_t)nvda_dev->vendor_id, (uint16_t)nvda_dev->device_id);
if (getBoolForKey(kUseNvidiaROM, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kUseNvidiaROMKey, &doit, &bootInfo->bootConfig) && doit) {
verbose("Looking for nvidia video bios file %s\n", nvFilename);
nvBiosOveride = load_nvidia_bios_file(nvFilename, rom, NVIDIA_ROM_SIZE);
if (nvBiosOveride > 0) {
devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4);
devprop_add_value(device, "model", (uint8_t*)model, strlen(model) + 1);
devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, strlen(biosVersion) + 1);
if (getBoolForKey(kVBIOS, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kVBIOSKey, &doit, &bootInfo->bootConfig) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/Makefile
3535
3636
3737
38
38
3939
4040
4141
$(HFILES) $(OTHERFILES)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all embedtheme optionrom: dylib
all embedtheme: dylib
include ../MakeInc.dir
branches/azimutz/Chazi/i386/modules/GraphicsEnablerLegacy/ati.c
713713
714714
715715
716
716
717717
718718
719719
devprop_add_value(device, (char *) ati_name_1[0], (uint8_t *)tmp, strlen(tmp) + 1);
sprintf(tmp, "bt(0,0)/Extra/%04x_%04x.rom", (uint16_t)ati_dev->vendor_id, (uint16_t)ati_dev->device_id);
if (getBoolForKey(kUseAtiROM, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kUseAtiROMKey, &doit, &bootInfo->bootConfig) && doit) {
verbose("looking for ati video bios file %s\n", tmp);
rom = malloc(0x20000);
rom_size = load_ati_bios_file(tmp, rom, 0x20000);
branches/azimutz/Chazi/i386/util/Makefile
2626
2727
2828
29
30
31
32
33
34
35
2936
3037
3138
all embedtheme: $(DIRS_NEEDED) $(PROGRAMS)
dyldsymboltool: dyldsymboltool.o32 dyldsymboltool.o64
$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/$(@F).o32
$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/$(@F).o64
lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 -output $(SYMROOT)/$(@F)
$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64
machOconv: machOconv.o32 machOconv.o64
$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/$(@F).o32
$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/$(@F).o64
branches/azimutz/Chazi/doc/BootHelp.txt
1717
1818
1919
20
20
2121
2222
2323
[flags] [Wait=y key] [any other key]
WARNINGS: (feedback is welcome)
WARNINGS (OUTDATED*****): (feedback is welcome)
- At least Wait=y is breaking other keys/flags?, when typed after them. This
is the main reason for the "argument" syntax above. If you have any problem
of this nature please try the recommended syntax or play with it.

Archive Download the corresponding diff file

Revision: 818