Bug 253120 - graphics/drm-fbsd13-kmod installs unneeded modules
Summary: graphics/drm-fbsd13-kmod installs unneeded modules
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-31 11:21 UTC by jakub_lach
Modified: 2021-11-19 15:15 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jakub_lach 2021-01-31 11:21:23 UTC
I use i915kms, yt radeonkms.ko and amdgpu.ko are also always installed under /boot/kernel, it's a change in behavior from 12-STABLE. As I use MODULES_OVERRIDE=, those take more space than the whole kernel altogether.
Comment 1 Niclas Zeising freebsd_committer freebsd_triage 2021-02-01 16:09:53 UTC
Hi!
Which kernel modules are you referring to as not needed?
The modules in /boot/kernel is built together with the kernel, you should not have any graphics related kmods there (the old drm drivers in base are removed in 13).
Do you mean /boot/modules?

Today, there is no way in the port to specify just one of the drivers, it would just lead to a lot of complexity in the port for very little gain.
Comment 2 jakub_lach 2021-02-01 16:56:12 UTC
(In reply to Niclas Zeising from comment #1)

Hello, 

I use MODULES_OVERRIDE=, nontheless, when I build kernel, radeonkms.ko, amdgpu.ko and i915kms.ko are build together and installed under /boot/kernel/. I only need i915kms. (see below)

$ make installkernel

<...>

===> drm-fbsd13-kmod (install)
===> drm-fbsd13-kmod/linuxkpi (install)
install -T release -o root -g wheel -m 555   linuxkpi_gplv2.ko /boot/kernel/
===> drm-fbsd13-kmod/ttm (install)
install -T release -o root -g wheel -m 555   ttm.ko /boot/kernel/
===> drm-fbsd13-kmod/drm (install)
install -T release -o root -g wheel -m 555   drm.ko /boot/kernel/
===> drm-fbsd13-kmod/amd (install)
===> drm-fbsd13-kmod/amd/amdgpu (install)
install -T release -o root -g wheel -m 555   amdgpu.ko /boot/kernel/
===> drm-fbsd13-kmod/radeon (install)
install -T release -o root -g wheel -m 555   radeonkms.ko /boot/kernel/
===> drm-fbsd13-kmod/i915 (install)
install -T release -o root -g wheel -m 555   i915kms.ko /boot/kernel/
kldxref /boot/kernel
--------------------------------------------------------------
>>> Installing kernel STRIPPED completed on Mon Feb  1 17:54:51 CET 2021
--------------------------------------------------------------

The ones under /boot/modules are provided by ports (drm-fbsd13-kmod-5.4.62.g20210122_3), as I understand.
Comment 3 jakub_lach 2021-02-01 16:57:12 UTC
(In reply to jakub_lach from comment #2)

I think some changes in 13 introduced auto-rebuild of kernel modules provided by ports and now they are doubled (?)
Comment 4 Niclas Zeising freebsd_committer freebsd_triage 2021-02-01 20:18:42 UTC
(In reply to jakub_lach from comment #3)

Sort of.  Ports that install kmod sources somewhere in /usr/local (I forgot exactly where) will have them built together with buildkernel.
drm-fbsd13-kmod used to do that, but it has been disabled by default.  It's an option, check your options for drm-fbsd13-kmod and disable the sources and reinstall and it will stop.
Comment 5 jakub_lach 2021-02-01 21:18:55 UTC
# Created by: Johannes Dieterich <jmd@FreeBSD.org>
# $FreeBSD: head/graphics/drm-fbsd13-kmod/Makefile 563288 2021-01-30 12:06:10Z manu $

PORTNAME=       drm-fbsd13-kmod
PORTVERSION=    5.4.62.g20210122

<...>

OPTIONS_DEFINE= DEBUG SOURCE

OPTIONS_DEFAULT=        SOURCE
Comment 6 Emmanuel Vadot freebsd_committer freebsd_triage 2021-02-02 12:15:09 UTC
Yes I only did it in drm-current-kmod for now.
This is now done for drm-fbsd13-kmod as well as of 563797/563798.
Comment 7 Emmanuel Vadot freebsd_committer freebsd_triage 2021-11-19 15:15:11 UTC
We don't install the sources by default anymore and the default of drm-kmod will always be to build everything.
Closing.