mirror of
https://github.com/ebrandi/FDD-book.git
synced 2026-12-06 00:23:30 +00:00
26 lines
445 B
Bash
26 lines
445 B
Bash
|
|
#!/bin/sh
|
||
|
|
#
|
||
|
|
# reload.sh - Rebuild and reload the chapter driver.
|
||
|
|
#
|
||
|
|
# Run from the chapter root (one directory above shared/).
|
||
|
|
|
||
|
|
set -eu
|
||
|
|
|
||
|
|
cd "$(dirname "$0")/.."
|
||
|
|
|
||
|
|
if kldstat -qm myblk >/dev/null 2>&1; then
|
||
|
|
echo "Unloading existing myblk..."
|
||
|
|
umount /mnt/myblk 2>/dev/null || true
|
||
|
|
kldunload myblk
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo "Building..."
|
||
|
|
make clean
|
||
|
|
make
|
||
|
|
|
||
|
|
echo "Loading..."
|
||
|
|
kldload ./myblk.ko
|
||
|
|
|
||
|
|
echo "Loaded. /dev/myblk0 should now exist."
|
||
|
|
ls -l /dev/myblk0 || true
|