68 lines
1.6 KiB
Markdown
68 lines
1.6 KiB
Markdown
# AIOS クイックスタート
|
|
|
|
## 最短で試す方法
|
|
|
|
### 1. 必要なツールのインストール
|
|
|
|
**Mac:**
|
|
```bash
|
|
brew install qemu
|
|
cargo install bootimage
|
|
```
|
|
|
|
**Arch Linux:**
|
|
```bash
|
|
pacman -S qemu-full
|
|
cargo install bootimage
|
|
```
|
|
|
|
### 2. プロジェクトのセットアップ
|
|
|
|
```bash
|
|
# リポジトリのクローン
|
|
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` を押してください。
|
|
|
|
## 開発ワークフロー
|
|
|
|
### コードの変更
|
|
```bash
|
|
# コード変更後
|
|
cargo build
|
|
|
|
# 新しいブートイメージの作成
|
|
cargo bootimage
|
|
|
|
# 実行
|
|
qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/debug/bootimage-kernel.bin -serial stdio
|
|
```
|
|
|
|
### デバッグ
|
|
```bash
|
|
# シリアル出力のみ表示
|
|
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.rs`の`println!`文を変更して、独自のメッセージを表示
|
|
2. `src/vga_buffer.rs`で色を変更
|
|
3. 新しいモジュールを追加して機能を拡張 |