From ff8a7e89625986a842bc2246c6e0f4b1b857b15e Mon Sep 17 00:00:00 2001 From: "Zone.N" Date: Thu, 30 May 2024 16:35:28 +0800 Subject: [PATCH] fix CI Signed-off-by: Zone.N --- .github/workflows/workflow.yml | 16 ++++++++++------ CMakePresets.json | 2 +- cmake/3rd.cmake | 2 +- src/kernel/arch/aarch64/arch_main.cpp | 2 +- src/kernel/arch/x86_64/arch_main.cpp | 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f5cda86c0..5ed5b285c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -53,17 +53,21 @@ jobs: - name: x86_64 run: | - cmake --preset=build_x86_64 - # @todo ci 暂时跑不过 - # cmake --build build_x86_64 --target boot - # cmake --build build_x86_64 --target kernel + cmake --preset=build_x86_64 + cmake --build build_x86_64 --target boot + cmake --build build_x86_64 --target kernel cmake --build build_x86_64 --target coverage - name: riscv64 run: | cmake --preset=build_riscv64 - # @todo ci 暂时跑不过 - # cmake --build build_riscv64 --target kernel + cmake --build build_riscv64 --target kernel + + - name: aarch64 + run: | + cmake --preset=build_aarch64 + cmake --build build_aarch64 --target boot + cmake --build build_aarch64 --target kernel - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/CMakePresets.json b/CMakePresets.json index 5ebf5a27b..c884b96f9 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -53,7 +53,7 @@ }, "CMAKE_BUILD_TYPE": { "type": "STRING", - "value": "Debug" + "value": "Release" }, "CMAKE_SYSTEM_NAME": { "type": "STRING", diff --git a/cmake/3rd.cmake b/cmake/3rd.cmake index f661b7229..c75eba673 100644 --- a/cmake/3rd.cmake +++ b/cmake/3rd.cmake @@ -265,7 +265,7 @@ if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "riscv64" OR ${CMAKE_SYSTEM_PROCESSOR} ST CPMAddPackage( NAME fdt_parser GIT_REPOSITORY https://github.com/MRNIU/fdt_parser - GIT_TAG v3.0.2 + GIT_TAG v3.0.3 ) endif () diff --git a/src/kernel/arch/aarch64/arch_main.cpp b/src/kernel/arch/aarch64/arch_main.cpp index ea477ceb4..b1eb4c34d 100644 --- a/src/kernel/arch/aarch64/arch_main.cpp +++ b/src/kernel/arch/aarch64/arch_main.cpp @@ -19,7 +19,7 @@ // printf_bare_metal 基本输出实现 extern "C" void _putchar(char character) { - // sbi_debug_console_write_byte(character); + (void)character; } int32_t ArchInit(uint32_t argc, uint8_t **argv) { diff --git a/src/kernel/arch/x86_64/arch_main.cpp b/src/kernel/arch/x86_64/arch_main.cpp index a519f5cf2..1dd304ae4 100644 --- a/src/kernel/arch/x86_64/arch_main.cpp +++ b/src/kernel/arch/x86_64/arch_main.cpp @@ -27,8 +27,8 @@ extern "C" void _putchar(char character) { serial.Write(character); } static void Fillrect(uint8_t *vram, uint32_t pitch, uint8_t r, uint8_t g, uint8_t b, uint32_t w, uint32_t h) { static const int kPixelWidth = sizeof(uint32_t); - for (auto i = 0; i < w; i++) { - for (auto j = 0; j < h; j++) { + for (uint32_t i = 0; i < w; i++) { + for (uint32_t j = 0; j < h; j++) { vram[j * kPixelWidth] = r; vram[j * kPixelWidth + 1] = g; vram[j * kPixelWidth + 2] = b; @@ -54,7 +54,7 @@ int32_t ArchInit(uint32_t argc, uint8_t **argv) { Fillrect((uint8_t *)boot_info.framebuffer.base, boot_info.framebuffer.pitch, 255, 0, 255, 100, 100); - for (auto i = 0; i < boot_info.memory_map_count; i++) { + for (uint32_t i = 0; i < boot_info.memory_map_count; i++) { printf( "boot_info.memory_map[%d].base_addr: 0x%p, length: 0x%X, type: %d.\n", i, boot_info.memory_map[i].base_addr, boot_info.memory_map[i].length,