2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
* conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod. (_multiboot_mod_SOURCES): New variable. (_multiboot_mod_CFLAGS): Likewise. * loader/i386/pc/multiboot.c: New file. * include/pupa/i386/pc/multiboot.h: Likewise. * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h. (pupa_multiboot_real_boot): New function. * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h. (pupa_multiboot_real_boot): New prototype. (pupa_rescue_cmd_multiboot): Likewise (pupa_rescue_cmd_module): Likewise. * kern/loader.c (pupa_loader_set): Continue when pupa_loader_unload_func() fails. (pupa_loader_unset): New function. * include/pupa/loader.h (pupa_loader_unset): New prototype. * kern/misc.c (pupa_stpcpy): New function. * include/pupa/misc.h (pupa_stpcpy): New prototype.
This commit is contained in:
parent
8e72a9c0e3
commit
9a5c1adeaa
11 changed files with 672 additions and 4 deletions
|
@ -403,7 +403,7 @@ genmoddep-util_genmoddep.d: util/genmoddep.c
|
|||
|
||||
# Modules.
|
||||
pkgdata_MODULES = _chain.mod _linux.mod fat.mod ext2.mod normal.mod hello.mod \
|
||||
vga.mod font.mod
|
||||
vga.mod font.mod _multiboot.mod
|
||||
|
||||
# For _chain.mod.
|
||||
_chain_mod_SOURCES = loader/i386/pc/chainloader.c
|
||||
|
@ -750,6 +750,45 @@ font_mod-font_manager.d: font/manager.c
|
|||
-include font_mod-font_manager.d
|
||||
|
||||
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
|
||||
# For _multiboot.mod.
|
||||
_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
|
||||
CLEANFILES += _multiboot.mod mod-_multiboot.o mod-_multiboot.c pre-_multiboot.o _multiboot_mod-loader_i386_pc_multiboot.o def-_multiboot.lst und-_multiboot.lst
|
||||
MOSTLYCLEANFILES += _multiboot_mod-loader_i386_pc_multiboot.d
|
||||
DEFSYMFILES += def-_multiboot.lst
|
||||
UNDSYMFILES += und-_multiboot.lst
|
||||
|
||||
_multiboot.mod: pre-_multiboot.o mod-_multiboot.o
|
||||
-rm -f $@
|
||||
$(LD) -r -o $@ $^
|
||||
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-_multiboot.o: _multiboot_mod-loader_i386_pc_multiboot.o
|
||||
-rm -f $@
|
||||
$(LD) -r -o $@ $^
|
||||
|
||||
mod-_multiboot.o: mod-_multiboot.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-_multiboot.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh '_multiboot' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
def-_multiboot.lst: pre-_multiboot.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _multiboot/' > $@
|
||||
|
||||
und-_multiboot.lst: pre-_multiboot.o
|
||||
echo '_multiboot' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
_multiboot_mod-loader_i386_pc_multiboot.o: loader/i386/pc/multiboot.c
|
||||
$(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
_multiboot_mod-loader_i386_pc_multiboot.d: loader/i386/pc/multiboot.c
|
||||
set -e; $(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -M $< | sed 's,multiboot\.o[ :]*,_multiboot_mod-loader_i386_pc_multiboot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include _multiboot_mod-loader_i386_pc_multiboot.d
|
||||
|
||||
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
CLEANFILES += moddep.lst
|
||||
pkgdata_DATA += moddep.lst
|
||||
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep
|
||||
|
|
|
@ -62,7 +62,7 @@ genmoddep_SOURCES = util/genmoddep.c
|
|||
|
||||
# Modules.
|
||||
pkgdata_MODULES = _chain.mod _linux.mod fat.mod ext2.mod normal.mod hello.mod \
|
||||
vga.mod font.mod
|
||||
vga.mod font.mod _multiboot.mod
|
||||
|
||||
# For _chain.mod.
|
||||
_chain_mod_SOURCES = loader/i386/pc/chainloader.c
|
||||
|
@ -97,3 +97,7 @@ vga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|||
# For font.mod.
|
||||
font_mod_SOURCES = font/manager.c
|
||||
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
|
||||
# For _multiboot.mod.
|
||||
_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
|
||||
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue