Replace bios with bootloader, don't use bootsector

Instead of using the bootsector to load a bootloader, just put the
bootloader in the ROM and call it a day. It looks for a file on the SD
card in the root directory named `kernel.bin` and loads it into memory.

This is not a perfect solution, as the kernel will grow larger and the
kernel load address will have to change. At this point I could add back
the bootloader, but that is for later.

Also the bootloader is just a copy of the kernel, so that can be trimmed
down a lot.
This commit is contained in:
Byron Lathi
2022-04-19 10:34:19 -05:00
parent f664d59497
commit f3c7ac9696
42 changed files with 1295 additions and 232 deletions

View File

@@ -1,14 +1,11 @@
.PHONY: all install bios bootloader kernel clean
.PHONY: all install bootloader kernel clean
all: bios bootloader kernel
all: bootloader kernel
install: all
sh script/format_disk.sh
sh script/copy_files.sh
bios:
@$(MAKE) -C bios
bootloader:
@$(MAKE) -C bootloader
@@ -17,6 +14,5 @@ kernel:
clean:
@$(MAKE) -C bios --no-print-directory $@
@$(MAKE) -C bootloader --no-print-directory $@
@$(MAKE) -C kernel --no-print-directory $@