History log of /freebsd-head/usr.sbin/config/config.h
Revision Date Author Comments
49f4465004dbe985cd739a5af75d7a56d71a7312 28-Apr-2020 bdrewery <bdrewery@FreeBSD.org> config: Add no-ctfconvert support.

Bump CONFIGVERS to 600018 for this support.

Some files may purposely have debug info disabled or are *source files*
that attempt to run ctfconvert on them. Currently ctfconvert ignores
these errors but I have a change to make the errors real so we can
catch real problems like exceeding type limits.

Sponsored by: Dell EMC
Reviewed by: imp, cem, kevans
Differential Revision: https://reviews.freebsd.org/D24535
628db19a7c0690cef1190ae955e75d4e3172554f 28-Mar-2020 kevans <kevans@FreeBSD.org> config(8): fixes for -fno-common

Move this handful of definitions into main.c, properly declare these as
extern in config.h. This fixes the config(8) build with -fno-common.

Unexplained in my previous commit to gas, -fno-common will become the
default in GCC10 and LLVM11, so it's worth addressing these in advance.

MFC after: 3 days
6bebe8fd3477f906be6ba3a95c0bf9f4e35e6701 16-Apr-2019 manu <manu@FreeBSD.org> config: Only warn if duplicate option/device comes from the same file

This is useful for arm (possibly other arches too) where we want to have
a GENERIC kernel that only include files for the different SoC. Since
multiple SoCs/Board needs the same device we would need to do either :

Include the device in a generic file
Include the device in each file that really needs it

Option 1 works but if someone wants to create a specific kernel config
(which isn't uncommon for embedded system), he will need to add a lots
of nodevice to it.

Option 2 also works but produce a lots of warnings.

Reviewed by: kevans
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19424
2fbb31792d8ff11c3e3e746cd5d169b3a260aba2 17-Jul-2018 kevans <kevans@FreeBSD.org> config(8): Add compatibility shims for r335998

Plumb the %VERSREQ from Makefile.<arch> through to the rest of config(8).
We've recorded the config(8) version that we're calling "the end of
envmode and hintmode," and we'll write them out for earlier versions. Later
kernel version bumps will remove envmode/hintmode from the kernel as needed,
which is OK since the current kernel does not use them at all.

These compatibility shims really need to go away when the major version
rolls over...

Discussed with: imp
42651382a2911c607fc19839cb17ed5664cdee08 05-Jul-2018 kevans <kevans@FreeBSD.org> kern_environment: use any provided environments, evict hintmode/envmode

At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.

This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:

- loader(8) environment
- static environment
- static hints file

Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.

Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.

The following tangentially related changes were made to res_find:

- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only

The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.

MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
c9fbaf1f26ea3f2859255c00854d1757271fe91b 05-Jul-2018 kevans <kevans@FreeBSD.org> Revert r335995 due to accidental changes snuck in
7852d84da85dcdec7750ec5bb474b4556765d44f 05-Jul-2018 kevans <kevans@FreeBSD.org> kern_environment: use any provided environments, evict hintmode/envmode

At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.

This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:

- loader(8) environment
- static environment
- static hints file

Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.

Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.

The following tangentially related changes were made to res_find:

- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only

The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.

MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
b77bd81b376dd4e8dda43a3f092846e256e44b98 26-Jun-2018 kevans <kevans@FreeBSD.org> config(8): Make 'env' files consistent with other file-accepting options

Previously, only one 'env' file could be specified. Later 'env' directives
would overwrite earlier 'env' directives. This is inconsistent with every
other file-accepting directives which process files in order, including
hints.

A caveat applies to both hints and env that isn't mentioned: they're
concatenated in the order of appearance, so they're not actually applied in
the way one might think by supplying:

hints x
hints y

Hints in x will take precedence over same-name hints in y due to how
the kernel processes them, stopping at the first line that matches the hint
we're searching for. Future work will flip the order of concatenation so
that later files may still properly override earlier files.

In practice, this likely doesn't matter at all due to the nature of the
beast.
e396020937ddfda91a487705bf76b977f4d23905 25-Jun-2018 kevans <kevans@FreeBSD.org> config(8): Add `envvar` support

envvar allows adding individual environment variables to the kernel's static
environment without the overhead of pulling in a full file. envvar in a
config looks like:

envvar some_var=5

All envvar-provided variables will be added after the env file is processed,
so envvar keys that exist in the previous env will be overwritten by
whatever value is set here in the kernel configuration directly.

As an aside, envvar lines are intentionally tokenized differently from
basically every other line. We used a named state when ENVVAR is encountered
to gobble up the rest of the line, which will later be cleaned and validated
in post-processing by sanitize_envline. This turns out to be the simplest
and cleanest way to allow the flexibility that kenv does while not
compromising on silly hacks.

Reviewed by: ian (also contributor of sanitize_envline rewrite)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15962
872b698bd4a1bfc0bf008c09228e6fd238809c75 20-Nov-2017 pfg <pfg@FreeBSD.org> General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
4e0232690187c655293ffc8adf62b882b5ab5006 17-Nov-2017 bdrewery <bdrewery@FreeBSD.org> Fix 'local' to not look in the source tree for the file.

Usually 'local' is used along with other rules such as 'no-implicit-rule' or
'dependency' which avoids this problem. It's possible to need to use 'local'
while relying on the default rules though for a file which is not in the source
tree nor generated in the kernel.

Sponsored by: Dell
Differential Revision: https://reviews.freebsd.org/D13125
6d7dddc618c365d4848f50e9a72bed129cf0874f 28-Sep-2017 n_hibma <n_hibma@FreeBSD.org> Typo in filename in comment.
7e6cabd06e6caa6a02eeb86308dc0cb3f27e10da 28-Feb-2017 imp <imp@FreeBSD.org> Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
dc83b58bbee523b7400472f573a44887cbd0642a 07-Jan-2016 bdrewery <bdrewery@FreeBSD.org> MFC r289677:

Fix a ton of speelling errors
21a3003f8f5c49c0acbcb49462e5b221076076d0 21-Oct-2015 eadler <eadler@FreeBSD.org> Fix a ton of speelling errors

arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2ab6848d6397c8c2d4f1df090f94496307c4af08 10-Apr-2014 asomers <asomers@FreeBSD.org> MFC r263429

Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8). By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).
1b1437fc8fbe4fe40af7cae92335a35aec85d9bc 20-Mar-2014 asomers <asomers@FreeBSD.org> Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8). By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).

PR: kern/187712
Reviewed by: will, imp (previous version)
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
310ab6d7ff9b6ca4c8c1159bdd4eafd63aaf34ba 22-May-2012 bapt <bapt@FreeBSD.org> Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
'yyparse'

Approved by: des (mentor)
2d7d8c05e7404fbebf1f0fe24c13bc5bb58d2338 21-Mar-2011 jeff <jeff@FreeBSD.org> - Merge changes to the base system to support OFED. These include
a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND,
and other miscellaneous small features.
09f9c897d33c41618ada06fbbcf1a9b3812dee53 19-Oct-2010 jamie <jamie@FreeBSD.org> A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.
31fdf3079cf534f6870332a1f2180eb525f07ca2 02-May-2010 imp <imp@FreeBSD.org> MFC r207260:
Move checking the version up from Makefile generation to just after
we've parsed the config file. Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.

We have to defer doing it until after we've read the user's config
file because we define machinename there. The version required to
compile the kernel is encoded in Makefile.machinename. There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.

This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released. Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.

# This implies that the config file option mapping will need to be redone.
1b05a112d4cbea67db29b7df286106b4cde94e93 27-Apr-2010 imp <imp@FreeBSD.org> Move checking the version up from Makefile generation to just after
we've parsed the config file. Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.

We have to defer doing it until after we've read the user's config
file because we define machinename there. The version required to
compile the kernel is encoded in Makefile.machinename. There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.

This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released. Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.

# This implies that the config file option mapping will need to be redone.

MFC after: 3 days
9b85332a7712aa8858207f79bf399b2695fb2f72 18-Apr-2010 imp <imp@FreeBSD.org> MFC r206664:
Allow option aliasing. Lines of the form:

OLD_OPT = NEW_OPT

in options* files will now map OLD_OPT to NEW_OPT with a friendly
message. This is indented for situations where we need to preserve an
interface in the config file in an upwards compatible fashion on a
stable branch.

Reviewed by: nwhitehorn@
MFC after: 3 days
6f9b9b66713e64172ef432706bac97f237fbd29d 15-Apr-2010 imp <imp@FreeBSD.org> Allow option aliasing. Lines of the form:

OLD_OPT = NEW_OPT

in options* files will now map OLD_OPT to NEW_OPT with a friendly
message. This is indented for situations where we need to preserve an
interface in the config file in an upwards compatible fashion on a
stable branch.

Reviewed by: nwhitehorn@
MFC after: 3 days
f1216d1f0ade038907195fc114b7e630623b402c 19-Mar-2010 delphij <delphij@FreeBSD.org> Create a custom branch where I will be able to do the merge.
5318a382021b6858d3c7b227374bb63f1cee475b 22-Nov-2008 thompsa <thompsa@FreeBSD.org> Allow multiple makeoption lines to be used with the += operator, this permits
the following syntax in the kernel config.

makeoptions MODULES_OVERRIDE=foo
makeoptions MODULES_OVERRIDE+=bar
makeoptions MODULES_OVERRIDE+=baz

Bump config minor version to 600007.
19b6af98ec71398e77874582eb84ec5310c7156f 22-Nov-2008 dfr <dfr@FreeBSD.org> Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
cf5320822f93810742e3d4a1ac8202db8482e633 19-Oct-2008 lulf <lulf@FreeBSD.org> - Import the HEAD csup code which is the basis for the cvsmode work.
5907a150d5e9ac5dbdae3755e2ea48c482dcff3c 17-May-2007 imp <imp@FreeBSD.org> Fix some problems that affect multiple file inclusion. Bruce found
this bug and submitted these patches to dunstan@. He sent them to me
to test, and I discovered they were needed for the atmel kernel config
files. Since we were playing with them in the terminal room after the
developer's summit today, I thought I'd go ahead and commit them to
allow those folks that now have atmel hardware (thanks Andre) a chance
to try it out w/o my help. Since dunstan@ is asleep right now, risk
stepping on his toes a little by going ahead and committing this
change.

Submitted by: dunstan@, bde@
Tested by: bde@
2e673327ec1ac7c1b4a99f2bfe326756e0547067 12-May-2007 wkoszek <wkoszek@FreeBSD.org> Improve INCLUDE_CONFIG_FILE support.

This change will let us to have full configuration of a running kernel
available in sysctl:

sysctl -b kern.conftxt

The same configuration is also contained within the kernel image. It can be
obtained with:

config -x <kernelfile>

Current functionality lets you to quickly recover kernel configuration, by
simply redirecting output from commands presented above and starting kernel
build procedure. "include" statements are also honored, which means options
and devices from included files are also included.

Please note that comments from configuration files are not preserved by
default. In order to preserve them, you can use -C flag for config(8). This
will bring configuration file and included files literally; however,
redirection to a file no longer works directly.

This commit was followed by discussion, that took place on freebsd-current@.
For more details, look here:

http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html
http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html

Development of this patch took place in Perforce, hierarchy:

//depot/user/wkoszek/wkoszek_kconftxt/

Support from: freebsd-current@ (links above)
Reviewed by: imp@
Approved by: imp@
340936b70bdb4f940477575096982f8c30f45acd 24-Oct-2006 imp <imp@FreeBSD.org> End my resistance to jmg's multiple hints files and bring in support
for having multiple hints files generate a correct hints.c (eg, with
all the specified ones catenated together).
9d1801a10554429dd1cfce2268b2f14d02e25509 30-Dec-2005 ru <ru@FreeBSD.org> Clean up most of the "XXX"-tagged items:

- The code that creates hints.c and env.c from the skeleton files
moved into separate functions.

- Sanity checks for missing "ident" and "cputype" directives moved
into main(), alongside the existing check for "machine".

PR: bin/90310
Submitted by: Matt Emmerton <matt@gsicomp.on.ca>
1852a934be2adf2c0f31279d930c513b44f1eea1 25-Nov-2005 ru <ru@FreeBSD.org> Clean some code that became obfuscated over the years:
Don't keep duplicate files in the files list just to
mark the device as "known" later. XXX: Since the
device list isn't unique (there can be two "device foo"
directives, as this the case with LINT+DEFAULTS), we
have to traverse it all to mark all copies of the same
device as "used", but this is not worse than it was.
e53e4f57e75822bf9fa43652785192cf45d80f68 28-Oct-2005 jhb <jhb@FreeBSD.org> MFC: Sync config(8) with HEAD:
- Add -V option to dump version.
- Implicitly include DEFAULTS if it exists in the current directory before
the specified kernel config.

Approved by: re (scottl)
36d533d5436d4b351fc1f691415956afc77d5b12 27-Oct-2005 jhb <jhb@FreeBSD.org> Optionally include a DEFAULTS config file if it is present in the current
directory before the specified config file. This is implemented by
opening DEFAULTS as stdin if it exists, and if so resetting stdin to the
actual config file when DEFAULTS is fully parsed via yywrap(). In short,
this lets us create DEFAULTS kernel configs in /sys/<arch>/conf that can
enable certain options or devices by default and allow users to disable
them via 'nooptions' or 'nodevice' rather than having to create kludge
NO_FOO options.

Requested by: scottl
Reviewed by: scottl
245a07a0538c56a5962892185f6047675ee37b78 01-Apr-2005 imp <imp@FreeBSD.org> Allow one to specify a second parameter to the machine line. This
allows us to specify the machine_arch as well as machine. If
specified then a second link will be made, similar to machine, from
$MACHINE_ARCH to $S/$MACHINE_ARCH/include.

This is for ports where MACHINE != MACHINE_ARCH (pc98 today, others in
the future?).

Reviewed by: arch@, nyan@
1d9abdbe783a3f2587fde29b89cda1c8da982097 30-Aug-2004 peter <peter@FreeBSD.org> Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option. This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device. This broke things like the snd_emu10k1 device, which required
quotes to make it parse right. The no-longer-needed quotes have been
removed from NOTES, GENERIC etc. eg, I've removed the quotes from:
device snd_maestro
device "snd_maestro3"
device snd_mss

I believe everything will still compile and work after this.
9c9b6e30451b63af6794a650cfc750be3a2d4595 07-Aug-2004 imp <imp@FreeBSD.org> Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.
00e9b04664bf2e5a36da9308482569986b191cbd 09-May-2004 cognet <cognet@FreeBSD.org> Add a new "files" directive, which allows to include a files.foo file directly
from a kernel config file.
Bump config version to reflect this change.
61e9b13e6af56c4888ce628791cd8ac61c46a4c4 15-Feb-2003 ru <ru@FreeBSD.org> Convert to using <sys/queue.h> macros.
cf06489c2d4eab716cf9a022f801ae33d4a2a1ba 20-Feb-2002 peter <peter@FreeBSD.org> Commit some infrastructure for turning on -Werror for kernel compiles.
It doesn't actually do it yet though. This adds a flag to config so
that we can exclude certain vendor files from this even when the rest
of the kernel has it on. make -DNO_WERROR would also bypass all of it.
e031b90e2a515850159496b7a6da3b8595780427 27-Aug-2001 peter <peter@FreeBSD.org> Enable hardwiring of things like tunables from embedded enironments
that do not start from loader(8).
b5164c6585fabc3c848ff92ada3f6ffb64a9e8f2 12-Jul-2001 dd <dd@FreeBSD.org> Introduce an "include" directive. It takes one argument, a filename
to be included into this one. This works the same way as #include
does in C; as far as the user is concerned, the included file is
inlined into the current one.

Since config(8) is no longer limited to working on one user-supplied
file, printing just a line number in an error message is not
sufficient. The new global variable yyfile represents the file
currently being parsed, and must be printed as well.

Reviewed by: imp
Obtained from: OpenBSD
0595f4ab9507532f8084168005910b6e1b3fe032 28-Feb-2001 peter <peter@FreeBSD.org> newbus_ioconf() is long gone
b31794bc17abbe5f5aec97c5172725ab3fbb9443 28-Feb-2001 peter <peter@FreeBSD.org> Some more tidying up. we dont use config-dependent anyware. Eliminate
some duplicate code (cut/paste bug?). tidy up some other minor stuff.
a5edad0c8e4f10382925670720e62116474973a1 28-Feb-2001 peter <peter@FreeBSD.org> s/special/compilewith/ (so I stop confusing myself) and GC an unused
function I missed before.
c1f61844c36e418273555752390fe62cd6b3f3e2 22-Feb-2001 peter <peter@FreeBSD.org> Collect together a handful of copies of the option generator code into a
single newopt(char *name, char *value) function. Change newdev() to
do the same thing rather than depending on the evil 'cur' device hack.
b96d955fcac9315b51bd01025be303eabf0cdfc6 19-Feb-2001 peter <peter@FreeBSD.org> ${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"
string could have been passed to free(); There are some warnings here
I am not sure how to fix as they are in the lex scanner code, etc.
c417101ae55dd9941fb03ce6fce4955a6a2a2e8f 04-Feb-2001 peter <peter@FreeBSD.org> Remove the need to list each and every cpu platform. Config will now
take your word for the 'machine' switch.
4abe34416afda81cddb387d70a542952f6de9aa0 31-Jan-2001 peter <peter@FreeBSD.org> Unwind a bit more cruft - we only have one type of device now.
312d4981dc089e0a17e1a9f2cdf4d7327f25af69 31-Jan-2001 peter <peter@FreeBSD.org> Redo the stray header file cleanup code to not depend on timestamps
or access times or anything. Just bite the bullet and keep a list of
header files that we know about.
f1e70294d8c5432d20901d39af9e92a6405ddabe 22-Jan-2001 benno <benno@FreeBSD.org> Add support for configuring PowerPC kernels.

Reviewed by: peter
fa6af7ab3eed1a53d0df517fc2c374fd886c6e63 29-Sep-2000 dfr <dfr@FreeBSD.org> Add ia64 support.
05f5722996e56400bf60b8832a0fbe52f93b9fd8 25-Aug-2000 peter <peter@FreeBSD.org> If a ${KERNEL}.hints file exists, and no hints are specified explicitly,
then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.
647ef85d48424b2f17b827cdc91e595b17c66455 13-Jun-2000 peter <peter@FreeBSD.org> Borrow phk's axe and apply the next stage of config(8)'s evolution.

Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.

There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others
9fbe309befea3309aaa3b4ba51b0a98b67237143 10-Jun-2000 peter <peter@FreeBSD.org> A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.
b42951578188c5aab5c9f8cbcde4a743f8092cdc 02-Apr-2000 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'ALSA'.
91ca8fff8641d6fec72ec0435a8c50aff02a411b 29-Jan-2000 peter <peter@FreeBSD.org> Mark the 'conflicts' keyword as obsolete, and don't generate (unused)
resource table entries for it.
430f14513d18203880d82ea2dba5de7283142cb6 23-Jan-2000 peter <peter@FreeBSD.org> Remove the cam-specific device wiring code. This was a duplicate of
the data in the resource tables, and cam is getting it directly now.
4dc1a88de3c124d01cb486042b1fd6ba88f3abe8 08-Jan-2000 peter <peter@FreeBSD.org> Apply the axe to some more cruft in config(8). In particular:
- redo the "at" configuration system so that it just syntax checks
to make sure the device you're configuring something "at" appears to
exist. Nuke a bunch of complexity that was responsible for creating
"clones" of wildcard devices and some wierd stuff in a few places
including the scbus config tables etc.
- merge "controller" and "device" - there is no difference as far as
the kernel is concernend, it's just something there to make life
difficult for config file writers. "controller" is now an alias for
"device".
- emit full scsi config into the resource tables. We could trivially
change cam to use that rather than it's own "special" table for wiring
and static configuration. ATA could use this too for static wiring.
- try and emulate some of the quirks of the old system where it made
sense. Some were too strange though and I'd be very suprised if they
were features and not outright bugs. nexus handling is still strange.
One thing in particular is that some of the wierd entries in the
newbus devtables is now gone as it was a quirk side effect of the
wildcard/question-mark cloning above.

GENERIC and LINT still build etc.
f10d6e9377dd0e5321696fea78296110f0bb16d1 12-Dec-1999 peter <peter@FreeBSD.org> Add a 'warning' option for the files* files. This is intended to enable
giving a dire warning about certain drivers going away in the future.
d21ff337ef6afcb755ed17f6ff18b87e1aae70b9 09-Nov-1999 peter <peter@FreeBSD.org> Re-support "tape" as an alias for device and clean up a bit more cruft
left over from the original system (d_dk was for preassigned iostat unit
numbers for disks)
8024dcb61d2990a84407cbaf035def0f1b8cffdd 30-Oct-1999 marcel <marcel@FreeBSD.org> Add option "-d destdir" which instructs config to use another output
directory than the default one. If the option is not given, then the
output of config is exactly as before. Only when an alternate output
directory has been specified will config modify its behavior.

Additional changed:
o Remove the now conflicting and unused NODEV define. It
conflicts with NODEV in sys/param.h.
o Rename the now conflicting MACHINE token to ARCH. It
conflicts with MACHINE in sys/param.h.
o Fix some easy style bugs.
o Fix some easy grammar bugs in the manpage.

Approved by: peter, archie
b7ec6580100588b92f69bae020a3b2bbaace18fb 10-Oct-1999 peter <peter@FreeBSD.org> Further cleanup. Also remove the following unused or defunct tokens:
and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
be406231c5d21653933998816f79e9f70830733c 03-Jul-1999 peter <peter@FreeBSD.org> Delete special handling for 'device-driver' suffix, it's not used in
the kernel source now.
a6a77a4ef93c385202c35b5e7863f7731b0a1a1b 09-May-1999 peter <peter@FreeBSD.org> Put on my viking helmet from the closet, and get out the war axe and
"retire" some more stuff.
5fd0058fc8daf7eb9f164c0da666dc1607efae92 09-May-1999 peter <peter@FreeBSD.org> We don't have composite devices here either.
a3eb84b2f90889aa591aabf7feeb509d26e2db27 09-May-1999 phk <phk@FreeBSD.org> config(8) lobotomy, please see commit msg in sys.

(I have no idea why cvs didn't take these changes before.)
6994e5b80181dda0367cc24342a59efbbfd24a10 24-Apr-1999 peter <peter@FreeBSD.org> More cleanups, tweaks and features.
- make this work: options FOO123=456 *without quotes*
- grumble (but accept) vector xxxintr, and tty/net/bio/cam flags.
- complain if a device is specified twice (eg: 2 x psm0)
- don't require quotes around: port IO_COM2
- recognize negative numbers. (ie: options CAM_DEBUG_UNIT=-1)
- GC some more unused stuff (we don't have composite disks from config(8)).
- various other nits (snprintf paranoia etc)
e0200a9fdea9ada7eb6f9af2ac7b63fcf5112e61 18-Apr-1999 peter <peter@FreeBSD.org> Further cleanups. i386_ioconf.c and alpha_ioconf.c were essentially the
same and were merged into a single newbus_ioconf.c. CG'd some more unused
code.
911997aae85b3a2dadfb6a3d507fbf3e3d775e4f 17-Apr-1999 peter <peter@FreeBSD.org> Get out the blow torch and hack away all the unused stuff. Note that
I zapped the MACHINE_MIPS stuff, it isn't likely to be useful apart from
recognition of the machine name. It would be reasonable to expect new
ports would look something like the alpha/i386 from a config perspective.
67419707bb113e648564665cf96af2ecfa99fab8 03-Sep-1998 nsouch <nsouch@FreeBSD.org> Reviewed by: Doug Rabson
Submitted by: nsouch
'local' token added to support new bus architecture .c files generated
by .m files.
9d3db765ca348dc273a136848d1d42795119d828 09-Jun-1998 dfr <dfr@FreeBSD.org> Add (mostly stub) alpha support. Incidentally, it doesn't build on stable
unless I manually construct y.tab.h. Is this normal?
60e8af1f2fbede010858f0b1da02becba1388a23 02-May-1998 kato <kato@FreeBSD.org> Support PC-98 machine.
ab0c84a1916478e2907f46c0becd23c512be156a 19-Feb-1998 eivind <eivind@FreeBSD.org> Style police service brought to you by: bde
6c500cca36cd8b42d90b9b5df1144ad9171cd977 18-Feb-1998 eivind <eivind@FreeBSD.org> Make '-n' the default, and introduce a new flag '-r' to get old
behaviour. Also indicate which option(s) are unknown if there are any
old-style options.
0506343883d62f6649f7bbaf1a436133cef6261d 11-Jan-1998 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'jb'.
7c6e96080c4fb49bf912942804477d202a53396c 10-Jan-1998 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'JB'.
5c37a12152dcd7c9ea69865faa6b23c106931489 28-Oct-1997 joerg <joerg@FreeBSD.org> Allow for a keyword in the "files" file named "mandatory". The first
candidate for this is "npx0", more are likely to follow.

Check for pseudo-devices that are being configured, but don't appear
in any "files" file. The ``pseudo-device bpf 2'' already hit me too
often.
bcbc3df8b00d5fa1e1ebf1549f69ab50eb92c532 28-Mar-1997 ache <ache@FreeBSD.org> Remove support for "port none" and "port auto", it gains nothing,
non-standard and not used. "port auto" is equal to "port?" or missing "port"
keyword now. "port none" is really probe routine task (return -1 for
no ports).
e27bac84c505d7a1b656909477bf094d65e7096b 26-Mar-1997 ache <ache@FreeBSD.org> Add #define's for port "none" and "auto"
Now port ommiting is equal to port "none" not to port 0
cb3f7aca30a9e2211813e07178381c2d669424ce 21-Aug-1996 ache <ache@FreeBSD.org> Bugfix: all device counts >= 256 was broken, they truncated by % 255
because of u_char count field size. It hits when device
header file already present.
6c70f295f50a3cb373c99006d3713172afa2476d 13-Apr-1996 bde <bde@FreeBSD.org> Implemented a new keyword `disable'. This should be useful for controlling
dangerous drivers in GENERIC.

Removed non-comments on #endifs in config.y.

Improved output formatting in mkioconf.c.
5b70a95cd827978a62482802e9ff51d4e958da7e 12-Jan-1996 peter <peter@FreeBSD.org> Make a little more effort to avoid touching certain generated files if
they were not changed. This makes 'make depend' more useful.
7a7fb14fa9b36f5a77f0861c85e6bb995aa6b757 11-Dec-1995 peter <peter@FreeBSD.org> Implement support for conf/options and i386/conf/options.i386
Note that this code is dormant unless the options files exist.
Also, parsing of quoted options in the config files is improved.

What this allows, is all the options in LINT to be specified to be
configured as #defines in a file rather than on the CC command line at
kernel build time. This means that 'make depend' will catch dependencies
on actual *options*, meaning that you can run 'config' and 'make depend'
in complete safety WITHOUT removing the compile directory each time.

Unfortunately, this requires a pass over the source to get the individual
files to #include the new .h files that would be generated by config.
This has a small compile time penalty (appears up to about 2% slower)
from a "fresh" build. Of course, you should not be needing to do complete
rebuilds very often once this was completed, so it would be an overall
win for most people.

Since this code is dormant and we've got a lot of other things happening
on the kernel tree at the moment (prototypes, devfs, static declarations
etc) I am not planning on doing any changes to activate this feature just
yet.
86f1bc4514fdcfd255f37f3218fe234bdc3664fc 05-Nov-1995 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'LINUX'.
af6f51995f3d342fd87ed31ea8750196ef87080c 29-Jun-1995 dg <dg@FreeBSD.org> Killed TIMEZONE, DST, and HZ keywords. They have generated a config error
for more than a year now. They've been replaced with userland methods for
changing (see adjkerntz).
4f960dd75f181e9fa2edc44324f15f0ab5c64b37 30-May-1995 rgrimes <rgrimes@FreeBSD.org> Remove trailing whitespace.
7499b6c1c74057921b76cf9fb0fe8ba4285d2700 11-May-1995 jkh <jkh@FreeBSD.org> Add a new `conflicts' flag for telling when a device is in conflict with
others. The flag can be put in descriptive locations, e.g.:

device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
or
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr

But is nonetheless boolean only. You can't turn conflict checking off for
only a given type of conflict. I didn't deem it worth the trouble at this
stage, and it's far better than the ALLOW_CONFLICT_* that preceeded it.
2e14d9ebc3d3592c67bdf625af9ebe0dfc386653 14-Mar-1995 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'MATT_THOMAS'.
e77e1f47174a626361d4397e18fe84509556dfbb 01-Mar-1995 dufault <dufault@FreeBSD.org> Added configuration for SCSI devices wired in place. The documentation
is in "man 4 scsi".
227859a1a69ff1232e1853abcd2a3f742e430a68 01-Mar-1995 gibbs <gibbs@FreeBSD.org> Implement "clean" entries for device config entries.

Submitted by: Pointed out by Bruce Evans <bde@zeta.org.au>
be8b9344b823f8f284dfb067074bd5279ae8f272 31-Dec-1994 gibbs <gibbs@FreeBSD.org> Allow config to fully handle the aic7770 driver dependancies.
8aa7a37ccea05f9b9ace655762ecee3fc54d1d97 17-Nov-1994 gibbs <gibbs@FreeBSD.org> Add new keywords to config. The options availible in file.i386 are now:

/*
* filename [ standard | optional ] [ config-dependent ]
* [ dev* | profiling-routine ] [ device-driver] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
* [ dependancy "dependancy-list"]
*/

I added

no-obj - This entry does not create anything linkable to the kernel.
dependancy - Add additional dependancy rules to a target.
no-implicit-rule - Don't assume .c -> .o type rules. Config is really
dumb in this area and assumes that everything is a .c file
irregarless of extention. This was the best choice really
since there may even be .c file that you don't want to follow
the standard rules.

This was all done so that the building to the aic7770 assembler and using
the aic7770 assembler in the building of the aic7770 driver could be config
dependant. I can now have an entry like this for the driver:

aic7770 optional ahc device-driver \
compile-with "${CC} $> -o $@" \
dependancy "$S/gnu/misc/aic7770/aic7770.c" \
no-obj no-implicit-rule
aic7770_seq.h optional ahc device-driver \
compile-with "${.CURDIR}/aic7770 -o $@ $S/gnu/misc/aic7770/aic7770.seq"\
dependancy "$S/gnu/misc/aic7770/aic7770.seq aic7770" \
no-obj no-implicit-rule
i386/isa/aic7770.c optional ahc device-driver \
dependancy "aic7770_seq.h"

I also added '\' escaping to newlines so that this doesn't look as gross as
it could have.

Reviewed by: jkh
34cd81d75f398ee455e61969b118639dacbfd7a6 23-Sep-1994 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'MACKERRAS'.
e16baf7a5fe7ac1453381d0017ed1dcdeefbc995 07-Aug-1994 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'SUNRPC'.
c8f1a26f8dda7f5350f6d52f5bbc4f5ec1a46cc4 26-May-1994 rgrimes <rgrimes@FreeBSD.org> Upgrade config to be compatible with our i386 port, pull in 95% of the
changes that have been made in FreeBSD 1.x, except for possibly the nfs
diskless support this is a completed config.
862fdf11a2ede45dec0da01ed575525d79468981 26-May-1994 rgrimes <rgrimes@FreeBSD.org> BSD 4.4 Lite usr.sbin Sources