From dea8ab7d710e386c198deb1a2973fee54792f9d2 Mon Sep 17 00:00:00 2001 From: Nigel Date: Mon, 20 Feb 2023 00:29:06 +0100 Subject: [PATCH] Improved build system Added new entries to .gitignore Moved away from source directory as central spot for all source code --- .gitignore | 9 +- {source/CoreLib => CoreLib}/Makefile | 8 +- {source/CoreLib => CoreLib}/Memory.cpp | 0 {source/CoreLib => CoreLib}/Memory.h | 0 {source/CoreLib => CoreLib}/Path.cpp | 0 {source/CoreLib => CoreLib}/Path.h | 0 {source/CoreLib => CoreLib}/Stack.cpp | 0 {source/CoreLib => CoreLib}/Stack.h | 0 {source/CoreLib => CoreLib}/String.cpp | 0 {source/CoreLib => CoreLib}/String.h | 0 {source/CoreLib => CoreLib}/StringView.cpp | 0 {source/CoreLib => CoreLib}/StringView.h | 0 Makefile | 142 ------------------ kernel/Makefile | 125 +++++++++++++++ {source/kernel => kernel}/bitmap.h | 0 {source/kernel => kernel}/boot/boot.s | 10 +- {source/kernel => kernel}/boot/multiboot.s | 0 {source/kernel => kernel}/bootcheck.h | 0 {source/kernel => kernel}/bootinfo.h | 0 {source/kernel => kernel}/crti.s | 0 {source/kernel => kernel}/crtn.s | 0 {source/kernel => kernel}/definitions.h | 0 .../kernel => kernel}/drivers/acpi/acpi.cpp | 0 {source/kernel => kernel}/drivers/acpi/acpi.h | 0 .../kernel => kernel}/drivers/acpi/rsdp.cpp | 0 {source/kernel => kernel}/drivers/acpi/rsdp.h | 0 .../drivers/ata/ataDevice.cpp | 0 .../kernel => kernel}/drivers/ata/ataDevice.h | 0 .../drivers/atapi/atapiDevice.cpp | 0 .../drivers/atapi/atapiDevice.h | 0 .../kernel => kernel}/drivers/cmos/cmos.cpp | 0 {source/kernel => kernel}/drivers/ide/ide.h | 0 .../drivers/ide/ideCommands.h | 0 .../drivers/ide/sampleIDE.definitions.h | 0 .../kernel => kernel}/drivers/ide/sampleIDE.h | 0 {source/kernel => kernel}/drivers/io/io.cpp | 0 {source/kernel => kernel}/drivers/io/io.h | 0 {source/kernel => kernel}/drivers/pci/pci.cpp | 0 {source/kernel => kernel}/drivers/pci/pci.h | 0 .../drivers/pci/pciDevice.cpp | 0 .../kernel => kernel}/drivers/pci/pciDevice.h | 0 {source/kernel => kernel}/drivers/pic/pic.cpp | 0 {source/kernel => kernel}/drivers/pic/pic.h | 0 {source/kernel => kernel}/drivers/pit/pit.cpp | 0 {source/kernel => kernel}/drivers/pit/pit.h | 0 .../drivers/ps-2/keyboard.cpp | 0 .../kernel => kernel}/drivers/ps-2/keyboard.h | 0 .../drivers/ps-2/scancodes/set1.h | 0 .../drivers/serial/serial.cpp | 0 .../kernel => kernel}/drivers/serial/serial.h | 0 {source/kernel => kernel}/drivers/vga/VBE.h | 0 .../kernel => kernel}/drivers/vga/colors.h | 0 .../filesystem/EXT2/SuperBlock.h | 0 .../filesystem/FAT/BiosParameterBlock.h | 0 .../filesystem/FAT/DirectoryEntry.h | 0 .../filesystem/FAT/ExtendBootRecord.h | 0 {source => kernel}/grub.cfg | 0 {source/kernel => kernel}/i386/README.md | 0 {source/kernel => kernel}/i386/processor.cpp | 0 {source/kernel => kernel}/i386/processor.h | 0 {source/kernel => kernel}/interrupts/idt.cpp | 0 {source/kernel => kernel}/interrupts/idt.h | 0 {source/kernel => kernel}/interrupts/idt.s | 0 {source/kernel => kernel}/irq_table.s | 0 {source/kernel => kernel}/irs_table.s | 0 {source/kernel => kernel}/kernel.cpp | 0 {source/kernel => kernel}/kernel.h | 0 {source/kernel => kernel}/linker.ld | 0 .../kernel => kernel}/memory/KernelHeap.cpp | 0 {source/kernel => kernel}/memory/KernelHeap.h | 0 .../memory/PageDirectory.cpp | 0 .../kernel => kernel}/memory/PageDirectory.h | 0 .../memory/PhysicalMemoryManager.cpp | 0 .../memory/PhysicalMemoryManager.h | 0 .../memory/TaskStateSegment.h | 0 .../memory/VirtualMemoryManager.cpp | 0 .../memory/VirtualMemoryManager.h | 0 {source/kernel => kernel}/memory/gdt/gdt.s | 0 {source/kernel => kernel}/memory/gdt/gdtc.cpp | 0 {source/kernel => kernel}/memory/gdt/gdtc.h | 0 {source/kernel => kernel}/memory/memory.cpp | 0 {source/kernel => kernel}/memory/memory.h | 0 {source/kernel => kernel}/memory/memoryinfo.h | 0 {source/kernel => kernel}/memory/paging.s | 0 .../partitiontable/mbr/MasterBootRecord.h | 0 .../partitiontable/mbr/PartitionTableEntry.h | 0 .../prekernel/bootstructure.h | 0 .../kernel => kernel}/prekernel/multiboot.h | 0 .../kernel => kernel}/prekernel/prekernel.cpp | 0 {source/kernel => kernel}/serial.h | 0 .../supervisorterminal/superVisorTerminal.cpp | 0 .../supervisorterminal/superVisorTerminal.h | 0 {source/kernel => kernel}/terminal/kterm.cpp | 0 {source/kernel => kernel}/terminal/kterm.h | 2 +- {source/kernel => kernel}/time.cpp | 0 {source/kernel => kernel}/time.h | 0 {source/kernel => kernel}/timer.cpp | 0 {source/kernel => kernel}/timer.h | 0 {source/kernel => kernel}/vfs/VFS.cpp | 0 {source/kernel => kernel}/vfs/VFS.h | 0 source/CoreLib/bin/memory.o | Bin 4712 -> 0 bytes source/CoreLib/bin/path.o | Bin 4988 -> 0 bytes source/CoreLib/bin/stack.o | Bin 788 -> 0 bytes source/CoreLib/bin/string.o | Bin 4400 -> 0 bytes source/CoreLib/bin/stringview.o | Bin 3772 -> 0 bytes 105 files changed, 140 insertions(+), 156 deletions(-) rename {source/CoreLib => CoreLib}/Makefile (89%) rename {source/CoreLib => CoreLib}/Memory.cpp (100%) rename {source/CoreLib => CoreLib}/Memory.h (100%) rename {source/CoreLib => CoreLib}/Path.cpp (100%) rename {source/CoreLib => CoreLib}/Path.h (100%) rename {source/CoreLib => CoreLib}/Stack.cpp (100%) rename {source/CoreLib => CoreLib}/Stack.h (100%) rename {source/CoreLib => CoreLib}/String.cpp (100%) rename {source/CoreLib => CoreLib}/String.h (100%) rename {source/CoreLib => CoreLib}/StringView.cpp (100%) rename {source/CoreLib => CoreLib}/StringView.h (100%) delete mode 100644 Makefile create mode 100644 kernel/Makefile rename {source/kernel => kernel}/bitmap.h (100%) rename {source/kernel => kernel}/boot/boot.s (92%) rename {source/kernel => kernel}/boot/multiboot.s (100%) rename {source/kernel => kernel}/bootcheck.h (100%) rename {source/kernel => kernel}/bootinfo.h (100%) rename {source/kernel => kernel}/crti.s (100%) rename {source/kernel => kernel}/crtn.s (100%) rename {source/kernel => kernel}/definitions.h (100%) rename {source/kernel => kernel}/drivers/acpi/acpi.cpp (100%) rename {source/kernel => kernel}/drivers/acpi/acpi.h (100%) rename {source/kernel => kernel}/drivers/acpi/rsdp.cpp (100%) rename {source/kernel => kernel}/drivers/acpi/rsdp.h (100%) rename {source/kernel => kernel}/drivers/ata/ataDevice.cpp (100%) rename {source/kernel => kernel}/drivers/ata/ataDevice.h (100%) rename {source/kernel => kernel}/drivers/atapi/atapiDevice.cpp (100%) rename {source/kernel => kernel}/drivers/atapi/atapiDevice.h (100%) rename {source/kernel => kernel}/drivers/cmos/cmos.cpp (100%) rename {source/kernel => kernel}/drivers/ide/ide.h (100%) rename {source/kernel => kernel}/drivers/ide/ideCommands.h (100%) rename {source/kernel => kernel}/drivers/ide/sampleIDE.definitions.h (100%) rename {source/kernel => kernel}/drivers/ide/sampleIDE.h (100%) rename {source/kernel => kernel}/drivers/io/io.cpp (100%) rename {source/kernel => kernel}/drivers/io/io.h (100%) rename {source/kernel => kernel}/drivers/pci/pci.cpp (100%) rename {source/kernel => kernel}/drivers/pci/pci.h (100%) rename {source/kernel => kernel}/drivers/pci/pciDevice.cpp (100%) rename {source/kernel => kernel}/drivers/pci/pciDevice.h (100%) rename {source/kernel => kernel}/drivers/pic/pic.cpp (100%) rename {source/kernel => kernel}/drivers/pic/pic.h (100%) rename {source/kernel => kernel}/drivers/pit/pit.cpp (100%) rename {source/kernel => kernel}/drivers/pit/pit.h (100%) rename {source/kernel => kernel}/drivers/ps-2/keyboard.cpp (100%) rename {source/kernel => kernel}/drivers/ps-2/keyboard.h (100%) rename {source/kernel => kernel}/drivers/ps-2/scancodes/set1.h (100%) rename {source/kernel => kernel}/drivers/serial/serial.cpp (100%) rename {source/kernel => kernel}/drivers/serial/serial.h (100%) rename {source/kernel => kernel}/drivers/vga/VBE.h (100%) rename {source/kernel => kernel}/drivers/vga/colors.h (100%) rename {source/kernel => kernel}/filesystem/EXT2/SuperBlock.h (100%) rename {source/kernel => kernel}/filesystem/FAT/BiosParameterBlock.h (100%) rename {source/kernel => kernel}/filesystem/FAT/DirectoryEntry.h (100%) rename {source/kernel => kernel}/filesystem/FAT/ExtendBootRecord.h (100%) rename {source => kernel}/grub.cfg (100%) rename {source/kernel => kernel}/i386/README.md (100%) rename {source/kernel => kernel}/i386/processor.cpp (100%) rename {source/kernel => kernel}/i386/processor.h (100%) rename {source/kernel => kernel}/interrupts/idt.cpp (100%) rename {source/kernel => kernel}/interrupts/idt.h (100%) rename {source/kernel => kernel}/interrupts/idt.s (100%) rename {source/kernel => kernel}/irq_table.s (100%) rename {source/kernel => kernel}/irs_table.s (100%) rename {source/kernel => kernel}/kernel.cpp (100%) rename {source/kernel => kernel}/kernel.h (100%) rename {source/kernel => kernel}/linker.ld (100%) rename {source/kernel => kernel}/memory/KernelHeap.cpp (100%) rename {source/kernel => kernel}/memory/KernelHeap.h (100%) rename {source/kernel => kernel}/memory/PageDirectory.cpp (100%) rename {source/kernel => kernel}/memory/PageDirectory.h (100%) rename {source/kernel => kernel}/memory/PhysicalMemoryManager.cpp (100%) rename {source/kernel => kernel}/memory/PhysicalMemoryManager.h (100%) rename {source/kernel => kernel}/memory/TaskStateSegment.h (100%) rename {source/kernel => kernel}/memory/VirtualMemoryManager.cpp (100%) rename {source/kernel => kernel}/memory/VirtualMemoryManager.h (100%) rename {source/kernel => kernel}/memory/gdt/gdt.s (100%) rename {source/kernel => kernel}/memory/gdt/gdtc.cpp (100%) rename {source/kernel => kernel}/memory/gdt/gdtc.h (100%) rename {source/kernel => kernel}/memory/memory.cpp (100%) rename {source/kernel => kernel}/memory/memory.h (100%) rename {source/kernel => kernel}/memory/memoryinfo.h (100%) rename {source/kernel => kernel}/memory/paging.s (100%) rename {source/kernel => kernel}/partitiontable/mbr/MasterBootRecord.h (100%) rename {source/kernel => kernel}/partitiontable/mbr/PartitionTableEntry.h (100%) rename {source/kernel => kernel}/prekernel/bootstructure.h (100%) rename {source/kernel => kernel}/prekernel/multiboot.h (100%) rename {source/kernel => kernel}/prekernel/prekernel.cpp (100%) rename {source/kernel => kernel}/serial.h (100%) rename {source/kernel => kernel}/supervisorterminal/superVisorTerminal.cpp (100%) rename {source/kernel => kernel}/supervisorterminal/superVisorTerminal.h (100%) rename {source/kernel => kernel}/terminal/kterm.cpp (100%) rename {source/kernel => kernel}/terminal/kterm.h (96%) rename {source/kernel => kernel}/time.cpp (100%) rename {source/kernel => kernel}/time.h (100%) rename {source/kernel => kernel}/timer.cpp (100%) rename {source/kernel => kernel}/timer.h (100%) rename {source/kernel => kernel}/vfs/VFS.cpp (100%) rename {source/kernel => kernel}/vfs/VFS.h (100%) delete mode 100644 source/CoreLib/bin/memory.o delete mode 100644 source/CoreLib/bin/path.o delete mode 100644 source/CoreLib/bin/stack.o delete mode 100644 source/CoreLib/bin/string.o delete mode 100644 source/CoreLib/bin/stringview.o diff --git a/.gitignore b/.gitignore index 82ca499..689ffcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ -build -CON -.vscode +build/ +bin/ +.vscode/ +.idea/ isodir/ root/ *.iso *.img *.sym +*.o +*.a diff --git a/source/CoreLib/Makefile b/CoreLib/Makefile similarity index 89% rename from source/CoreLib/Makefile rename to CoreLib/Makefile index b5a0cbb..a37ab45 100644 --- a/source/CoreLib/Makefile +++ b/CoreLib/Makefile @@ -1,17 +1,15 @@ CPP = ${HOME}/opt/cross/bin/i686-elf-g++ CFLAGS = -ffreestanding -Og -ggdb -Wall -Wextra -SRC_DIR = . -BUILD_DIR = build -OBJ_FOLDER = bin +BUILD_DIR = ../build/CoreLib +OBJ_FOLDER = ../bin/CoreLib OUTPUTFILE = $(BUILD_DIR)/libCoreLib.a OFILES = $(OBJ_FOLDER)/memory.o $(OBJ_FOLDER)/path.o $(OBJ_FOLDER)/stack.o $(OBJ_FOLDER)/string.o $(OBJ_FOLDER)/stringview.o - .phony: all all: $(OUTPUTFILE) - cp *.h build/include/ + cp *.h $(BUILD_DIR)/include/CoreLib $(OUTPUTFILE): $(OFILES) ar -rc $(OUTPUTFILE) $(OFILES) diff --git a/source/CoreLib/Memory.cpp b/CoreLib/Memory.cpp similarity index 100% rename from source/CoreLib/Memory.cpp rename to CoreLib/Memory.cpp diff --git a/source/CoreLib/Memory.h b/CoreLib/Memory.h similarity index 100% rename from source/CoreLib/Memory.h rename to CoreLib/Memory.h diff --git a/source/CoreLib/Path.cpp b/CoreLib/Path.cpp similarity index 100% rename from source/CoreLib/Path.cpp rename to CoreLib/Path.cpp diff --git a/source/CoreLib/Path.h b/CoreLib/Path.h similarity index 100% rename from source/CoreLib/Path.h rename to CoreLib/Path.h diff --git a/source/CoreLib/Stack.cpp b/CoreLib/Stack.cpp similarity index 100% rename from source/CoreLib/Stack.cpp rename to CoreLib/Stack.cpp diff --git a/source/CoreLib/Stack.h b/CoreLib/Stack.h similarity index 100% rename from source/CoreLib/Stack.h rename to CoreLib/Stack.h diff --git a/source/CoreLib/String.cpp b/CoreLib/String.cpp similarity index 100% rename from source/CoreLib/String.cpp rename to CoreLib/String.cpp diff --git a/source/CoreLib/String.h b/CoreLib/String.h similarity index 100% rename from source/CoreLib/String.h rename to CoreLib/String.h diff --git a/source/CoreLib/StringView.cpp b/CoreLib/StringView.cpp similarity index 100% rename from source/CoreLib/StringView.cpp rename to CoreLib/StringView.cpp diff --git a/source/CoreLib/StringView.h b/CoreLib/StringView.h similarity index 100% rename from source/CoreLib/StringView.h rename to CoreLib/StringView.h diff --git a/Makefile b/Makefile deleted file mode 100644 index b4eb068..0000000 --- a/Makefile +++ /dev/null @@ -1,142 +0,0 @@ -EMULATOR = qemu-system-i386 -AS = ${HOME}/opt/cross/bin/i686-elf-as -CC = ${HOME}/opt/cross/bin/i686-elf-gcc -CPP = ${HOME}/opt/cross/bin/i686-elf-g++ -CFLAGS = -ffreestanding -Og -ggdb -Wall -Wextra -I source/CoreLib/build/include - -OFILES =$(BUILD_DIR)/boot.o $(BUILD_DIR)/kterm.o $(BUILD_DIR)/kernel.o $(BUILD_DIR)/memory.o $(BUILD_DIR)/paging.o $(BUILD_DIR)/VFS.o $(BUILD_DIR)/pit.o $(BUILD_DIR)/time.o $(BUILD_DIR)/keyboard.o $(BUILD_DIR)/io.o $(BUILD_DIR)/processor.o $(BUILD_DIR)/gdtc.o $(BUILD_DIR)/idt.o $(BUILD_DIR)/pic.o $(BUILD_DIR)/sv-terminal.o $(BUILD_DIR)/prekernel.o $(BUILD_DIR)/KHeap.o $(BUILD_DIR)/pci.o $(BUILD_DIR)/pcidevice.o $(BUILD_DIR)/atapiDevice.o $(BUILD_DIR)/ataDevice.o $(BUILD_DIR)/rsdp.o $(BUILD_DIR)/acpi.o - -SRC_DIR = source -BUILD_DIR = build - -CRTBEGIN_OBJ = $(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o) -CRTEND_OBJ = $(shell $(CC) $(CFLAGS) -print-file-name=crtend.o) - -CRTI_OBJ = $(BUILD_DIR)/crti.o -CRTN_OBJ = $(BUILD_DIR)/crtn.o -OBJ_LINK_LIST = $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(OFILES) $(CRTEND_OBJ) $(CRTN_OBJ) -INTERNAL_OBJS = $(CRTI_OBJ) $(OFILES) $(CRTN_OBJ) - - -all: clean build - -build: build_kernel iso - -clean_iso: - if [[ -a isodir/boot ]] ; then rm root/boot -rd ; fi - if [ -f build/barinkOS.iso ] ; then rm build/barinkOS.iso ; fi - -iso: clean_iso clean build - mkdir -p root/boot/grub - cp build/myos.bin root/boot/myos.bin - cp source/grub.cfg root/boot/grub/grub.cfg - grub-mkrescue -o build/barinkOS.iso root -run: all - virtualboxvm --startvm "BarinkOS_test" -debug: all - objcopy --only-keep-debug build/myos.bin kernel.sym - $(EMULATOR) -cdrom build/barinkOS.iso -serial stdio -vga std -display gtk -m 2G -cpu core2duo -s -d int -no-shutdown -no-reboot -test: - $(EMULATOR) -kernel $(BUILD_DIR)/myos.bin -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot - -test_iso: - $(EMULATOR) -boot d -cdrom $(BUILD_DIR)/barinkOS.iso -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-reboot -no-shutdown -test_disk: all - sudo losetup /dev/loop9 build/disk.img - sudo mount /dev/loop9 /mnt - sudo cp build/myos.bin /mnt/boot/myos.bin - sudo umount /mnt - sudo losetup -d /dev/loop9 - - $(EMULATOR) -boot d -drive format=raw,file=build/disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo - - -build_kernel: $(OBJ_LINK_LIST) - $(CPP) -T $(SRC_DIR)/kernel/linker.ld -o $(BUILD_DIR)/myos.bin -ffreestanding -ggdb -Og -nostdlib $(OBJ_LINK_LIST) -lgcc -L source/CoreLib/build -lCoreLib - -build_x86_64: - $(AS) $(SRC_DIR)/cgc/x86_64/crti.s -o $(BUILD_DIR)/crti_64.o - $(AS) $(SRC_DIR)/cgc/x86_64/crtn.s -o $(BUILD_DIR)/crtn.o - -clean: - rm -f $(BUILD_DIR)/myos.bin $(INTERNAL_OBJS) - -# C++ definition -> Object files -$(BUILD_DIR)/kernel.o: - $(CPP) -c $(SRC_DIR)/kernel/kernel.cpp -o $(BUILD_DIR)/kernel.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/kterm.o: - $(CPP) -c $(SRC_DIR)/kernel/terminal/kterm.cpp -o $(BUILD_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/io.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/io/io.cpp -o $(BUILD_DIR)/io.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/idt.o: - $(CPP) -c $(SRC_DIR)/kernel/interrupts/idt.cpp -o $(BUILD_DIR)/idt.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/gdtc.o: - $(CPP) -c $(SRC_DIR)/kernel/memory/gdt/gdtc.cpp -o $(BUILD_DIR)/gdtc.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/pic.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/pic/pic.cpp -o $(BUILD_DIR)/pic.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/PhysicalMemoryManager.o: - $(CPP) -c $(SRC_DIR)/kernel/memory/PhysicalMemoryManager.cpp -o $(BUILD_DIR)/PhysicalMemoryManager.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/pci.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/pci/pci.cpp -o $(BUILD_DIR)/pci.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/pcidevice.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/pci/pciDevice.cpp -o $(BUILD_DIR)/pcidevice.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/atapiDevice.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/atapi/atapiDevice.cpp -o $(BUILD_DIR)/atapiDevice.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/ataDevice.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/ata/ataDevice.cpp -o $(BUILD_DIR)/ataDevice.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/rsdp.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/acpi/rsdp.cpp -o $(BUILD_DIR)/rsdp.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/acpi.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/acpi/acpi.cpp -o $(BUILD_DIR)/acpi.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/pit.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/pit/pit.cpp -o $(BUILD_DIR)/pit.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/VFS.o: - $(CPP) -c $(SRC_DIR)/kernel/vfs/VFS.cpp -o $(BUILD_DIR)/VFS.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/keyboard.o: - $(CPP) -c $(SRC_DIR)/kernel/drivers/ps-2/keyboard.cpp -o $(BUILD_DIR)/keyboard.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/time.o: - $(CPP) -c $(SRC_DIR)/kernel/time.cpp -o $(BUILD_DIR)/time.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/sv-terminal.o: - $(CPP) -c $(SRC_DIR)/kernel/supervisorterminal/superVisorTerminal.cpp -o $(BUILD_DIR)/sv-terminal.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/memory.o: - $(CPP) -c $(SRC_DIR)/kernel/memory/PhysicalMemoryManager.cpp -o $(BUILD_DIR)/memory.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/paging.o: - $(CPP) -c $(SRC_DIR)/kernel/memory/VirtualMemoryManager.cpp -o $(BUILD_DIR)/paging.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/KHeap.o: - $(CPP) -c $(SRC_DIR)/kernel/memory/KernelHeap.cpp -o $(BUILD_DIR)/KHeap.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/prekernel.o: - $(CPP) -c $(SRC_DIR)/kernel/prekernel/prekernel.cpp -o $(BUILD_DIR)/prekernel.o $(CFLAGS) -fno-exceptions -fno-rtti - -$(BUILD_DIR)/processor.o: - $(CPP) -c $(SRC_DIR)/kernel/i386/processor.cpp -o $(BUILD_DIR)/processor.o $(CFLAGS) -fno-exceptions -fno-rtti - -# Assembly -> Object files -$(BUILD_DIR)/boot.o: - $(AS) $(SRC_DIR)/kernel/boot/boot.s -o $(BUILD_DIR)/boot.o - -$(BUILD_DIR)/crti.o: - $(AS) $(SRC_DIR)/kernel/crti.s -o $(BUILD_DIR)/crti.o - -$(BUILD_DIR)/crtn.o: - $(AS) $(SRC_DIR)/kernel/crtn.s -o $(BUILD_DIR)/crtn.o diff --git a/kernel/Makefile b/kernel/Makefile new file mode 100644 index 0000000..96ccbb1 --- /dev/null +++ b/kernel/Makefile @@ -0,0 +1,125 @@ +EMULATOR = qemu-system-i386 +AS = ${HOME}/opt/cross/bin/i686-elf-as +CC = ${HOME}/opt/cross/bin/i686-elf-gcc +CPP = ${HOME}/opt/cross/bin/i686-elf-g++ +CFLAGS = -ffreestanding -Og -ggdb -Wall -Wextra -I ../build/CoreLib/include +BUILD_DIR = ../build/kernel +OBJ_DIR = ../bin/kernel + +CRTBEGIN_OBJ = $(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o) +CRTEND_OBJ = $(shell $(CC) $(CFLAGS) -print-file-name=crtend.o) + +CRTI_OBJ = $(OBJ_DIR)/crti.o +CRTN_OBJ = $(OBJ_DIR)/crtn.o + +OFILES = $(OBJ_DIR)/boot.o \ + $(OBJ_DIR)/kterm.o \ + $(OBJ_DIR)/kernel.o \ + $(OBJ_DIR)/memory.o \ + $(OBJ_DIR)/paging.o \ + $(OBJ_DIR)/VFS.o \ + $(OBJ_DIR)/pit.o \ + $(OBJ_DIR)/time.o \ + $(OBJ_DIR)/keyboard.o \ + $(OBJ_DIR)/io.o \ + $(OBJ_DIR)/processor.o \ + $(OBJ_DIR)/gdtc.o \ + $(OBJ_DIR)/idt.o \ + $(OBJ_DIR)/pic.o \ + $(OBJ_DIR)/sv-terminal.o \ + $(OBJ_DIR)/prekernel.o \ + $(OBJ_DIR)/KHeap.o \ + $(OBJ_DIR)/pci.o \ + $(OBJ_DIR)/pcidevice.o \ + $(OBJ_DIR)/atapiDevice.o \ + $(OBJ_DIR)/ataDevice.o \ + $(OBJ_DIR)/rsdp.o \ + $(OBJ_DIR)/acpi.o + +OBJ_LINK_LIST = $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(OFILES) $(CRTEND_OBJ) $(CRTN_OBJ) +INTERNAL_OBJS = $(CRTI_OBJ) $(OFILES) $(CRTN_OBJ) + +all: build + +build: $(OBJ_LINK_LIST) + $(CPP) -T linker.ld -o $(BUILD_DIR)/myos.bin -ffreestanding -ggdb -Og -nostdlib $(OBJ_LINK_LIST) -lgcc -L ../build/CoreLib -lCoreLib + +# C++ definition -> Object files +$(OBJ_DIR)/kernel.o: + $(CPP) -c kernel.cpp -o $(OBJ_DIR)/kernel.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/kterm.o: + $(CPP) -c terminal/kterm.cpp -o $(OBJ_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/io.o: + $(CPP) -c drivers/io/io.cpp -o $(OBJ_DIR)/io.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/idt.o: + $(CPP) -c interrupts/idt.cpp -o $(OBJ_DIR)/idt.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/gdtc.o: + $(CPP) -c memory/gdt/gdtc.cpp -o $(OBJ_DIR)/gdtc.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/pic.o: + $(CPP) -c drivers/pic/pic.cpp -o $(OBJ_DIR)/pic.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/PhysicalMemoryManager.o: + $(CPP) -c memory/PhysicalMemoryManager.cpp -o $(OBJ_DIR)/PhysicalMemoryManager.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/pci.o: + $(CPP) -c drivers/pci/pci.cpp -o $(OBJ_DIR)/pci.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/pcidevice.o: + $(CPP) -c drivers/pci/pciDevice.cpp -o $(OBJ_DIR)/pcidevice.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/atapiDevice.o: + $(CPP) -c drivers/atapi/atapiDevice.cpp -o $(OBJ_DIR)/atapiDevice.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/ataDevice.o: + $(CPP) -c drivers/ata/ataDevice.cpp -o $(OBJ_DIR)/ataDevice.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/rsdp.o: + $(CPP) -c drivers/acpi/rsdp.cpp -o $(OBJ_DIR)/rsdp.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/acpi.o: + $(CPP) -c drivers/acpi/acpi.cpp -o $(OBJ_DIR)/acpi.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/pit.o: + $(CPP) -c drivers/pit/pit.cpp -o $(OBJ_DIR)/pit.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/VFS.o: + $(CPP) -c vfs/VFS.cpp -o $(OBJ_DIR)/VFS.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/keyboard.o: + $(CPP) -c drivers/ps-2/keyboard.cpp -o $(OBJ_DIR)/keyboard.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/time.o: + $(CPP) -c time.cpp -o $(OBJ_DIR)/time.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/sv-terminal.o: + $(CPP) -c supervisorterminal/superVisorTerminal.cpp -o $(OBJ_DIR)/sv-terminal.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/memory.o: + $(CPP) -c memory/PhysicalMemoryManager.cpp -o $(OBJ_DIR)/memory.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/paging.o: + $(CPP) -c memory/VirtualMemoryManager.cpp -o $(OBJ_DIR)/paging.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/KHeap.o: + $(CPP) -c memory/KernelHeap.cpp -o $(OBJ_DIR)/KHeap.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/prekernel.o: + $(CPP) -c prekernel/prekernel.cpp -o $(OBJ_DIR)/prekernel.o $(CFLAGS) -fno-exceptions -fno-rtti + +$(OBJ_DIR)/processor.o: + $(CPP) -c i386/processor.cpp -o $(OBJ_DIR)/processor.o $(CFLAGS) -fno-exceptions -fno-rtti + +# Assembly -> Object files +$(OBJ_DIR)/boot.o: + $(AS) boot/boot.s -o $(OBJ_DIR)/boot.o + +$(OBJ_DIR)/crti.o: + $(AS) crti.s -o $(OBJ_DIR)/crti.o + +$(OBJ_DIR)/crtn.o: + $(AS) crtn.s -o $(OBJ_DIR)/crtn.o diff --git a/source/kernel/bitmap.h b/kernel/bitmap.h similarity index 100% rename from source/kernel/bitmap.h rename to kernel/bitmap.h diff --git a/source/kernel/boot/boot.s b/kernel/boot/boot.s similarity index 92% rename from source/kernel/boot/boot.s rename to kernel/boot/boot.s index ca822c4..b45b3a8 100644 --- a/source/kernel/boot/boot.s +++ b/kernel/boot/boot.s @@ -1,4 +1,4 @@ -.include "./source/kernel/boot/multiboot.s" +.include "./boot/multiboot.s" /* * Allocate initial stack */ @@ -108,10 +108,10 @@ isPaging: jmp 1b -.include "./source/kernel/memory/gdt/gdt.s" -.include "./source/kernel/irs_table.s" -.include "./source/kernel/irq_table.s" -.include "./source/kernel/interrupts/idt.s" +.include "./memory/gdt/gdt.s" +.include "./irs_table.s" +.include "./irq_table.s" +.include "./interrupts/idt.s" .globl jump_usermode jump_usermode: diff --git a/source/kernel/boot/multiboot.s b/kernel/boot/multiboot.s similarity index 100% rename from source/kernel/boot/multiboot.s rename to kernel/boot/multiboot.s diff --git a/source/kernel/bootcheck.h b/kernel/bootcheck.h similarity index 100% rename from source/kernel/bootcheck.h rename to kernel/bootcheck.h diff --git a/source/kernel/bootinfo.h b/kernel/bootinfo.h similarity index 100% rename from source/kernel/bootinfo.h rename to kernel/bootinfo.h diff --git a/source/kernel/crti.s b/kernel/crti.s similarity index 100% rename from source/kernel/crti.s rename to kernel/crti.s diff --git a/source/kernel/crtn.s b/kernel/crtn.s similarity index 100% rename from source/kernel/crtn.s rename to kernel/crtn.s diff --git a/source/kernel/definitions.h b/kernel/definitions.h similarity index 100% rename from source/kernel/definitions.h rename to kernel/definitions.h diff --git a/source/kernel/drivers/acpi/acpi.cpp b/kernel/drivers/acpi/acpi.cpp similarity index 100% rename from source/kernel/drivers/acpi/acpi.cpp rename to kernel/drivers/acpi/acpi.cpp diff --git a/source/kernel/drivers/acpi/acpi.h b/kernel/drivers/acpi/acpi.h similarity index 100% rename from source/kernel/drivers/acpi/acpi.h rename to kernel/drivers/acpi/acpi.h diff --git a/source/kernel/drivers/acpi/rsdp.cpp b/kernel/drivers/acpi/rsdp.cpp similarity index 100% rename from source/kernel/drivers/acpi/rsdp.cpp rename to kernel/drivers/acpi/rsdp.cpp diff --git a/source/kernel/drivers/acpi/rsdp.h b/kernel/drivers/acpi/rsdp.h similarity index 100% rename from source/kernel/drivers/acpi/rsdp.h rename to kernel/drivers/acpi/rsdp.h diff --git a/source/kernel/drivers/ata/ataDevice.cpp b/kernel/drivers/ata/ataDevice.cpp similarity index 100% rename from source/kernel/drivers/ata/ataDevice.cpp rename to kernel/drivers/ata/ataDevice.cpp diff --git a/source/kernel/drivers/ata/ataDevice.h b/kernel/drivers/ata/ataDevice.h similarity index 100% rename from source/kernel/drivers/ata/ataDevice.h rename to kernel/drivers/ata/ataDevice.h diff --git a/source/kernel/drivers/atapi/atapiDevice.cpp b/kernel/drivers/atapi/atapiDevice.cpp similarity index 100% rename from source/kernel/drivers/atapi/atapiDevice.cpp rename to kernel/drivers/atapi/atapiDevice.cpp diff --git a/source/kernel/drivers/atapi/atapiDevice.h b/kernel/drivers/atapi/atapiDevice.h similarity index 100% rename from source/kernel/drivers/atapi/atapiDevice.h rename to kernel/drivers/atapi/atapiDevice.h diff --git a/source/kernel/drivers/cmos/cmos.cpp b/kernel/drivers/cmos/cmos.cpp similarity index 100% rename from source/kernel/drivers/cmos/cmos.cpp rename to kernel/drivers/cmos/cmos.cpp diff --git a/source/kernel/drivers/ide/ide.h b/kernel/drivers/ide/ide.h similarity index 100% rename from source/kernel/drivers/ide/ide.h rename to kernel/drivers/ide/ide.h diff --git a/source/kernel/drivers/ide/ideCommands.h b/kernel/drivers/ide/ideCommands.h similarity index 100% rename from source/kernel/drivers/ide/ideCommands.h rename to kernel/drivers/ide/ideCommands.h diff --git a/source/kernel/drivers/ide/sampleIDE.definitions.h b/kernel/drivers/ide/sampleIDE.definitions.h similarity index 100% rename from source/kernel/drivers/ide/sampleIDE.definitions.h rename to kernel/drivers/ide/sampleIDE.definitions.h diff --git a/source/kernel/drivers/ide/sampleIDE.h b/kernel/drivers/ide/sampleIDE.h similarity index 100% rename from source/kernel/drivers/ide/sampleIDE.h rename to kernel/drivers/ide/sampleIDE.h diff --git a/source/kernel/drivers/io/io.cpp b/kernel/drivers/io/io.cpp similarity index 100% rename from source/kernel/drivers/io/io.cpp rename to kernel/drivers/io/io.cpp diff --git a/source/kernel/drivers/io/io.h b/kernel/drivers/io/io.h similarity index 100% rename from source/kernel/drivers/io/io.h rename to kernel/drivers/io/io.h diff --git a/source/kernel/drivers/pci/pci.cpp b/kernel/drivers/pci/pci.cpp similarity index 100% rename from source/kernel/drivers/pci/pci.cpp rename to kernel/drivers/pci/pci.cpp diff --git a/source/kernel/drivers/pci/pci.h b/kernel/drivers/pci/pci.h similarity index 100% rename from source/kernel/drivers/pci/pci.h rename to kernel/drivers/pci/pci.h diff --git a/source/kernel/drivers/pci/pciDevice.cpp b/kernel/drivers/pci/pciDevice.cpp similarity index 100% rename from source/kernel/drivers/pci/pciDevice.cpp rename to kernel/drivers/pci/pciDevice.cpp diff --git a/source/kernel/drivers/pci/pciDevice.h b/kernel/drivers/pci/pciDevice.h similarity index 100% rename from source/kernel/drivers/pci/pciDevice.h rename to kernel/drivers/pci/pciDevice.h diff --git a/source/kernel/drivers/pic/pic.cpp b/kernel/drivers/pic/pic.cpp similarity index 100% rename from source/kernel/drivers/pic/pic.cpp rename to kernel/drivers/pic/pic.cpp diff --git a/source/kernel/drivers/pic/pic.h b/kernel/drivers/pic/pic.h similarity index 100% rename from source/kernel/drivers/pic/pic.h rename to kernel/drivers/pic/pic.h diff --git a/source/kernel/drivers/pit/pit.cpp b/kernel/drivers/pit/pit.cpp similarity index 100% rename from source/kernel/drivers/pit/pit.cpp rename to kernel/drivers/pit/pit.cpp diff --git a/source/kernel/drivers/pit/pit.h b/kernel/drivers/pit/pit.h similarity index 100% rename from source/kernel/drivers/pit/pit.h rename to kernel/drivers/pit/pit.h diff --git a/source/kernel/drivers/ps-2/keyboard.cpp b/kernel/drivers/ps-2/keyboard.cpp similarity index 100% rename from source/kernel/drivers/ps-2/keyboard.cpp rename to kernel/drivers/ps-2/keyboard.cpp diff --git a/source/kernel/drivers/ps-2/keyboard.h b/kernel/drivers/ps-2/keyboard.h similarity index 100% rename from source/kernel/drivers/ps-2/keyboard.h rename to kernel/drivers/ps-2/keyboard.h diff --git a/source/kernel/drivers/ps-2/scancodes/set1.h b/kernel/drivers/ps-2/scancodes/set1.h similarity index 100% rename from source/kernel/drivers/ps-2/scancodes/set1.h rename to kernel/drivers/ps-2/scancodes/set1.h diff --git a/source/kernel/drivers/serial/serial.cpp b/kernel/drivers/serial/serial.cpp similarity index 100% rename from source/kernel/drivers/serial/serial.cpp rename to kernel/drivers/serial/serial.cpp diff --git a/source/kernel/drivers/serial/serial.h b/kernel/drivers/serial/serial.h similarity index 100% rename from source/kernel/drivers/serial/serial.h rename to kernel/drivers/serial/serial.h diff --git a/source/kernel/drivers/vga/VBE.h b/kernel/drivers/vga/VBE.h similarity index 100% rename from source/kernel/drivers/vga/VBE.h rename to kernel/drivers/vga/VBE.h diff --git a/source/kernel/drivers/vga/colors.h b/kernel/drivers/vga/colors.h similarity index 100% rename from source/kernel/drivers/vga/colors.h rename to kernel/drivers/vga/colors.h diff --git a/source/kernel/filesystem/EXT2/SuperBlock.h b/kernel/filesystem/EXT2/SuperBlock.h similarity index 100% rename from source/kernel/filesystem/EXT2/SuperBlock.h rename to kernel/filesystem/EXT2/SuperBlock.h diff --git a/source/kernel/filesystem/FAT/BiosParameterBlock.h b/kernel/filesystem/FAT/BiosParameterBlock.h similarity index 100% rename from source/kernel/filesystem/FAT/BiosParameterBlock.h rename to kernel/filesystem/FAT/BiosParameterBlock.h diff --git a/source/kernel/filesystem/FAT/DirectoryEntry.h b/kernel/filesystem/FAT/DirectoryEntry.h similarity index 100% rename from source/kernel/filesystem/FAT/DirectoryEntry.h rename to kernel/filesystem/FAT/DirectoryEntry.h diff --git a/source/kernel/filesystem/FAT/ExtendBootRecord.h b/kernel/filesystem/FAT/ExtendBootRecord.h similarity index 100% rename from source/kernel/filesystem/FAT/ExtendBootRecord.h rename to kernel/filesystem/FAT/ExtendBootRecord.h diff --git a/source/grub.cfg b/kernel/grub.cfg similarity index 100% rename from source/grub.cfg rename to kernel/grub.cfg diff --git a/source/kernel/i386/README.md b/kernel/i386/README.md similarity index 100% rename from source/kernel/i386/README.md rename to kernel/i386/README.md diff --git a/source/kernel/i386/processor.cpp b/kernel/i386/processor.cpp similarity index 100% rename from source/kernel/i386/processor.cpp rename to kernel/i386/processor.cpp diff --git a/source/kernel/i386/processor.h b/kernel/i386/processor.h similarity index 100% rename from source/kernel/i386/processor.h rename to kernel/i386/processor.h diff --git a/source/kernel/interrupts/idt.cpp b/kernel/interrupts/idt.cpp similarity index 100% rename from source/kernel/interrupts/idt.cpp rename to kernel/interrupts/idt.cpp diff --git a/source/kernel/interrupts/idt.h b/kernel/interrupts/idt.h similarity index 100% rename from source/kernel/interrupts/idt.h rename to kernel/interrupts/idt.h diff --git a/source/kernel/interrupts/idt.s b/kernel/interrupts/idt.s similarity index 100% rename from source/kernel/interrupts/idt.s rename to kernel/interrupts/idt.s diff --git a/source/kernel/irq_table.s b/kernel/irq_table.s similarity index 100% rename from source/kernel/irq_table.s rename to kernel/irq_table.s diff --git a/source/kernel/irs_table.s b/kernel/irs_table.s similarity index 100% rename from source/kernel/irs_table.s rename to kernel/irs_table.s diff --git a/source/kernel/kernel.cpp b/kernel/kernel.cpp similarity index 100% rename from source/kernel/kernel.cpp rename to kernel/kernel.cpp diff --git a/source/kernel/kernel.h b/kernel/kernel.h similarity index 100% rename from source/kernel/kernel.h rename to kernel/kernel.h diff --git a/source/kernel/linker.ld b/kernel/linker.ld similarity index 100% rename from source/kernel/linker.ld rename to kernel/linker.ld diff --git a/source/kernel/memory/KernelHeap.cpp b/kernel/memory/KernelHeap.cpp similarity index 100% rename from source/kernel/memory/KernelHeap.cpp rename to kernel/memory/KernelHeap.cpp diff --git a/source/kernel/memory/KernelHeap.h b/kernel/memory/KernelHeap.h similarity index 100% rename from source/kernel/memory/KernelHeap.h rename to kernel/memory/KernelHeap.h diff --git a/source/kernel/memory/PageDirectory.cpp b/kernel/memory/PageDirectory.cpp similarity index 100% rename from source/kernel/memory/PageDirectory.cpp rename to kernel/memory/PageDirectory.cpp diff --git a/source/kernel/memory/PageDirectory.h b/kernel/memory/PageDirectory.h similarity index 100% rename from source/kernel/memory/PageDirectory.h rename to kernel/memory/PageDirectory.h diff --git a/source/kernel/memory/PhysicalMemoryManager.cpp b/kernel/memory/PhysicalMemoryManager.cpp similarity index 100% rename from source/kernel/memory/PhysicalMemoryManager.cpp rename to kernel/memory/PhysicalMemoryManager.cpp diff --git a/source/kernel/memory/PhysicalMemoryManager.h b/kernel/memory/PhysicalMemoryManager.h similarity index 100% rename from source/kernel/memory/PhysicalMemoryManager.h rename to kernel/memory/PhysicalMemoryManager.h diff --git a/source/kernel/memory/TaskStateSegment.h b/kernel/memory/TaskStateSegment.h similarity index 100% rename from source/kernel/memory/TaskStateSegment.h rename to kernel/memory/TaskStateSegment.h diff --git a/source/kernel/memory/VirtualMemoryManager.cpp b/kernel/memory/VirtualMemoryManager.cpp similarity index 100% rename from source/kernel/memory/VirtualMemoryManager.cpp rename to kernel/memory/VirtualMemoryManager.cpp diff --git a/source/kernel/memory/VirtualMemoryManager.h b/kernel/memory/VirtualMemoryManager.h similarity index 100% rename from source/kernel/memory/VirtualMemoryManager.h rename to kernel/memory/VirtualMemoryManager.h diff --git a/source/kernel/memory/gdt/gdt.s b/kernel/memory/gdt/gdt.s similarity index 100% rename from source/kernel/memory/gdt/gdt.s rename to kernel/memory/gdt/gdt.s diff --git a/source/kernel/memory/gdt/gdtc.cpp b/kernel/memory/gdt/gdtc.cpp similarity index 100% rename from source/kernel/memory/gdt/gdtc.cpp rename to kernel/memory/gdt/gdtc.cpp diff --git a/source/kernel/memory/gdt/gdtc.h b/kernel/memory/gdt/gdtc.h similarity index 100% rename from source/kernel/memory/gdt/gdtc.h rename to kernel/memory/gdt/gdtc.h diff --git a/source/kernel/memory/memory.cpp b/kernel/memory/memory.cpp similarity index 100% rename from source/kernel/memory/memory.cpp rename to kernel/memory/memory.cpp diff --git a/source/kernel/memory/memory.h b/kernel/memory/memory.h similarity index 100% rename from source/kernel/memory/memory.h rename to kernel/memory/memory.h diff --git a/source/kernel/memory/memoryinfo.h b/kernel/memory/memoryinfo.h similarity index 100% rename from source/kernel/memory/memoryinfo.h rename to kernel/memory/memoryinfo.h diff --git a/source/kernel/memory/paging.s b/kernel/memory/paging.s similarity index 100% rename from source/kernel/memory/paging.s rename to kernel/memory/paging.s diff --git a/source/kernel/partitiontable/mbr/MasterBootRecord.h b/kernel/partitiontable/mbr/MasterBootRecord.h similarity index 100% rename from source/kernel/partitiontable/mbr/MasterBootRecord.h rename to kernel/partitiontable/mbr/MasterBootRecord.h diff --git a/source/kernel/partitiontable/mbr/PartitionTableEntry.h b/kernel/partitiontable/mbr/PartitionTableEntry.h similarity index 100% rename from source/kernel/partitiontable/mbr/PartitionTableEntry.h rename to kernel/partitiontable/mbr/PartitionTableEntry.h diff --git a/source/kernel/prekernel/bootstructure.h b/kernel/prekernel/bootstructure.h similarity index 100% rename from source/kernel/prekernel/bootstructure.h rename to kernel/prekernel/bootstructure.h diff --git a/source/kernel/prekernel/multiboot.h b/kernel/prekernel/multiboot.h similarity index 100% rename from source/kernel/prekernel/multiboot.h rename to kernel/prekernel/multiboot.h diff --git a/source/kernel/prekernel/prekernel.cpp b/kernel/prekernel/prekernel.cpp similarity index 100% rename from source/kernel/prekernel/prekernel.cpp rename to kernel/prekernel/prekernel.cpp diff --git a/source/kernel/serial.h b/kernel/serial.h similarity index 100% rename from source/kernel/serial.h rename to kernel/serial.h diff --git a/source/kernel/supervisorterminal/superVisorTerminal.cpp b/kernel/supervisorterminal/superVisorTerminal.cpp similarity index 100% rename from source/kernel/supervisorterminal/superVisorTerminal.cpp rename to kernel/supervisorterminal/superVisorTerminal.cpp diff --git a/source/kernel/supervisorterminal/superVisorTerminal.h b/kernel/supervisorterminal/superVisorTerminal.h similarity index 100% rename from source/kernel/supervisorterminal/superVisorTerminal.h rename to kernel/supervisorterminal/superVisorTerminal.h diff --git a/source/kernel/terminal/kterm.cpp b/kernel/terminal/kterm.cpp similarity index 100% rename from source/kernel/terminal/kterm.cpp rename to kernel/terminal/kterm.cpp diff --git a/source/kernel/terminal/kterm.h b/kernel/terminal/kterm.h similarity index 96% rename from source/kernel/terminal/kterm.h rename to kernel/terminal/kterm.h index 8cce182..3207a47 100644 --- a/source/kernel/terminal/kterm.h +++ b/kernel/terminal/kterm.h @@ -5,7 +5,7 @@ #include "../drivers/vga/colors.h" #include "../drivers/io/io.h" -#include "CoreLib/Memory.h" +#include void kterm_init(); diff --git a/source/kernel/time.cpp b/kernel/time.cpp similarity index 100% rename from source/kernel/time.cpp rename to kernel/time.cpp diff --git a/source/kernel/time.h b/kernel/time.h similarity index 100% rename from source/kernel/time.h rename to kernel/time.h diff --git a/source/kernel/timer.cpp b/kernel/timer.cpp similarity index 100% rename from source/kernel/timer.cpp rename to kernel/timer.cpp diff --git a/source/kernel/timer.h b/kernel/timer.h similarity index 100% rename from source/kernel/timer.h rename to kernel/timer.h diff --git a/source/kernel/vfs/VFS.cpp b/kernel/vfs/VFS.cpp similarity index 100% rename from source/kernel/vfs/VFS.cpp rename to kernel/vfs/VFS.cpp diff --git a/source/kernel/vfs/VFS.h b/kernel/vfs/VFS.h similarity index 100% rename from source/kernel/vfs/VFS.h rename to kernel/vfs/VFS.h diff --git a/source/CoreLib/bin/memory.o b/source/CoreLib/bin/memory.o deleted file mode 100644 index 7b6893fc65737d96e5c0f55bb73064c293c0145a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4712 zcmb_fYiv}<6`r~G&h^^6ek{9y!2}k93CMWYCKT3S5{#23yh#iM+!|*ech@WS#qM1b zsG&(nN~qhYNLAY(Ak-gKD^==4RR~d|0&=bZWGoHLJ|d-wB??)o(6oax4y$!0CaBJEz!dI_u9d=_R0&fOWAKH!@k z3rz3sxI!Iw?U$AqXRh&qo0Y$vduw{^AGc;edg|cF^lsnuDaC04;mmb@=FtEj_^{g9 zez_kJ+AnvV`*ZxAN@()kE0p)HkO4n)WPEJq%ExGTKR_g8^YWO8@$8_%YJVTo8BY18 zYk}!8m4pZbzpT!0zZ__4zZ|yXZ%>6z-~CUapEVd0j9WB^mT%#)oHRc@&~AHxez6L* zNw@L#!U4Fs)wGqsC;mhbum(Zk9abJzAWSZ9KTa+~EFs{&b#OLKP><2{B!RE#Wk9PX zaz&ToJqOD&LGBUz@q8ZUS;#PiU-&1U;y4~XU8GWm0J)~f)l06;kOv`Vu~uL`n|h%p zA)^pq2oEF2*0xd5a}dhKnB9UrD3pdbQD$ouwEKNAs5HI=>4fkLBk-72x5Dn1>Awr- zw;@K}DYBIT;=T@%TVyps3kp9*P_}N!4hX;SE<9~69z3{+bmKe|CxF2ovfc#e7DSdG zj8n*WAU}r~sVWO~y$8}?VZARsE(=Q!Rm~wjS`AEbp`7A8cxY~z;_m?MHqFFx$ZpEO zF=bGnR~)}UmRZK+?D?dw1z|Nrw1HtSrAg4{#v!sedo2~W8|HRMb1R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ooA=W{(71jOTHubxo@_)*hF(02Dd2QtN5oJt27{B=`Z`vMk zd_lFKVEAS+#9!u`42Xp2*Od5?QH$o7cLy#sJ`z}5 zz8|!kH}!j!)@k_AcytkedJ)f;u=}iG|K}Fz=a<+$0;BVXr73Fe^5&6Re6_(;-w*Q_ z&AiOLi~i%$aYvdzj@p|RI3EeTs`za3VRASRK1@uWh>76L^LGa4O=4L(h!8H*xPpj# ze+@B!_csxCNsZiJ#=mL&m&Q19r+$UT2Q(hkcuM10jh8e&qwzWs z^@p0jsrffF{#ncaLBuinr^ffSJdDRD<*gc5YV6UtmI&KEjYAqgN<`cljWvxIwEij) zexKEdr4FpQ}#stKtl56(=TZc!wbH|FQ6=9JY_(oU-uutM_4s=}=`Q z+A!*{;)Hk`=QIIYok1Xur8=MY0O=3QqY8hddJAu(bRA99oQ=ni^lkfMqS`UnYKTpwBRE=|=e>=Gn&adnS@ z_r}-W=Imd_N4YzH4bW~Mkm61FdzpkTuI^*tz5WvLw-++{;}^;G_XKG6;ry^XtM3Pg zb9B@{gX*=r4(ES#jkJ#XYm4lj!^aK3gPMgltS@SGr}kU0d$MWe#7FjPsNOt^$bOAynca(-Jsu0hLI!-4@EH0sh^9`I=ipAV6kVRg zICEd9NvG~3&T*FIDGhSlfk^nY*LRDo6cM_9Ca{}?03F|dV0GH*TCZcCvdO#eslv~4 z=T>lv&r}8>WhvHqVk(Ir5}Z*W18~Bkpc2C}9?lYurY6*ssy$r!C`;AGo9p)$7euHX z4>h^|*W1s`{+F7o?BTBH{D`!VyV3LXIQZ}0d(Aa9sJK`2kv>y9`nopUf_$4~LNQ8x zoelRz{+wjOa4H{|CgpDuBOQ}eze+mQ-n^A8{E}*_(4pq2I3w+HOY#GCpu=!~^A=-L diff --git a/source/CoreLib/bin/string.o b/source/CoreLib/bin/string.o deleted file mode 100644 index 482fce0ad4b555babe51f8a5a91c4429992ea669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4400 zcmb_fU2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