This is super cool, thank you!  Is it feasible to integrate other
out-of-tree kmods in a similar way, e.g., nvidia-driver?

On Tue, Aug 13, 2019 at 2:58 PM John Baldwin <j...@freebsd.org> wrote:
>
> With help from zeising@ in particular, I've just committed a change
> to the drm-current-kmod port that makes it install sources into
> /usr/local/sys/modules by default.  This will result in some behavior
> changes on HEAD (and only head for now):
>
> 1) When you build a kernel after installing the updated package,
>    your buildkernel will now build DRM modules using the sources
>    from the package.  For developers at least I suspect this to be
>    a win as if you have made changes to the kernel KBI you will
>    always end up with matching modules installed into /boot/kernel
>    alongside your kernel.
>
> 2) In order to use these modules, you need to update the 'kld_list'
>    lines in your rc.conf to just list the modules without a
>    path, e.g. "kld_list=i915kms" just as you would for other
>    modules.  This will prefer the module built with your kernel if
>    one exists and fall back to the module in /boot/modules
>    otherwise.
>
> If a change in current breaks the build of DRM modules, you have a
> couple of options:
>
> 1) Pass 'LOCAL_MODULES=' (empty string) on the command line of
>    'make buildkernel' to disable building the DRM modules.
>
> 2) Hack on the sources in /usr/local/sys/modules/drm-current-kmod
>    to fix the compile breakage, perhaps using a patch from the
>    mailing lists if one exists.
>
> 3) Wait for a new package/port version and update to that before
>    doing a buildkernel.
>
> For developers this means even if you are doing testing on a box
> that doesn't use DRM, you can install the package so that kernel
> builds will try to compile it and hopefully spot KPI/KBI changes
> before they land in the tree so that the port/package can be
> patched in tandem with committing changes to HEAD.  Note that even
> builds of work trees in git checkouts, etc. will find the DRM
> modules and try to build them if the package is installed.
>
> --
> John Baldwin
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to