diff --git a/.github/workflows/kernel_test.yml b/.github/workflows/kernel_test.yml
index a5186e0e..a55fb750 100644
--- a/.github/workflows/kernel_test.yml
+++ b/.github/workflows/kernel_test.yml
@@ -16,8 +16,6 @@ jobs:
- uses: actions/checkout@v4
- - run: make install_osdk
-
- name: Check
id: check
run: make check
@@ -31,8 +29,6 @@ jobs:
- uses: actions/checkout@v4
- - run: make install_osdk
-
- name: Usermode Unit test
id: usermode_unit_test
run: make test
@@ -52,8 +48,6 @@ jobs:
- uses: actions/checkout@v4
- - run: make install_osdk
-
- name: Boot Test (Multiboot)
id: boot_test_mb
run: make run AUTO_TEST=boot ENABLE_KVM=0 BOOT_PROTOCOL=multiboot RELEASE_MODE=1
diff --git a/Makefile b/Makefile
index cfe843eb..1c01bc81 100644
--- a/Makefile
+++ b/Makefile
@@ -98,14 +98,18 @@ OSDK_CRATES := \
kernel/comps/virtio \
kernel/libs/aster-util
-.PHONY: all install_osdk build tools run test docs check clean update_initramfs
+.PHONY: all build tools run test docs check clean update_initramfs
all: build
-install_osdk:
+# Install or update OSDK from source
+# To uninstall, do `cargo uninstall cargo-osdk`
+install_osdk: osdk
@cargo install cargo-osdk --path osdk
-build:
+~/.cargo/bin/cargo-osdk: install_osdk
+
+build: install_osdk ~/.cargo/bin/cargo-osdk
@make --no-print-directory -C regression
@cd kernel && cargo osdk build $(CARGO_OSDK_ARGS)
@@ -120,7 +124,7 @@ test:
(cd $$dir && cargo test) || exit 1; \
done
-ktest:
+ktest: install_osdk ~/.cargo/bin/cargo-osdk
@# Exclude linux-bzimage-setup from ktest since it's hard to be unit tested
@for dir in $(OSDK_CRATES); do \
[ $$dir = "framework/libs/linux-bzimage/setup" ] && continue; \
@@ -135,7 +139,7 @@ docs:
format:
@./tools/format_all.sh
-check:
+check: install_osdk ~/.cargo/bin/cargo-osdk
@./tools/format_all.sh --check # Check Rust format issues
@# Check if STD_CRATES and NOSTD_CRATES combined is the same as all workspace members
@sed -n '/^\[workspace\]/,/^\[.*\]/{/members = \[/,/\]/p}' Cargo.toml | grep -v "members = \[" | tr -d '", \]' | sort > /tmp/all_crates
diff --git a/README.md b/README.md
index 83dfdc75..e81ded61 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@

- A secure, fast, and general-purpose OS kernel written in Rust and compatible with Linux
+ A secure, fast, and general-purpose OS kernel written in Rust and compatible with Linux
+
+
+
-[](https://github.com/asterinas/asterinas/actions/workflows/license_check.yml)
-[](https://github.com/asterinas/asterinas/actions/workflows/kernel_test.yml)
-
English | [中文版](README_CN.md)
## Introducing Asterinas
@@ -55,13 +55,7 @@ git clone https://github.com/asterinas/asterinas
docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.0
```
-3. Install the Asterinas OSDK from source.
-
-```bash
-make install_osdk
-```
-
-4. Inside the container, go to the project folder to build and run Asterinas.
+3. Inside the container, go to the project folder to build and run Asterinas.
```bash
make build
diff --git a/README_CN.md b/README_CN.md
index 5500ee47..86240dd7 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -1,10 +1,11 @@

- 一个安全、快速、通用的操作系统内核,使用Rust编写,并与Linux兼容
+ 一个安全、快速、通用的操作系统内核,使用Rust编写,并与Linux兼容
+
+
+
-[](https://github.com/asterinas/asterinas/actions/workflows/aster_ci.yml)
-
[English](README.md) | 中文版
## 初见星绽
@@ -50,13 +51,7 @@ git clone https://github.com/asterinas/asterinas
docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.0
```
-3. 从源码编译安装 Asterinas OSDK
-
-```bash
-make install_osdk
-```
-
-4. 在容器内,进入项目文件夹构建并运行星绽。
+3. 在容器内,进入项目文件夹构建并运行星绽。
```bash
make build
diff --git a/osdk/README.md b/osdk/README.md
index 8bb5756c..15d11580 100644
--- a/osdk/README.md
+++ b/osdk/README.md
@@ -1,7 +1,7 @@
# Accelerate OS development with Asterinas OSDK
[](https://crates.io/crates/cargo-osdk)
-[](https://github.com/asterinas/asterinas/actions/workflows/osdk_ci.yml)
+[](https://github.com/asterinas/asterinas/actions/workflows/osdk_test.yml)
### What is it?
diff --git a/osdk/src/cli.rs b/osdk/src/cli.rs
index 13d62903..14e7a1c5 100644
--- a/osdk/src/cli.rs
+++ b/osdk/src/cli.rs
@@ -115,7 +115,7 @@ pub struct TestArgs {
pub struct CargoArgs {
#[arg(
long,
- help = "The Cargo build profile (built-in candidates are 'debug', 'release', 'dev' and 'bench')",
+ help = "The Cargo build profile (built-in candidates are 'dev', 'release', 'test' and 'bench')",
default_value = "dev"
)]
pub profile: String,
diff --git a/osdk/src/config_manager/manifest.rs b/osdk/src/config_manager/manifest.rs
index 98a28c53..5631069e 100644
--- a/osdk/src/config_manager/manifest.rs
+++ b/osdk/src/config_manager/manifest.rs
@@ -150,7 +150,7 @@ fn check_args(arg_name: &str, args: &[String]) {
/// Check cfg that is in the form that we can accept
fn check_cfg(cfg: &str) {
if SELECT_REGEX.captures(cfg).is_none() {
- error_msg!("{} is not allowed to used after `qemu` in `OSDK.toml`. Currently we only allow cfgs like `cfg(select=\"foo\")`", cfg);
+ error_msg!("{} is not allowed to be used after `qemu` in `OSDK.toml`. Currently we only allow cfgs like `cfg(select=\"foo\")`", cfg);
process::exit(Errno::ParseMetadata as _);
}
}