Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2019 15:35:20 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        current <current@freebsd.org>, x11@freebsd.org
Subject:   Re: HEADSUP: drm-current-kmod now installs sources
Message-ID:  <CAG6CVpVfH=JbZ-kHqU1UTJYhCbO2-rqbOctS0f6jfeuAyFPFog@mail.gmail.com>
In-Reply-To: <67ca217f-b7de-8707-c4de-51e3f895d06f@FreeBSD.org>
References:  <67ca217f-b7de-8707-c4de-51e3f895d06f@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@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-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVfH=JbZ-kHqU1UTJYhCbO2-rqbOctS0f6jfeuAyFPFog>