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
+1 -1
View File
@@ -1,4 +1,4 @@
OUTPUT_FORMAT(elf32-i386)
OUTPUT_FORMAT(binary)
ENTRY(start)
SECTIONS {
+9 -7
View File
@@ -1,14 +1,16 @@
include ../defaults.mk
INC = ./include
SRC = ./src
BIN = ./bin
SRCS_C = $(shell find . -name '*.c')
SRCS_S = $(shell find . -name '*.s')
OBJS = $(patsubst %.c, $(BIN)/%.o, $(SRCS_C)) \
$(patsubst %.s, $(BIN)/%.s.o, $(SRCS_S))
SRCS_C = $(shell find $(SRC) -name '*.c')
SRCS_S = $(shell find $(SRC) -name '*.s')
OBJS = $(patsubst $(SRC)/%.c, $(BIN)/%.o, $(SRCS_C)) \
$(patsubst $(SRC)/%.s, $(BIN)/%.s.o, $(SRCS_S))
LINKER = ./linker.ld
OUT = ./kernel.elf
OUT = ./kern.bin
.PHONY: all clean
@@ -16,11 +18,11 @@ all: $(OUT)
$(OUT): $(OBJS)
$(LD) $(LDFLAGS) -T$(LINKER) -o $@ $^
$(BIN)/%.o: %.c
$(BIN)/%.o: $(SRC)/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -I$(INC) -c -o $@ $<
$(BIN)/%.s.o: %.s
$(BIN)/%.s.o: $(SRC)/%.s
@mkdir -p $(dir $@)
$(AS) $(ASFLAGS) -felf32 -o $@ $<