-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·22 lines (19 loc) · 735 Bytes
/
run.sh
File metadata and controls
executable file
·22 lines (19 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# --- Kernel Build & Run Script ---
# 1. Compile the project
# We use the standard cargo build. The target and linker settings
# are automatically pulled from .cargo/config.toml.
echo "Building kernel..."
cargo build
# 2. Execute in QEMU
# This launches the emulator with the following configuration:
# -machine virt: Emulates the RISC-V VirtIO board.
# -nographic: Disables the VGA window, routing all output to the terminal.
# -serial mon:stdio: Combines the UART output and QEMU monitor in this console.
# -kernel: Points to the newly compiled ELF binary.
echo "Launching QEMU..."
qemu-system-riscv64 \
-machine virt \
-nographic \
-serial mon:stdio \
-kernel target/riscv64gc-unknown-none-elf/debug/mi_kernel