Skip to content

Commit

Permalink
doc(README): update
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed May 25, 2024
1 parent 9b28252 commit 4c46bb5
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 41 deletions.
65 changes: 42 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,35 @@

本分支是 SImpleKernel 的首个分支。在本分支中,完成了构建系统的基础搭建、基本的文档部署与自动化测试,当然还有最重要的,有基于 uefi 的 x86_64 内核与由 opensbi 启动的 riscv64 内核,可以在 qemu 上运行,并实现了简单的屏幕输出。

调用顺序

- x86_64/aarch64
uefi->main.cpp:main->arch.cpp:arch_init

- riscv64
opensbi->boot.S:_start->main.cpp:main->arch.cpp:arch_init
- 调用顺序

- x86_64/aarch64

<img src='https://g.gravizo.com/svg?
@startuml;
uefi_shell->efi_main:boot.cpp;
efi_main->_start:main.cpp;
_start->cpp_init:libcxx.cpp;
cpp_init->main:main.cpp;
main->arch_init:arch.cpp;
arch_init->main;
main->main;
@enduml
'>

- riscv64

<img src='https://g.gravizo.com/svg?
@startuml;
opensbi->_boot:boot.S;
_boot->_start:main.cpp;
_start->cpp_init:libcxx.cpp;
cpp_init->main:main.cpp;
main->arch_init:arch_init.cpp;
arch_init->main;
main->main;
@enduml
'>

- 构建系统

Expand All @@ -45,7 +67,11 @@

- 基于 opensbi 引导的 riscv64 内核

由 opensbi 进行初始化,直接跳转到内核地址,进入内核逻辑时为 S 态
1. 由 opensbi 进行初始化,直接跳转到内核地址,进入内核逻辑时为 S 态
2. gp 寄存器的初始化
3. 对 qemu 传递的 dtb 信息进行解析
4. ns16550a 串口驱动
5. 基于 opensbi 的 printf

- 基于 doxygen 的文档生成与自动部署

Expand Down Expand Up @@ -75,29 +101,22 @@

见 新增特性

## 依赖
## 使用的第三方资源

[CPM](https://github.com/cpm-cmake/CPM.cmake)

[CPMLicences.cmake](https://github.com/TheLartians/CPMLicenses.cmake)

[google/googletest](https://github.com/google/googletest)

[opensbi](https://github.com/riscv-software-src/opensbi)

[doxygen](https://www.doxygen.nl/)

[lcov](https://github.com/linux-test-project/lcov)

[gcc](https://gcc.gnu.org/)
[gnu-efi](https://sourceforge.net/projects/gnu-efi/)

[qemu](https://www.qemu.org/)
[gdbinit](https://github.com/gdbinit/Gdbinit)

[cppcheck](https://cppcheck.sourceforge.io/)
[opensbi_interface](https://github.com/MRNIU/opensbi_interface)

[clang-tidy](https://clang.llvm.org/extra/clang-tidy/)
[printf_bare_metal](https://github.com/MRNIU/printf_bare_metal)

[clang-format](https://clang.llvm.org/docs/ClangFormat.html)
[fdt_parser](https://github.com/MRNIU/fdt_parser)

[gnu-efi](https://sourceforge.net/projects/gnu-efi/)
[CPMLicences.cmake](https://github.com/TheLartians/CPMLicenses.cmake)

[google/googletest](https://github.com/google/googletest)
53 changes: 38 additions & 15 deletions README_ENG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ Kernels with different levels of completion are available, and you can start fro

This branch is the first branch of SImpleKernel. In this branch, the foundation of the build system is completed, basic documentation deployment and automated testing, and of course the most important, there is a uefi based x86_64 kernel and riscv64 kernel started by opensbi, which can run on qemu, and achieve simple screen output.

- Control flow

- x86_64/aarch64

<img src='https://g.gravizo.com/svg?
@startuml;
uefi_shell->efi_main:boot.cpp;
efi_main->_start:main.cpp;
_start->cpp_init:libcxx.cpp;
cpp_init->main:main.cpp;
main->arch_init:arch.cpp;
arch_init->main;
main->main;
@enduml
'>

- riscv64

<img src='https://g.gravizo.com/svg?
@startuml;
opensbi->_boot:boot.S;
_boot->_start:main.cpp;
_start->cpp_init:libcxx.cpp;
cpp_init->main:main.cpp;
main->arch_init:arch_init.cpp;
arch_init->main;
main->main;
@enduml
'>

- Build system

Reference [MRNIU/cmake-kernel](https://github.com/MRNIU/cmake-kernel) build system, a detailed explanation see [doc/build_system.md](./doc/build_system.md)
Expand Down Expand Up @@ -69,29 +99,22 @@ This branch is the first branch of SImpleKernel. In this branch, the foundation

See What's NEW

## Dependencies
## 3rd

[CPM](https://github.com/cpm-cmake/CPM.cmake)

[CPMLicences.cmake](https://github.com/TheLartians/CPMLicenses.cmake)

[google/googletest](https://github.com/google/googletest)

[opensbi](https://github.com/riscv-software-src/opensbi)

[doxygen](https://www.doxygen.nl/)

[lcov](https://github.com/linux-test-project/lcov)

[gcc](https://gcc.gnu.org/)
[gnu-efi](https://sourceforge.net/projects/gnu-efi/)

[qemu](https://www.qemu.org/)
[gdbinit](https://github.com/gdbinit/Gdbinit)

[cppcheck](https://cppcheck.sourceforge.io/)
[opensbi_interface](https://github.com/MRNIU/opensbi_interface)

[clang-tidy](https://clang.llvm.org/extra/clang-tidy/)
[printf_bare_metal](https://github.com/MRNIU/printf_bare_metal)

[clang-format](https://clang.llvm.org/docs/ClangFormat.html)
[fdt_parser](https://github.com/MRNIU/fdt_parser)

[gnu-efi](https://sourceforge.net/projects/gnu-efi/)
[CPMLicences.cmake](https://github.com/TheLartians/CPMLicenses.cmake)

[google/googletest](https://github.com/google/googletest)
6 changes: 3 additions & 3 deletions cmake/3rd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ CPMAddPackage(
)

if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "riscv64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
# https://github.com/MRNIU/fdt-parser
# https://github.com/MRNIU/fdt_parser
CPMAddPackage(
NAME fdt_parser
GIT_REPOSITORY https://github.com/MRNIU/fdt-parser
GIT_TAG v3.0.0
GIT_REPOSITORY https://github.com/MRNIU/fdt_parser
GIT_TAG v3.0.2
)
endif ()

Expand Down

0 comments on commit 4c46bb5

Please sign in to comment.