rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/usr/bin/env bash
# Build the kernel with the `headless` feature and boot it in QEMU with no
# window. Serial output goes to this terminal; the kernel powers QEMU off via
# the isa-debug-exit device when done. A timeout guards against hangs.
#
# Usage: ./scripts/run-headless.sh # normal boot, exits after ~3 s of timer ticks
# ./scripts/run-headless.sh stack-overflow # extra cargo features, comma separated
# Force bootimage to repack the disk image (see scripts/runner.sh for why).
IMG=target/x86_64-rust_kernel/debug/bootimage-rust_kernel.bin
code=
# isa-debug-exit: QEMU exit status = (value << 1) | 1, so Success(0x10) -> 33.
case in
33) ; ;;
35) ; ;;
124) ; ;;
*) ; ;;
esac
|