When two kernel configurations differ by a very small number of changes, it is easier to manage them by having one include the other, and add or remove the differences. Removing options and drivers is also useful in the situation of a user who wants to follow the development of
NetBSD: drivers and options get added to the configuration files found in the source tree, such as
GENERIC, so one can include it and remove all options and drivers that are not relevant to the considered system. Additions to
GENERIC will then automatically be followed and used in case they are relevant.
While negating an options (with
no options) is unambiguous, it is not as clear for devices instances.
The
no instance definition statements of
config(1) syntax only apply on the current state of the configuration file, not on the resulting kernel binary.
autoconf(9) has no knowledge of instance negation, thus it is currently impossible to express the following in a kernel configuration file:
“I want support for
ath(4) attaching at
pci(4), but I do not want any instance of
ath(4) attaching at
pci3.”
For a real-world use of
no device at instance consider the following, taken from
NetBSD/i386:
include "arch/i386/conf/GENERIC"
acpi0 at mainbus?
com* at acpi?
[... more instances of legacy devices attaching at acpi? ...]
no device at isa0
One could actually live without the
isa0 instance, as all the legacy devices are attached at
acpi0. But unfortunately, dependencies on the
isa attribute are not well registered all through the source tree, so an instance of the
isa(4) driver is required to compile a kernel. So while:
is what is intended, the
isa(4) instance itself must be kept, and that is precisely the difference made by: