diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-01 01:56:12 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-01 01:56:12 +0200 |
| commit | 4ea992c71dd0cdcffe0f74216e748256bd700a31 (patch) | |
| tree | 2992b0063f08fbf79586d35ad481539fd7ee9af4 /scripts/boot.sh | |
| parent | ahci: skip ATAPI ports and fast-fail on device abort (diff) | |
| download | rs-dos-4ea992c71dd0cdcffe0f74216e748256bd700a31.tar.gz rs-dos-4ea992c71dd0cdcffe0f74216e748256bd700a31.zip | |
scripts: automate the data-disk workflow (mkdisk / sendkeys / test-disk)
- scripts/mkdisk.sh: create the FAT32 disk with mkfs.fat -C (the flag
that actually creates the file — plain mkfs.fat fails on a missing
path), accept M/G/K sizes, seed seed/ files via mtools; --fresh
re-formats, --no-seed skips seeding
- scripts/sendkeys.py: type lines into the guest via the QEMU monitor
(US layout). Punctuation must use QEMU's named keys (minus, slash,
dot, ...) — bare '-', '.', '/' are not valid sendkey names, and '-'
is the modifier separator, so they were silently dropped before
- scripts/test-disk.sh: full automated round trip — build, deploy,
ensure image, boot headless QEMU, drive the shell (ls /disk, mkdir,
echo >, cat, poweroff), then verify with fsck.fat (must be clean)
and mtype (file content must have survived poweroff)
- Makefile: make disk / disk-fresh / inspect / test-disk; run, run-gui
and debug now auto-create a missing DISK_IMG; fix the stale comment
(mkfs.fat without -C)
- scripts/boot.sh: auto-create a missing DISK_IMG via mkdisk.sh
- seed/: motd.txt + lines.txt seeded onto fresh images
- Verified end to end: ./scripts/test-disk.sh --fresh passes
Diffstat (limited to '')
| -rwxr-xr-x | scripts/boot.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/boot.sh b/scripts/boot.sh index 26064f9..99fd103 100755 --- a/scripts/boot.sh +++ b/scripts/boot.sh | |||
| @@ -95,6 +95,11 @@ echo " gui: $([ -n "$GUI" ] && echo yes || echo no)" | |||
| 95 | echo " gdb: $([ -n "$DEBUG" ] && echo ':1234' || echo off)" | 95 | echo " gdb: $([ -n "$DEBUG" ] && echo ':1234' || echo off)" |
| 96 | echo "" | 96 | echo "" |
| 97 | 97 | ||
| 98 | if [ ! -f "$DISK_IMG" ]; then | ||
| 99 | echo " (creating missing disk image: $DISK_IMG)" | ||
| 100 | "$SCRIPT_DIR/mkdisk.sh" "$DISK_IMG" | ||
| 101 | fi | ||
| 102 | |||
| 98 | if [ -f "$DISK_IMG" ]; then | 103 | if [ -f "$DISK_IMG" ]; then |
| 99 | DISK_ARGS=( | 104 | DISK_ARGS=( |
| 100 | -drive "file=$DISK_IMG,format=raw,if=none,id=disk" | 105 | -drive "file=$DISK_IMG,format=raw,if=none,id=disk" |
