Fixing include paths for new structure

Removed non-sensical libc folder from project
This commit is contained in:
Nigel Barink 2022-08-17 14:57:50 +02:00
parent 3b3e2597a1
commit bbfea39c23
21 changed files with 54 additions and 57 deletions

View File

@ -51,51 +51,51 @@ $(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/tty/kterm.cpp -o $(BUILD_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Terminal/kterm.cpp -o $(BUILD_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/boot.o:
$(AS) $(SRC_DIR)/kernel/boot.s -o $(BUILD_DIR)/boot.o
$(AS) $(SRC_DIR)/kernel/KernelLauncher/boot.s -o $(BUILD_DIR)/boot.o
$(BUILD_DIR)/crti.o:
$(AS) $(SRC_DIR)/kernel/crti.s -o $(BUILD_DIR)/crti.o
$(AS) $(SRC_DIR)/kernel/KernelLauncher/crti.s -o $(BUILD_DIR)/crti.o
$(BUILD_DIR)/crtn.o:
$(AS) $(SRC_DIR)/kernel/crtn.s -o $(BUILD_DIR)/crtn.o
$(AS) $(SRC_DIR)/kernel/KernelLauncher/crtn.s -o $(BUILD_DIR)/crtn.o
$(BUILD_DIR)/io.o:
$(CPP) -c $(SRC_DIR)/kernel/io.cpp -o $(BUILD_DIR)/io.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/idt.o:
$(CPP) -c $(SRC_DIR)/kernel/idt/idt.cpp -o $(BUILD_DIR)/idt.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Interrupts/idt/idt.cpp -o $(BUILD_DIR)/idt.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/gdtc.o:
$(CPP) -c $(SRC_DIR)/kernel/gdt/gdtc.cpp -o $(BUILD_DIR)/gdtc.o $(CFLAGS) -fno-exceptions -fno-rtti
$(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/pic/pic.cpp -o $(BUILD_DIR)/pic.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Drivers/PIC/pic.cpp -o $(BUILD_DIR)/pic.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/string.o:
$(CC) -c $(SRC_DIR)/libc/include/string.c -o $(BUILD_DIR)/string.o $(CFLAGS) -std=gnu99
$(CC) -c $(SRC_DIR)/kernel/Lib/string.c -o $(BUILD_DIR)/string.o $(CFLAGS) -std=gnu99
$(BUILD_DIR)/pit.o:
$(CPP) -c $(SRC_DIR)/kernel/pit.cpp -o $(BUILD_DIR)/pit.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Drivers/PIT/pit.cpp -o $(BUILD_DIR)/pit.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/keyboard.o:
$(CPP) -c $(SRC_DIR)/kernel/keyboard/keyboard.cpp -o $(BUILD_DIR)/keyboard.o $(CFLAGS) -fno-exceptions -fno-rtti
$(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/sv-terminal/superVisorTerminal.cpp -o $(BUILD_DIR)/sv-terminal.o $(CFLAGS) -fno-exceptions -fno-rtti
$(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/memory.cpp -o $(BUILD_DIR)/memory.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Memory/memory.cpp -o $(BUILD_DIR)/memory.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/paging.o:
$(CPP) -c $(SRC_DIR)/kernel/memory/paging.cpp -o $(BUILD_DIR)/paging.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/Memory/paging.cpp -o $(BUILD_DIR)/paging.o $(CFLAGS) -fno-exceptions -fno-rtti

View File

@ -1,5 +1,5 @@
#pragma once
#include "../io.h"
#include "../../io.h"
#define PIC1 0x20 /* IO base address for master PIC */
#define PIC2 0xA0 /* IO base address for slave PIC */

View File

@ -1,5 +1,5 @@
#include "pit.h"
#include "tty/kterm.h"
#include "../../Terminal/kterm.h"
uint32_t pit_tick = 0;

View File

@ -1,6 +1,6 @@
#pragma once
#include <stdint.h>
#include "io.h"
#include "../../io.h"
#define PIT_DATA_0 0x40
#define PIT_DATA_1 0x41
#define PIT_DATA_2 0x42

View File

@ -1,6 +1,6 @@
#pragma once
#include <stdint.h>
#include "../tty/kterm.h"
#include "../../Terminal/kterm.h"
typedef enum ScanCodeSet{
None = 0,
ScanCodeSet1 = 1,

View File

@ -1,6 +1,6 @@
#include "idt.h"
#include "../pit.h"
#include "../keyboard/keyboard.h"
#include "../../Drivers/PIT/pit.h"
#include "../../Drivers/PS-2/keyboard.h"
IDT_entry idt_table[256];
IDT_ptr idt_ptr;

View File

@ -2,10 +2,10 @@
#include "stdint.h"
#include "stddef.h"
#include "../vga/colors.h"
#include "../pic/pic.h"
#include "../../Drivers/VGA/colors.h"
#include "../../Drivers/PIC/pic.h"
#include "../tty/kterm.h"
#include "../../Terminal/kterm.h"
extern "C" {

View File

@ -21,11 +21,11 @@ stack_bottom:
stack_top:
.section .text
.include "./src/kernel/gdt/gdt.s"
.include "./src/kernel/Memory/GDT/gdt.s"
.include "./src/kernel/irs_table.s"
.include "./src/kernel/irq_table.s"
.include "./src/kernel/idt/idt.s"
.include "./src/kernel/paging.s"
.include "./src/kernel/Interrupts/idt/idt.s"
.include "./src/kernel/Memory/paging.s"
.include "./src/kernel/cpu.s"
.global _start

View File

@ -1,8 +1,8 @@
#pragma once
#include "bootloader/multiboot.h"
#include "../multiboot.h"
#define CHECK_FLAG(flags, bit) ((flags) & (1 <<(bit)))
#include "tty/kterm.h"
#include "../Terminal/kterm.h"

View File

@ -1,5 +1,5 @@
#include "gdtc.h"
#include "../tty/kterm.h"
#include "../../Terminal/kterm.h"
#define NULL_SEGMENT 0
#define KERNEL_CODE_SEGMENT 1

View File

@ -3,10 +3,10 @@
#include <stddef.h>
#include "memoryinfo.h"
#include "../bootloader/multiboot.h"
#include "../tty/kterm.h"
#include "../../libc/include/mem.h"
#include "../kstructures/bitmap.h"
#include "../multiboot.h"
#include "../Terminal/kterm.h"
#include "../Lib/mem.h"
#include "../bitmap.h"
#define BLOCK_SIZE 4092
#define BLOCKS_PER_WORD 32 // A word is 16 bit in x86 machines according to my google search results!

View File

@ -1,7 +1,7 @@
#pragma once
#include "./memory.h"
#include "./../tty/kterm.h"
#include "memory.h"
#include "paging.definitions.h"
#include "../Terminal/kterm.h"
#include "../cpu.h"
extern "C" void loadPageDirectory (uint32_t* addr );

View File

@ -1,9 +1,9 @@
#pragma once
#include "../tty/kterm.h"
#include "../Terminal/kterm.h"
#include "../time.h"
#include "../pit.h"
#include "../keyboard/keyboard.h"
#include "../memory/memory.h"
#include "../Drivers/PIT/pit.h"
#include "../Drivers/PS-2/keyboard.h"
#include "../Memory/memory.h"
#include "../bootinfo.h"
void startSuperVisorTerminal(BootInfo * );

View File

@ -4,11 +4,11 @@
#include <stdint.h>
#include <stdbool.h>
#include "../vga/colors.h"
#include "../Drivers/VGA/colors.h"
#include "../io.h"
extern "C"{
#include "./../../libc/include/string.h"
#include "../Lib/string.h"
}
void kterm_init();

View File

@ -1,6 +1,5 @@
#pragma once
#include "memory/memoryinfo.h"
#include "Memory/memoryinfo.h"
struct BootInfo{
const char* BootStructureID = "BarinkOS";

View File

@ -3,8 +3,6 @@
* Kernel definitions
*/
#define __DEBUG__ false
#define KERNEL_VERSION 0

View File

@ -1,32 +1,32 @@
#pragma once
extern "C"
{
#include "../libc/include/string.h"
#include "Lib/string.h"
}
#include "definitions.h"
#include "vga/VBE.h"
#include "tty/kterm.h"
#include "Drivers/VGA/VBE.h"
#include "Terminal/kterm.h"
#include "./bootloader/multiboot.h"
#include "multiboot.h"
#include "bootinfo.h"
#include "memory/memory.h"
#include "memory/memoryinfo.h"
#include "memory/paging.h"
#include "bootcheck.h"
#include "Memory/memory.h"
#include "Memory/memoryinfo.h"
#include "Memory/paging.h"
#include "KernelLauncher/bootcheck.h"
#include "gdt/gdtc.h"
#include "idt/idt.h"
#include "Memory/GDT/gdtc.h"
#include "Interrupts/idt/idt.h"
#include "pit.h"
#include "Drivers/PIT/pit.h"
#include "io.h"
#include "cpu.h"
#include "serial.h"
#include "time.h"
#include "sv-terminal/superVisorTerminal.h"
#include "SuperVisorTerminal/superVisorTerminal.h"
#define CHECK_FLAG(flags, bit) ((flags) & (1 <<(bit)))
#define PANIC(message) {return;}

View File

@ -1,6 +1,6 @@
#pragma once
#include "tty/kterm.h"
#include "Terminal/kterm.h"
#include "io.h"
#define PORT 0x3f8
static int init_serial() {