From 70c6b78e35d627b1d609a4b7728f10b2198cd9ff Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 19 Nov 2022 17:59:49 +0100 Subject: [PATCH] Organize source tree --- kernel/src/arch/x86_64/MMU.cpp | 2 +- kernel/src/{ => boot}/Init.cpp | 8 ++++---- kernel/src/{ => boot}/Init.h | 0 kernel/src/{ => boot}/bootboot.h | 2 +- kernel/src/main.cpp | 6 +++--- kernel/src/{ => memory}/MemoryManager.cpp | 4 ++-- kernel/src/{ => memory}/MemoryManager.h | 0 kernel/src/{ => video}/Framebuffer.cpp | 4 ++-- kernel/src/{ => video}/Framebuffer.h | 0 9 files changed, 13 insertions(+), 13 deletions(-) rename kernel/src/{ => boot}/Init.cpp (79%) rename kernel/src/{ => boot}/Init.h (100%) rename kernel/src/{ => boot}/bootboot.h (99%) rename kernel/src/{ => memory}/MemoryManager.cpp (98%) rename kernel/src/{ => memory}/MemoryManager.h (100%) rename kernel/src/{ => video}/Framebuffer.cpp (96%) rename kernel/src/{ => video}/Framebuffer.h (100%) diff --git a/kernel/src/arch/x86_64/MMU.cpp b/kernel/src/arch/x86_64/MMU.cpp index 83606dde..474e648d 100644 --- a/kernel/src/arch/x86_64/MMU.cpp +++ b/kernel/src/arch/x86_64/MMU.cpp @@ -1,5 +1,5 @@ #include "arch/MMU.h" -#include "MemoryManager.h" +#include "memory/MemoryManager.h" #include #define PAGE_SIZE 4096 diff --git a/kernel/src/Init.cpp b/kernel/src/boot/Init.cpp similarity index 79% rename from kernel/src/Init.cpp rename to kernel/src/boot/Init.cpp index 781d1473..46791f34 100644 --- a/kernel/src/Init.cpp +++ b/kernel/src/boot/Init.cpp @@ -1,9 +1,9 @@ -#include "Init.h" -#include "Framebuffer.h" -#include "MemoryManager.h" +#include "boot/Init.h" #include "arch/CPU.h" #include "arch/Serial.h" -#include "bootboot.h" +#include "boot/bootboot.h" +#include "memory/MemoryManager.h" +#include "video/Framebuffer.h" #include extern BOOTBOOT bootboot; diff --git a/kernel/src/Init.h b/kernel/src/boot/Init.h similarity index 100% rename from kernel/src/Init.h rename to kernel/src/boot/Init.h diff --git a/kernel/src/bootboot.h b/kernel/src/boot/bootboot.h similarity index 99% rename from kernel/src/bootboot.h rename to kernel/src/boot/bootboot.h index 8ac1207e..7e6b6a17 100644 --- a/kernel/src/bootboot.h +++ b/kernel/src/boot/bootboot.h @@ -1,5 +1,5 @@ /* - * bootboot.h + * boot/bootboot.h * https://gitlab.com/bztsrc/bootboot * * Copyright (C) 2017 - 2021 bzt (bztsrc@gitlab) diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index f08ea018..75ea1339 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -1,9 +1,9 @@ -#include "Framebuffer.h" -#include "Init.h" -#include "MemoryManager.h" #include "arch/CPU.h" #include "arch/MMU.h" #include "arch/Serial.h" +#include "boot/Init.h" +#include "memory/MemoryManager.h" +#include "video/Framebuffer.h" extern u8 fb[1]; diff --git a/kernel/src/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp similarity index 98% rename from kernel/src/MemoryManager.cpp rename to kernel/src/memory/MemoryManager.cpp index e089953a..74357446 100644 --- a/kernel/src/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -1,7 +1,7 @@ -#include "MemoryManager.h" +#include "memory/MemoryManager.h" #include "arch/MMU.h" #include "arch/Serial.h" -#include "bootboot.h" +#include "boot/bootboot.h" #include #include #include diff --git a/kernel/src/MemoryManager.h b/kernel/src/memory/MemoryManager.h similarity index 100% rename from kernel/src/MemoryManager.h rename to kernel/src/memory/MemoryManager.h diff --git a/kernel/src/Framebuffer.cpp b/kernel/src/video/Framebuffer.cpp similarity index 96% rename from kernel/src/Framebuffer.cpp rename to kernel/src/video/Framebuffer.cpp index 6328c33b..8de99d62 100644 --- a/kernel/src/Framebuffer.cpp +++ b/kernel/src/video/Framebuffer.cpp @@ -1,5 +1,5 @@ -#include "Framebuffer.h" -#include "bootboot.h" +#include "video/Framebuffer.h" +#include "boot/bootboot.h" static u8* g_fb_ptr = nullptr; static u32 g_fb_size; diff --git a/kernel/src/Framebuffer.h b/kernel/src/video/Framebuffer.h similarity index 100% rename from kernel/src/Framebuffer.h rename to kernel/src/video/Framebuffer.h