diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | kernel/boot.s | 16 | ||||
| -rw-r--r-- | kernel/details/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | kernel/kernel.cpp (renamed from kernel/kernel.c) | 0 |
4 files changed, 22 insertions, 16 deletions
diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt new file mode 100644 index 0000000..cd249d0 --- /dev/null +++ b/kernel/CMakeLists.txt @@ -0,0 +1,14 @@ +target_link_options(CXX_LINKER_REQUIREMENTS INTERFACE + LINKER:-T${CMAKE_CURRENT_LIST_DIR}/linker.ld +) + +add_library(Kernel INTERFACE) + +add_library(Main STATIC) +target_sources(Main PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/kernel.cpp +) +target_link_libraries(Main PUBLIC CXX_COMPILER_REQUIREMENTS Architecture Include) +target_link_libraries(Kernel INTERFACE Main) + +add_subdirectory(details) diff --git a/kernel/boot.s b/kernel/boot.s deleted file mode 100644 index 11175af..0000000 --- a/kernel/boot.s +++ /dev/null @@ -1,16 +0,0 @@ -section .text -extern main, _estack, _init -global _start:function -_start: - ; Stack setup - mov eax, _estack - ; Align stack to odd address - and eax, 0xFFFFFFFE - mov esp, eax - - call _init - call main - cli -.hang: hlt - jmp .hang -; .end: diff --git a/kernel/details/CMakeLists.txt b/kernel/details/CMakeLists.txt new file mode 100644 index 0000000..881d360 --- /dev/null +++ b/kernel/details/CMakeLists.txt @@ -0,0 +1,8 @@ +target_sources(CPUID + PUBLIC + FILE_SET HEADERS + BASE_DIRS + ${CMAKE_CURRENT_LIST_DIR} + FILES + ${CMAKE_CURRENT_LIST_DIR}/Platform.h +) diff --git a/kernel/kernel.c b/kernel/kernel.cpp index c280755..c280755 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.cpp |
