Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168371542
D57859.id180662.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57859.id180662.diff
View Options
diff --git a/share/man/man7/build.7 b/share/man/man7/build.7
--- a/share/man/man7/build.7
+++ b/share/man/man7/build.7
@@ -1116,6 +1116,25 @@
cd /usr/src/sys/modules/sound
make all install clean cleandepend KMODDIR=/boot/kernel
.Ed
+.Pp
+Important detail is that the kernel binary interface is affected
+by its configuration.
+Modules build outside of the regular kernel build procedure still
+must be built against the target kernel configuration, which is
+defined by the set of the
+.Pa opt_*.h
+headers generated by
+.Xr config 8 .
+Use the
+.Va KERNBUILDDIR
+variable to point the module build to the configured kernel.
+There is no need to actually build the configured kernel in
+that directory, module build only consumes the headers from it.
+.Bd -literal -offset -indent
+config -d /home/user/my-kernel-builddir MY-KERNEL
+cd my-module
+make all KERNBUILDDIR=/home/user/my-kernel-builddir
+.Ed
.Ss Example 5: Quickly rebuild a kernel in place
Quickly rebuild and reinstall the kernel, only recompiling the files
changed since last build; note that this will only work if the full
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 8:11 PM (13 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34375538
Default Alt Text
D57859.id180662.diff (1 KB)
Attached To
Mode
D57859: build.7: explain how to build KBI-compatible standalone module
Attached
Detach File
Event Timeline
Log In to Comment