1.6 KiB
1.6 KiB
AIOS クイックスタート
最短で試す方法
1. 必要なツールのインストール
Mac:
brew install qemu
cargo install bootimage
Arch Linux:
pacman -S qemu-full
cargo install bootimage
2. プロジェクトのセットアップ
# リポジトリのクローン
git clone <repository-url>
cd aios
# 一発でビルド&実行
cargo bootimage && qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/debug/bootimage-kernel.bin -serial stdio
3. 動作確認
正常に動作している場合、以下のような出力が表示されます:
Hello World!
Welcome to AIOS - A simple OS written in Rust
QEMUを終了するには Ctrl+A
を押してから X
を押してください。
開発ワークフロー
コードの変更
# コード変更後
cargo build
# 新しいブートイメージの作成
cargo bootimage
# 実行
qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/debug/bootimage-kernel.bin -serial stdio
デバッグ
# シリアル出力のみ表示
qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/debug/bootimage-kernel.bin -serial stdio -nographic
# メモリ使用量を制限
qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/debug/bootimage-kernel.bin -serial stdio -m 128M
次のステップ
src/main.rs
のprintln!
文を変更して、独自のメッセージを表示src/vga_buffer.rs
で色を変更- 新しいモジュールを追加して機能を拡張