git: 1556932a72 - main - Handbook - Kernelconfig: Restore PORTS_MODULES section

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=1556932a7258a8d0090a0e85440fd0c9753e59ab

commit 1556932a7258a8d0090a0e85440fd0c9753e59ab
Author:     Sergio Carlavilla Delgado <[email protected]>
AuthorDate: 2026-02-13 18:33:15 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
CommitDate: 2026-02-13 18:33:15 +0000

    Handbook - Kernelconfig: Restore PORTS_MODULES section
    
    Reported by:    des@
---
 .../en/books/handbook/kernelconfig/_index.adoc      | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/documentation/content/en/books/handbook/kernelconfig/_index.adoc b/documentation/content/en/books/handbook/kernelconfig/_index.adoc
index 9769a57018..aa8e845f14 100644
--- a/documentation/content/en/books/handbook/kernelconfig/_index.adoc
+++ b/documentation/content/en/books/handbook/kernelconfig/_index.adoc
@@ -292,8 +292,7 @@ Once the edits to the custom configuration file have been saved, the source code
 # make installkernel KERNCONF=MYKERNEL
 ....
 +
-. Shutdown the system and reboot into the new kernel. If something goes wrong,
-  refer to crossref:kernelconfig[kernelconfig-noboot, The kernel does not boot].
+. Shutdown the system and reboot into the new kernel. If something goes wrong, refer to crossref:kernelconfig[kernelconfig-noboot, The kernel does not boot].
 ====
 
 By default, when a custom kernel is compiled, all kernel modules are rebuilt.
@@ -313,6 +312,24 @@ Alternately, this variable lists which modules to exclude from the build process
 WITHOUT_MODULES = linux acpi sound
 ....
 
+This variable instructs the build to skip kernel modules and compile only the kernel itself:
+
+[.programlisting]
+....
+NO_MODULES = yes
+....
+
+The Ports Framework includes drivers and other modules that depend on kernel interfaces, such as package:graphics/drm-kmod[] or package:emulators/virtualbox-ose-kmod[].
+With the `PORTS_MODULES` variable, every time the kernel is built, the ports containing kernel modules are re‑built against the updated sources.
+This ensures the kernel module stays in‑sync with the kernel itself.
+The kernel and ports trees should be updated together for maximum compatibility.
+`PORTS_MODULES` can be added to [.filename]#/etc/make.conf# to ensure all kernels you build also rebuild these modules.
+
+[.programlisting]
+....
+PORTS_MODULES = drm-kmod virtualbox-ose-kmod
+....
+
 Additional variables are available.
 Refer to man:make.conf[5] for details.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.