From 4ea992c71dd0cdcffe0f74216e748256bd700a31 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 01:56:12 +0200 Subject: scripts: automate the data-disk workflow (mkdisk / sendkeys / test-disk) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- rsnix/src/ahci.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rsnix/src/ahci.rs') diff --git a/rsnix/src/ahci.rs b/rsnix/src/ahci.rs index 2efe3b4..427345d 100644 --- a/rsnix/src/ahci.rs +++ b/rsnix/src/ahci.rs @@ -182,7 +182,10 @@ fn start_port(abar: usize, port_idx: u32) -> Option { }; // IDENTIFY DEVICE as a sanity check + to learn the capacity. if issue(&d, ATA_IDENTIFY, 0, 1, false).is_err() { - crate::serial_println!("ahci: IDENTIFY failed on port {} (not an ATA disk?)", port_idx); + crate::serial_println!( + "ahci: IDENTIFY failed on port {} (not an ATA disk?)", + port_idx + ); return None; } let id = unsafe { core::slice::from_raw_parts(d.buf as *const u16, 256) }; -- cgit v1.2.3