Files
aios/docs/QUICKSTART.md
2025-07-05 13:19:08 +09:00

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

次のステップ

  1. src/main.rsprintln!文を変更して、独自のメッセージを表示
  2. src/vga_buffer.rsで色を変更
  3. 新しいモジュールを追加して機能を拡張