DragonFlyBSD Kernel Audit
DF-2532 / build.sh
← back to finding ↓ download raw
#!/bin/sh
# Build the DF-2532 harness kernel module.
# This includes the REAL xdisk.c (shipping code) with INVARIANTS enabled,
# plus a sysctl trigger that constructs the exact impossible state and
# calls xa_start() to demonstrate the KKASSERT panic.
#
# The harness module must be built on the DragonFly guest with /usr/src.
# xdisk.ko must NOT be loaded (the harness provides its own DEV_MODULE).
set -e

# Copy xdisk.c locally (the harness #includes it)
cp /usr/src/sys/dev/disk/xdisk/xdisk.c ./xdisk.c

# Build using the kld module build system
make

echo "Build complete: ./df2532_harness.ko"