DF-4651 / fix_validate.sh
#!/bin/sh # DF-4651 fix validation (guest): build snd_fm801.ko from the patched # source. The guest's /usr/src copy is backed up, patched with fix.diff # (reordered attach: IRQ + dma tag + pcm_register BEFORE AC97_CREATE/ # mixer_init; mixer_init failure destroys the codec inline; oops: tears # the handler down before unmapping MMIO), the module is compiled with # the standard kernel-module make, and the pristine source is restored. set -e cd /root/df801 SRC=/usr/src/sys/dev/sound/pci/fm801.c cp "$SRC" fm801_pristine.c cp fm801_pristine.c "$SRC" patch -p1 "$SRC" < fix.diff echo PATCHED make -C /usr/src/sys/dev/sound/driver/fm801 clean > /dev/null 2>&1 || true make -C /usr/src/sys/dev/sound/driver/fm801 ls -la /usr/obj/usr/src/sys/dev/sound/driver/fm801/snd_fm801.ko cp fm801_pristine.c "$SRC" echo RESTORED_PRISTINE |