opnsense-deps/rc.d/01-mono-modules
Jeremy Karst ccebd54083 board package: build per series, harden kernel install for U-Boot
- Makefile: read the FreeBSD release from tools' config/<series>/build.conf
  and derive the compiler target and package ABI from it, version the
  package <release>_<commit count>, take libxml2 from our own packages
  set instead of pkg.FreeBSD.org, clone the NXP sources from the Forgejo
  mirrors, and drop the image target (release/build.sh replaces it)
- +MANIFEST: ABI from the series, new maintainer and www
- GATEWAY.conf: annotate mono-gateway as coming from the OPNsense
  repository; fail the image build if the package is missing
- mk-image.sh: remove the amd64 qemu binary setup_xtools leaves behind
- 20-kernel-update: drop the 26.1.3 guard; check room on the FAT
  partition, copy and verify the new kernel before replacing the old
  one, keep kernel.old, restore it on failure, retry at next shutdown
- 01-mono-modules: log modules that fail to load instead of hiding it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:56:54 -05:00

25 lines
833 B
Bash

#!/bin/sh
# OPNsense rc.syshook early script — load Mono Gateway kernel modules
# Installed to /usr/local/etc/rc.syshook.d/early/01-mono-modules
#
# A module that does not load is logged and skipped, never fatal: during a
# major upgrade the kernel is replaced one reboot before the packages, so the
# previous release's modules legitimately fail to load for one boot.
load()
{
kldload -n "${1}" 2>/dev/null || logger -t mono-modules "cannot load ${1}"
}
for mod in cdx auto_bridge pf_notify fci lp5812 sfpled emc2302 ina2xx pcf2131 tmp431 cryptodev caam; do
load ${mod}
done
# WiFi card is optional — only load driver if 88W9098 is present
if pciconf -l 2>/dev/null | grep -q 'vendor=0x1b4b.*device=0x2b43'; then
load dpaa_wifi
load mwifiex
fi
# Status LED: dim white
sysctl dev.lp5812.0.status_white=16 >/dev/null 2>&1