mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Give kernel image a header.
Kernel image now has a header with version, magic number, and a pointer to its actual entrypoint. Entry point is now _start in boot.s, and we now generate versions.s in the build tree for the version macros.
This commit is contained in:
@@ -16,13 +16,16 @@ MOD_BUILD_D := $(BUILD_D)/d.$(MOD_NAME)
|
||||
MOD_LIBNAME := $(BUILD_D)/lib$(MOD_NAME).a
|
||||
MOD_TARGETS += $(MOD_LIBNAME)
|
||||
|
||||
OBJS_$(MOD_NAME) := $(patsubst %.c,build/d.%.o,$(patsubst src/modules/%,%,$(SOURCES)))
|
||||
OBJS_$(MOD_NAME) := $(patsubst %,build/d.%.o,$(patsubst src/modules/%,%,$(SOURCES)))
|
||||
|
||||
$(MOD_LIBNAME): $(OBJS_$(MOD_NAME))
|
||||
$(AR) cr $@ $(OBJS_$(MOD_NAME))
|
||||
|
||||
$(MOD_BUILD_D)/%.o: $(MOD_SRC_D)/%.c $(INIT_DEP)
|
||||
$(MOD_BUILD_D)/%.c.o: $(MOD_SRC_D)/%.c $(INIT_DEP)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(MOD_BUILD_D)/%.s.o: $(MOD_SRC_D)/%.s $(BUILD_D)/versions.s $(INIT_DEP)
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
DEPS += $(patsubst %.o,%.d,$(OBJS_$(MOD_NAME)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user