Bug 278329

Summary: x11/nvidia-driver-470: When built with LINUX=off, the modeset driver loads Linux compatibility kernel modules
Product: Ports & Packages Reporter: Ross McKelvie <ross>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: New ---    
Severity: Affects Only Me CC: ross
Priority: --- Flags: bugzilla: maintainer-feedback? (danfe)
Version: Latest   
Hardware: amd64   
OS: Any   

Description Ross McKelvie 2024-04-12 14:03:05 UTC
I built the legacy NVidia driver, x11/nvidia-driver-470, using the option LINUX=off to exclude Linux compatibility support.

When loading the modeset driver with:
kldload nvidia-modeset

the following kernel modules are loaded (obtained from listing loaded kernel modules with kldstat before and after):
nvidia-modeset.ko
nvidia.ko
linux.ko
linux-common.ko

I would not expect the Linux compatibility modules to be loaded; this is what I was actively looking to avoid.

I see in the Makefile for x11/nvidia-driver line 293 there is a replacement in one of the source header files if the LINUX option is not set but have not investigated further at this point.

Many thanks for looking at this bug.
Comment 1 Ross McKelvie 2024-04-12 14:05:06 UTC
This is building for FreeBSD 14.0-RELEASE p6 using a poudriere jail of the same version.