OSDK 使用者指南
概覽
The Asterinas OSDK (short for Operating System Development Kit) is designed to simplify the development of Rust operating systems. It aims to streamline the process by leveraging the framekernel architecture.
OSDK 提供了一個命令行工具 cargo-osdk ,有助於基於框內核架構開發的專案管理。 cargo-osdk 可以作為 Cargo 的子命令使用。就像 Cargo 之於 Rust 專案一樣, cargo-osdk 讓建置、執行和測試專案變得非常方便。
安裝 OSDK
Requirements
Currently, OSDK is only supported on x86_64 Ubuntu systems. We will add support for more operating systems in the future.
To run a kernel developed by OSDK with QEMU, the following tools need to be installed:
- Rust >= 1.75.0
- cargo-binutils
- gcc
- gdb
- grub
- ovmf
- qemu-system-x86_64
- xorriso
The dependencies required for installing Rust and running QEMU can be installed by:
apt install build-essential curl gdb grub-efi-amd64 grub2-common \
libpixman-1-dev mtools ovmf qemu-system-x86 xorriso
關於如何安裝 Rust,您可以參考官方網站。
在安裝 Rust 之後,可以透過以下方式安裝 cargo-binutils
cargo install cargo-binutils
安裝
cargo-osdk is published on crates.io, and can be installed by running
cargo install cargo-osdk
升級
If cargo-osdk is already installed, the tool can be upgraded by running
cargo install --force cargo-osdk