Page MenuHomeFreeBSD

graphics/nvidia-drm-kmod: fix build depends and linuxkpi registration
ClosedPublic

Authored by ashafer_badland.io on Mar 11 2024, 7:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 4:05 AM
Unknown Object (File)
Tue, Apr 23, 8:17 PM
Unknown Object (File)
Tue, Apr 23, 4:52 AM
Unknown Object (File)
Tue, Apr 23, 2:21 AM
Unknown Object (File)
Tue, Apr 23, 1:13 AM
Unknown Object (File)
Mon, Apr 22, 7:58 PM
Unknown Object (File)
Mon, Apr 22, 4:55 PM
Unknown Object (File)
Tue, Apr 16, 2:32 PM

Details

Summary

This fixes an issue where linuxkpi/DRM compatibility was not being
correctly detected, causing sway to not work. The conftest.sh script
checks the installed kernel modules for symbol presence, but on
package builders drm.ko was not being installed due to being in
RUN_DEPENDS instead of BUILD_DEPENDS.

This also fixes a panic in sway when an external monitor is plugged
into a prime laptop. This uses linux_pci_attach_device when possible
to actually register everything needed for the pci dev, instead of
just filling in the bare miniumum.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

If I understand correctly, setting BUILD_DEPENDS alone makes the dependency not to be automatically installed by pkg, including packages which are locally built with poudriere or any other clean-room builders.
Legacy builders like portupgrade should not be affected, though, as it needs BUILD_DEPENDS to be installed first to proceed builds.

To pull in drm-*-kmod package automatically when not yet installed, RUN_DEPENDS should be kept.
Setting both is fine.

https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-depend

Updated to add back in RUN_DEPENDS

Styling nitpick: BUILD_DEPENDS should come before RUN_DEPENDS.

Moved BUILD_DEPENDS to before as suggested.

This revision is now accepted and ready to land.Mar 18 2024, 3:26 PM