Page MenuHomeFreeBSD

Add a kmod.opts.mk.
ClosedPublic

Authored by jhb on Oct 22 2019, 10:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 5 2024, 6:52 AM
Unknown Object (File)
Feb 15 2024, 3:03 AM
Unknown Object (File)
Jan 22 2024, 11:04 PM
Unknown Object (File)
Dec 23 2023, 3:38 AM
Unknown Object (File)
Dec 20 2023, 3:11 AM
Unknown Object (File)
Dec 10 2023, 6:36 PM
Unknown Object (File)
Nov 27 2023, 2:10 AM
Unknown Object (File)
Nov 24 2023, 2:00 AM
Subscribers

Details

Summary

This Makefile sets KERN_OPTS. This permits kernel module Makefiles to
use KERN_OPTS to control the value of variables such as SRCS that are
used by bsd.kmod.mk for KERN_OPTS values that honor WITH/WITHOUT
options for standalone builds.

Test Plan

Try to do a standalone build of a kernel module that uses tests on
KERN_OPTS (e.g. modules/geom/geom_uzip). It will fail because
KERN_OPTS isn't defined. Adding ".include <kmod.opts.mk>" at the
start of the Makefile locates the kern.opts.mk and config.mk
Makefiles in the kernel source tree and includes them.

I have two other patches in flight (T6 NIC TLS and bhyve save/restore)
that also make use of KERN_OPTS to control SRCS and are affected by
this.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27683
Build 25883: arc lint + arc unit

Event Timeline

share/mk/kmod.opts.mk
10

we have this list in 4 places now, including inside of the kernel conf dir. This makes it 5. Any chance you can make it just one too?

share/mk/kmod.opts.mk
10

The one in sys/conf/kmod.mk is different (fewer directories) FWIW. I was only aware of this being the third place (bsd.kmod.mk and sys/conf/kmod.mk being the others). Looks like sys/conf/dtb.build.mk which uses the shorter list of dirs from sys/conf/kmod.mk is the 4th. So we have 2 lists each duplicated twice, and 3 different flavors of the nested '.if'.

share/mk/kmod.opts.mk
10

yea, that's super-ugly :(
I have bsd.sysdir.mk that I've written.
I'll post a followup after some testing.

https://reviews.freebsd.org/D22144
is what I'm thinking. I think I have all the dirs in this one and found all the places we use it.
I've not test tested all the use cases....
so we can work out the sharing issues there.

Thanks for your patience with me for delays in my end.
Looks good and I think we're good to go.

This revision is now accepted and ready to land.Nov 21 2019, 5:44 PM