forked from Simple-XX/SimpleKernel
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Zone.N <[email protected]>
- Loading branch information
Showing
36 changed files
with
1,178 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cpu_io
updated
5 files
+1 −1 | .pre-commit-config.yaml | |
+33 −0 | include/aarch64/cpu.hpp | |
+114 −0 | include/riscv64/cpu.hpp | |
+9 −0 | include/riscv64/regs.hpp | |
+36 −12 | include/x86_64/cpu.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,32 @@ | ||
|
||
# This file is a part of Simple-XX/SimpleKernel | ||
# (https://github.com/Simple-XX/SimpleKernel). | ||
# | ||
# CMakeLists.txt for Simple-XX/SimpleKernel. | ||
|
||
# 设置项目名与版本 | ||
project( | ||
kernel | ||
VERSION 0.0.1 | ||
) | ||
PROJECT (kernel VERSION 0.0.1) | ||
|
||
enable_language(ASM) | ||
enable_language(C) | ||
enable_language(CXX) | ||
ENABLE_LANGUAGE (ASM) | ||
ENABLE_LANGUAGE (C) | ||
ENABLE_LANGUAGE (CXX) | ||
|
||
add_subdirectory(${PROJECT_SOURCE_DIR}/libc) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/libcxx) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/arch) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/driver) | ||
ADD_SUBDIRECTORY (${PROJECT_SOURCE_DIR}/libc) | ||
ADD_SUBDIRECTORY (${PROJECT_SOURCE_DIR}/libcxx) | ||
ADD_SUBDIRECTORY (${PROJECT_SOURCE_DIR}/arch) | ||
ADD_SUBDIRECTORY (${PROJECT_SOURCE_DIR}/driver) | ||
|
||
add_executable(${PROJECT_NAME} | ||
main.cpp | ||
) | ||
ADD_EXECUTABLE (${PROJECT_NAME} main.cpp) | ||
|
||
# 添加头文件 | ||
target_include_directories(kernel PRIVATE | ||
include | ||
) | ||
TARGET_INCLUDE_DIRECTORIES (kernel PRIVATE include) | ||
|
||
# 添加要链接的库 | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
kernel_link_libraries | ||
libc | ||
libcxx | ||
arch | ||
driver | ||
) | ||
TARGET_LINK_LIBRARIES (${PROJECT_NAME} PRIVATE kernel_link_libraries libc | ||
libcxx arch driver) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${KERNEL_ELF_OUTPUT_NAME}) | ||
SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES PREFIX "") | ||
SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES OUTPUT_NAME | ||
${KERNEL_ELF_OUTPUT_NAME}) | ||
|
||
# 获取目标文件信息 | ||
objdump_readelf_nm(${PROJECT_NAME}) | ||
OBJDUMP_READELF_NM (${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.