Kernel now builds as a calypsi .a library

This commit is contained in:
Kyle Cardoza 2024-03-28 00:45:44 -04:00
parent 01759c3d99
commit 1309396635
5 changed files with 9 additions and 1252 deletions

1244
build.lst

File diff suppressed because it is too large Load Diff

View File

@ -45,8 +45,7 @@ LDFLAGS := $(MEMORY_MAP) \
--no-data-init-table-section \ --no-data-init-table-section \
--rtattr cstartup=turaco \ --rtattr cstartup=turaco \
--list-file build.lst \ --list-file build.lst \
--verbose \ --verbose
--output-format pgz
ifeq ($(ENABLE_RELEASE_BUILD), "true") ifeq ($(ENABLE_RELEASE_BUILD), "true")
CFLAGS += -DRELEASE_BUILD CFLAGS += -DRELEASE_BUILD

View File

@ -1,5 +1,5 @@
.PHONY: all .PHONY: all
all: build/kernel.bin all: build/kernel.a
.PHONY: clean .PHONY: clean
clean: clean:
@ -7,14 +7,14 @@ clean:
-name '*.pgz' -o \ -name '*.pgz' -o \
-name '*.bin' -o \ -name '*.bin' -o \
-name '*.elf' -o \ -name '*.elf' -o \
-name '*.a' -o \ -name '*.a' \
-name '*.lst' \
\) -delete \) -delete
@find src -type f \( \ @find src -type f \( \
-name '*.o' -o \ -name '*.o' -o \
-name '*.d' -o \ -name '*.d' -o \
-name '$(TARGET)' \ -name '$(TARGET)' \
\) -delete \) -delete
@rm -f *.lst
%.o: %.c %.o: %.c
@echo "Compiling $@..." @echo "Compiling $@..."
@ -29,8 +29,8 @@ clean:
@printf '%s' "$(dir $@)" > $@ @printf '%s' "$(dir $@)" > $@
@$(CC) $(CFLAGS) --dependencies $< >> $@ @$(CC) $(CFLAGS) --dependencies $< >> $@
build/kernel.bin: $(KERNEL_OBJ) build/kernel.a: $(KERNEL_OBJ)
@echo "Linking $@..." @echo "Linking $@..."
@$(LD) -o $@ $(LDFLAGS) $^ @$(AR) $@ $^
-include $(KERNEL_DEP) -include $(KERNEL_DEP)

View File

@ -12,6 +12,8 @@ far void vera_init(void);
far uint8_t vera_peek(uint32_t addr); far uint8_t vera_peek(uint32_t addr);
far uint16_t vera_peek16(uint32_t addr);
far void vera_poke(uint32_t addr, uint8_t value); far void vera_poke(uint32_t addr, uint8_t value);
far void vera_poke16(uint32_t addr, uint16_t value); far void vera_poke16(uint32_t addr, uint16_t value);

View File

@ -9,7 +9,7 @@
#include "drivers/vera.h" #include "drivers/vera.h"
void void
main(void) kernel_init(void)
{ {
vera_init(); vera_init();