From 4538046c72f81d7b0fa925886397cf249048ca91 Mon Sep 17 00:00:00 2001 From: Youjie Zheng Date: Fri, 26 Jul 2024 17:22:00 +0800 Subject: [PATCH 1/5] fix: use bus-pci default --- Makefile | 2 +- scripts/make/features.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aa1aabd..112db6e 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ override FEATURES += fp_simd BLK ?= y NET ?= y GRAPHIC ?= n -BUS ?= mmio +BUS ?= pci DISK_IMG ?= disk.img QEMU_LOG ?= n diff --git a/scripts/make/features.mk b/scripts/make/features.mk index 0dcc78b..aad62bd 100644 --- a/scripts/make/features.mk +++ b/scripts/make/features.mk @@ -62,8 +62,8 @@ else $(error "LOG" must be one of "off", "error", "warn", "info", "debug", "trace") endif -ifeq ($(BUS),pci) - ax_feat += bus-pci +ifeq ($(BUS),mmio) + ax_feat += bus-mmio endif ifeq ($(shell test $(SMP) -gt 1; echo $$?),0) From 1ba6ead193bc1235e96fb1a050405fbb9f433282 Mon Sep 17 00:00:00 2001 From: Youjie Zheng Date: Fri, 26 Jul 2024 17:22:35 +0800 Subject: [PATCH 2/5] build: update dependency version --- tools/axlibc/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/axlibc/Cargo.toml b/tools/axlibc/Cargo.toml index a220551..7f68981 100644 --- a/tools/axlibc/Cargo.toml +++ b/tools/axlibc/Cargo.toml @@ -22,7 +22,7 @@ crate-type = ["lib", "staticlib"] [features] default = [] -irq = ["axfeat/irq", "arch_boot/irq"] +irq = ["arceos_posix_api/irq", "arch_boot/irq"] # Multicore smp = ["arceos_posix_api/smp", "arch_boot/smp"] @@ -61,4 +61,4 @@ axerrno = { git = "https://github.com/Starry-OS/axerrno.git" } arch_boot = { git = "https://github.com/Starry-OS/arch_boot.git" } [build-dependencies] -bindgen ={ version = "0.66" } \ No newline at end of file +bindgen ={ version = "0.69" } \ No newline at end of file From f4a3ed6e320468c828982771230a6bccc6f73904 Mon Sep 17 00:00:00 2001 From: Youjie Zheng Date: Fri, 26 Jul 2024 17:24:52 +0800 Subject: [PATCH 3/5] chore: add nightly toolchain for CI test --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d460b1f..c36ae4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - rust-toolchain: [nightly-2024-05-02] + rust-toolchain: [nightly, nightly-2024-05-02] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }} @@ -90,7 +90,7 @@ jobs: matrix: os: [ubuntu-latest] arch: [x86_64, riscv64, aarch64] - rust-toolchain: [nightly-2024-05-02] + rust-toolchain: [nightly, nightly-2024-05-02] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }} @@ -189,7 +189,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - rust-toolchain: [nightly-2024-05-02] + rust-toolchain: [nightly, nightly-2024-05-02] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }} @@ -311,7 +311,7 @@ jobs: matrix: os: [ubuntu-latest] arch: [x86_64, riscv64, aarch64] - rust-toolchain: [nightly-2024-05-02] + rust-toolchain: [nightly, nightly-2024-05-02] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }} From e331336cc888fc42ee7597cdda721754a69f1331 Mon Sep 17 00:00:00 2001 From: Youjie Zheng Date: Fri, 26 Jul 2024 17:51:43 +0800 Subject: [PATCH 4/5] chore: close BLK and NET default when making the kernel image --- .github/workflows/build.yml | 3 +++ Makefile | 4 ++-- scripts/test/app_test_for_monolithic.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c36ae4f..c731aac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,9 @@ jobs: - name: Clone Top Repository if: github.repository != 'Starry-OS/Starry' run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }} && cd ${{ env.WORKING_DIRECTORY }} && git checkout ${{ inputs.TopBranch }} + - name: Update Top Repository + working-directory: ${{ env.WORKING_DIRECTORY }} + run: make pre_update - name: Check rust version working-directory: ${{ env.WORKING_DIRECTORY }} run: rustc --version --verbose diff --git a/Makefile b/Makefile index 112db6e..516aeb3 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ STRUCT ?= Unikernel override FEATURES += fp_simd # QEMU options -BLK ?= y -NET ?= y +BLK ?= n +NET ?= n GRAPHIC ?= n BUS ?= pci diff --git a/scripts/test/app_test_for_monolithic.sh b/scripts/test/app_test_for_monolithic.sh index 8ea24d5..2aff2d3 100755 --- a/scripts/test/app_test_for_monolithic.sh +++ b/scripts/test/app_test_for_monolithic.sh @@ -67,7 +67,7 @@ function test_one() { local args=$1 local actual="$APP/actual.out" # 默认要用批量测试模式 - args="$args ARCH=$ARCH APP_FEATURES=batch ACCEL=n" + args="$args ARCH=$ARCH APP_FEATURES=batch ACCEL=n NET=y BLK=y" rm -f "$actual" MSG= From e3341f81ff9fdb0e565f12964fae883eeca213ee Mon Sep 17 00:00:00 2001 From: Youjie Zheng Date: Fri, 26 Jul 2024 21:11:32 +0800 Subject: [PATCH 5/5] fix: remove binary asm labels in libc --- tools/axlibc/src/setjmp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/axlibc/src/setjmp.rs b/tools/axlibc/src/setjmp.rs index aed4441..159d298 100644 --- a/tools/axlibc/src/setjmp.rs +++ b/tools/axlibc/src/setjmp.rs @@ -163,9 +163,9 @@ pub unsafe extern "C" fn longjmp(_buf: *mut ctypes::__jmp_buf_tag, _val: c_int) core::arch::asm!( "mov rax,rsi test rax,rax - jnz 1f + jnz 2f inc rax - 1: + 2: mov rbx, [rdi] mov rbp, [rdi + 8] mov r12, [rdi + 16]