Some file restructuring

This commit is contained in:
2024-10-10 10:03:58 +02:00
parent 886a802cc1
commit 63ecaec569
16 changed files with 3228 additions and 11 deletions
+11 -9
View File
@@ -10,12 +10,14 @@ ASFLAGS :=
include make.config include make.config
BOOT := ./boot
SRC := ./src SRC := ./src
BIN := ./bin BIN := ./bin
LIBK_INC := ./libk/include LIBK_INC := ./libk/include
LIBC_INC := ./libc/include LIBC_INC := ./libc/include
LIBC_DIR := ./libc LIBC_DIR := ./libc
LIBK_DIR := ./libk LIBK_DIR := ./libk
FONT_DIR := ./usr/fonts
LIBK_SRC := $(shell find $(LIBK_DIR) -type f -name "**.c") LIBK_SRC := $(shell find $(LIBK_DIR) -type f -name "**.c")
FONTS := testfont term16n FONTS := testfont term16n
@@ -40,14 +42,14 @@ $(BIN):
rm -rf $(BIN)/* rm -rf $(BIN)/*
# Bootloader: This target is responsible for creating stage?.bin (1,2,3) # Bootloader: This target is responsible for creating stage?.bin (1,2,3)
$(BOOTLOADER): $(SRC)/stage1.asm $(SRC)/stage2.asm $(SRC)/stage3.c $(LIBC) $(LIBK) $(BOOTLOADER): $(BOOT)/stage1.asm $(BOOT)/stage2.asm $(BOOT)/stage3.c $(LIBC) $(LIBK)
@echo "Assembling $(SRC)/stage1.asm..." @echo "Assembling $(BOOT)/stage1.asm..."
$(AS) -fbin -o $(BIN)/stage1.bin $(SRC)/stage1.asm $(ASFLAGS) $(AS) -fbin -o $(BIN)/stage1.bin $(BOOT)/stage1.asm $(ASFLAGS)
@echo "Assembling $(SRC)/stage2.asm..." @echo "Assembling $(BOOT)/stage2.asm..."
$(AS) -fbin -o $(BIN)/stage2.bin $(SRC)/stage2.asm $(ASFLAGS) $(AS) -fbin -o $(BIN)/stage2.bin $(BOOT)/stage2.asm $(ASFLAGS)
@echo "Compiling $(SRC)/stage3.c..." @echo "Compiling $(BOOT)/stage3.c..."
$(CC) $(CCFLAGS) -I$(LIBK_INC) -I$(LIBC_INC) -o $(BIN)/stage3.o -c $(SRC)/stage3.c $(CC) $(CCFLAGS) -I$(LIBK_INC) -I$(LIBC_INC) -o $(BIN)/stage3.o -c $(BOOT)/stage3.c
$(LD) $(LDFLAGS) -T$(SRC)/stage3.ld --oformat binary -o $(BIN)/stage3.bin $(BIN)/stage3.o $(LIBC) $(LIBK) $(LD) $(LDFLAGS) -T$(BOOT)/stage3.ld --oformat binary -o $(BIN)/stage3.bin $(BIN)/stage3.o $(LIBC) $(LIBK)
rm $(BIN)/stage3.o rm $(BIN)/stage3.o
# Kernel: This target is responsible for creating kernel.bin # Kernel: This target is responsible for creating kernel.bin
@@ -80,7 +82,7 @@ $(LIBK): $(LIBK_SRC)
# This target retrieves all fonts inside src/fonts # This target retrieves all fonts inside src/fonts
$(FONTS): $(FONTS):
cp $(SRC)/fonts/$@.fnt $(BIN)/$@.fnt cp $(FONT_DIR)/$@.fnt $(BIN)/$@.fnt
# Run QEMU # Run QEMU
run: run:
View File
View File
View File
View File
+1 -1
View File
@@ -29,7 +29,7 @@ fileInfo_t files[] = { // TODO: Not have to list all of the files, loop through
{ BIN_DIR"term16n.fnt" }, { BIN_DIR"term16n.fnt" },
{ BIN_DIR"testfont.fnt" }, { BIN_DIR"testfont.fnt" },
/* Userspace files */ /* Userspace files */
{ "./src/fs/test.txt" }, { "./usr/test.txt" },
//{ BIN_DIR"calc.bin" }, //{ BIN_DIR"calc.bin" },
//{ BIN_DIR"edit.bin" }, //{ BIN_DIR"edit.bin" },
}; };
+1 -1
View File
@@ -14,7 +14,7 @@ Legend:
- [ ] project structure - [ ] project structure
- [ ] system root - [ ] system root
- [ ] arch/ - [ ] arch/
- [ ] lib/ - [x] lib/
- [x] include/ - [x] include/
- [ ] cross compiler setup - [ ] cross compiler setup
- [x] libc - User space - [x] libc - User space
View File
View File
View File
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
View File