Page MenuHomeFreeBSD

Add nvidia-drm-kmod port
ClosedPublic

Authored by ashafer_badland.io on Aug 17 2023, 9:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 8:22 AM
Unknown Object (File)
Fri, Jun 28, 10:33 PM
Unknown Object (File)
Wed, Jun 26, 11:37 PM
Unknown Object (File)
Sun, Jun 23, 3:01 PM
Unknown Object (File)
May 21 2024, 12:14 AM
Unknown Object (File)
May 21 2024, 12:13 AM
Unknown Object (File)
May 21 2024, 12:13 AM
Unknown Object (File)
May 21 2024, 12:13 AM

Details

Summary

This port provides the nvidia-drm.ko kernel module, as ported here:
https://github.com/amshafer/nvidia-driver

This module implements the DRM API, which is commonly used for PRIME and
Wayland setups.

Adds:

  • nvidia-drm-kmod metaport
  • nvidia-drm-510-kmod port
  • nvidia-drm-515-kmod port

Diff Detail

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

Event Timeline

arrowd added inline comments.
graphics/nvidia-drm-515-kmod/Makefile
11

Should this be 515?

graphics/nvidia-drm-kmod/Makefile
8

No need to start with PORTREVISION=1 for a new port.

17

It depends on drm-510 unconditionally because the drm-kmod metaport points to 510?

21

You probably want bsd.port.pre.mk there.

34

And this would be bsd.port.post.mk.

graphics/nvidia-drm-kmod/Makefile.common
13

This gets included into nvidia-drm-515-kmod and overwrites its RUN_DEPENDS, no?

Fixed 515 to actually be 515, reworked RUN_DEPENDS, I think I got the pre/post.mk stuff you recommended correct but let me know if not.

One thing of interest to reviewers here: how should we (meaning me) best coordinate matching updates of nvidia-drm-kmod with updates to nvidia-driver? nvidia-drm-kmod isn't as simple as bumping a version number since I have to populate a driver branch in github for a particular version.

I'm guessing just CC'ing me on PRs for bumping nvidia-driver and I'll do the equivalent nvidia-drm-kmod update will be easiest, but figured I would bring that up in case anyone has suggestions or concerns.

I have to populate a driver branch in github for a particular version.

Is this purely mechanical? You just copy some stuff from the upstream tarball to your branch?

It's documented here: https://github.com/amshafer/nvidia-driver/blob/535.86.05/UPDATING.md

Mostly mechanical but not completely automated yet. About half the time there's small issues to fix, like updating the FreeBSD makefile with missing bits that have been added to the Linux version. Usually a ~15 minute process for me.

Ok, it is anyways not a problem. When the nvidia-driver port gets updated, the nvidia-drm port will pull in the new NVIDIA_DISTVERSION, which will make distinfo invalid. The package builder then fail to build nvidia-drm and send you a mail. This can be regarded as automatic "CC'ing on update".

What can we set the LICENSE= knob to?

Setting LICENSE_FILE= ${WRKSRC}/nvidia/doc/license.txt in Makefile.common should be fine for the child ports, but for the metaport I'm not sure the best way to include that? For nvidia-drm-kmod should I just copy that license file in the directory and reference that in LICENSE_FILE?

LICENSE_FILE is optional. I'm interested in LICENSE itself. It is your work, right? You can choose whatever license you like.

The code is still NVIDIA code, I've just modified it for compatability. The nvidia-drm-kmod port's Makefile is mine though, is that what you're referring to? I think the license of nvidia-drm-kmod should match the child ports to avoid anyone getting confused and thinking nvidia-drm.ko is BSD licensed.

This revision is now accepted and ready to land.Aug 20 2023, 5:53 PM