Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2019 19:07:38 +0200
From:      Tamas Szakaly <sghctoma@gmail.com>
To:        freebsd-x11@freebsd.org
Subject:   Re: HEADSUP: drm-current-kmod now installs sources
Message-ID:  <20190814170738.cqoaspmzmredxjyl@pamparam>
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
On Tue, Aug 13, 2019 at 02:58:23PM -0700, John Baldwin 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

Hi all,

Am I correctly assuming that the only advantage of this approach over having
"PORTS_MODULES+= graphics/drm-current-kmod" in /etc/src.conf is that you don't
have to have the ports tree?

And if I'm seeing things correctly, not building from the ports tree have a
disatvantage: If I want to update both my kernel and the module, I have to
install the updated module to get the latest sources, and than I can build the
kernel, which rebuilds the module. If there is no package yet for the module,
I have to build the module twice - or maybe put the updated sources to
/usr/local/sys manually. When using PORTS_MODULES, I can just update the ports
tree and build the kernel.

Regards,
Toma



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190814170738.cqoaspmzmredxjyl>