Chameleon

Chameleon Commit Details

Date:2011-05-27 16:34:42 (9 years 6 months ago)
Author:Evan Lojewski
Commit:896
Parents: 895
Message:Notify the module system whenever a compiled in module is stated. Needed for runtime linking. NOTE: Compile time linkin is currently broken for modules with dependencies that are compiled in.
Changes:
M/trunk/i386/modules/Makefile
M/trunk/TODO
M/trunk/i386/modules/MakeInc.dir
M/trunk/i386/boot2/modules.c
M/trunk/i386/boot2/modules.h

File differences

trunk/i386/boot2/modules.c
9292
9393
9494
95
96
97
98
99
100
95101
102
96103
97104
98105
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
trunk/i386/boot2/modules.h
44
55
66
7
78
89
910
......
5354
5455
5556
57
5658
5759
5860
*
*/
#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);
trunk/i386/modules/MakeInc.dir
141141
142142
143143
144
144
145145
146146
147147
.PHONY: $(SYMROOT)/boot_modules.c
$(SYMROOT)/boot_modules.c:
@echo "\t$(MODULE_START)(); // $(MODULE_NAME)" >> $@
@echo "\tstart_built_in_module(\"$(MODULE_NAME)\", &$(MODULE_START));" >> $@
$(SYMROOT)/boot_modules.h:
@echo "void $(MODULE_START)(); // $(MODULE_NAME)" >> $@
trunk/i386/modules/Makefile
6262
6363
6464
65
6566
6667
6768
$(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() {" >> $@
trunk/TODO
11
22
3
34
45
56
TODO List for Chameleon Boot Loader
====================================
- 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

Archive Download the corresponding diff file

Revision: 896