MAJOR REWRITE

- Kernel got pretty much deleted, will be rewriting in following days
- Bootloader got rewritten, stage1 works, stage2 will be written in following days
- Libc is still the same
- User will contains userspace stuff
- Rewrote makefiles again
- Got rid of backup (see previous commits for that)
- Image has 1 MBR partition for FAT32 which contains 'kern.bin' file
- Remade info files to be more "big project" style (all caps plain text)
- Added some dumb docs
This commit is contained in:
2024-12-31 20:05:37 +01:00
parent 81255d13ce
commit 707733e449
82 changed files with 261 additions and 6986 deletions
+35 -2
View File
@@ -1,2 +1,35 @@
all:
@echo TODO
IMG = kern.img
BOOT = ./boot
KERNEL = ./kernel
LIBC = ./libc
MODULES = $(BOOT)\
$(KERNEL)\
$(LIBC)
.PHONY: all clean $(MODULES) qemu
all: $(IMG)
$(IMG): $(MODULES)
dd if=/dev/zero of=$(IMG) bs=512 count=131072
dd if=$(BOOT)/stage1.bin of=$(IMG) bs=512 seek=0 conv=notrunc
dd if=$(BOOT)/stage2.bin of=$(IMG) bs=512 seek=1 conv=notrunc
echo ',,b,*' | sfdisk $(IMG)
echo 'drive A:\n\tfile="$(IMG)"\n\tpartition=1' > ~/.mtoolsrc
mformat -F 'A:'
mcopy $(KERNEL)/kern.bin 'A:'
$(MODULES):
$(MAKE) -C $@
clean:
rm -f $(IMG)
for m in $(MODULES); do $(MAKE) -C $$m clean; done
qemu:
qemu-system-x86_64\
-drive format=raw,file=$(IMG),index=0,media=disk\
-m 256M -accel tcg -monitor stdio\
-rtc base=localtime,clock=host,driftfix=slew\
-audiodev coreaudio,id=audio0 -machine pcspk-audiodev=audio0