⬢ DragonFlyBSD Kernel Audit
DF-5530 / build_guest.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-5530 — guest-side build of both KLD rigs (run as root on the guest).
set -e
cd /root/DF-5530
export SYSDIR=/usr/src/sys
touch opt_usb.h opt_bus.h
printf "KMOD=\tdf5530_race\nSRCS=\tusbpf_race.c bus_if.h device_if.h opt_usb.h opt_bus.h\n\n.include <bsd.kmod.mk>\n" > Makefile
rm -rf forwarder_x86_64 *.o *.ko
make
cd sink
touch opt_usb.h opt_bus.h
printf "KMOD=\tbpfdetach_null\nSRCS=\tbpfdetach_null.c bus_if.h device_if.h opt_usb.h opt_bus.h\n\n.include <bsd.kmod.mk>\n" > Makefile
rm -rf forwarder_x86_64 *.o *.ko
make
cd ..
ls -l df5530_race.ko sink/bpfdetach_null.ko
echo BUILD_OK