Commit Graph

435 Commits

Author SHA1 Message Date
Nathan Whitehorn
9b047d4a9a Enhance config to handle MACHINEs with multiple architectures:
- Passing -m to config will now print the MACHINE and MACHINE_ARCH
  given in the passed kernel configuration file and then exit.
- If an option is defined in options.MACHINE with the same name as the
  architecture of the kernel being configured, that option will be
  considered set. This allows conditional compilation based on CPU
  architecture.

Config version is now 600010.

Reviewed by:	imp
2010-07-13 04:08:08 +00:00
Warner Losh
28a24ccfa9 style(9) fixes:
o make cmd scoped to the whole do_rules function, since it really is
  scoped to the whole fucnion.  Making it static was the wrong way to
  fix referencing it outside of the block in which it was declared
  (and conforms to the style of the rest of the file).
o remove a couple of meaningless blank lines
o properly wrap one line.
2010-06-13 16:54:11 +00:00
Warner Losh
02b9c3f52f sparc64, and possibly other architectures, pads the length of the
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert.  Break out of the loop when we hit an
NUL within that many bytes of the end.

MFC after:	3 days
2010-05-01 07:25:28 +00:00
Warner Losh
4bc2b0b76d Require the option that's mapped be listed in the options file. This
will allow people with old config options to either have it just work
(if config is new enough), or get a version error (if their config is
about 7.0 or newer) rather than getting a cryptic error about
duplicated options in the options file, or getting an error about an
unknown option, at which point they'd update their config file only to
learn they need a new config, only to learn they didn't really need to
update their config file...  All this because our version checking was
in the wrong place for the past decade...

# hopefully this is the last change, and we'll be able to config with an
# 8.0 GENERIC file on stable/8 after I merge this change and add the
# compat options.

MFC after:	3 days
2010-04-27 06:14:30 +00:00
Warner Losh
012ead2f2c Redo how we add compat options so as to be compatible with old
versions of config.  Remove support for the syntax OLD = NEW form the
options file, and instead have a new file $S/conf/options-compat.
This file will be parsed as OLD NEW on each line.  Bump version of
config.  Since nothing in -current ever used this, there's no hazards
for current users, so I'm not bumping the version in the
Makefiles.$MACHINE.  No need, really, for this version bump in
-current, but this was introduced into -stable before I realized the
version check was ineffective there, so the verison bump doesn't hurt
here and keeps the two branches in sync, versionwise, after the MFC.

MFC after:	3 days
2010-04-27 05:38:26 +00:00
Warner Losh
90aa4f9e8c 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
2010-04-27 05:04:32 +00:00
Alexander Leidinger
7ab4cc53fd Revert r206179 (by imp) and do something similar which is more consistent
with all other corresponding CTF places by changing the corresponding
code which is generated by config(8). Or in short, move the '@' from
the variable definition to the use of the variable. [1]

While I'm here break up a long line. [2]

Discussed with:	imp [1,2], bde [2]
2010-04-22 09:20:17 +00:00
Warner Losh
bd34cda61a Bump minor version of config to reflect the new option remapping
feature.  The kernel makefiles have specifically not been bumped
because nothing uses this new feature and doing so forces everybody to
recompile for no good reason.  This chnage will be MFC'd where the
kernel version numbers for amd64 and ia64 will be bumped, since those
are the only two that have use the option remapping feature.  Once
merged, this will give a better error message to folks that are using
buildkernel without buildworld or kernel-toolchain to update their
kernels.

MFC after:	3 days
2010-04-20 20:36:38 +00:00
Warner Losh
e1a4e3fa37 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
2010-04-15 15:10:46 +00:00
Ruslan Ermilov
53d55e9756 - Handle calloc() allocation failures.
- Fixed a comment.
- 2 -> EXIT_FAILURE in some places.
- errx() -> err() where appropriate.

PR:		144644
Submitted by:	Garrett Cooper
2010-03-30 13:46:40 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Ed Schouten
10bc3a7f42 ANSIfy almost all applications that use WARNS=6.
I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.
2009-12-29 22:53:27 +00:00
Wojciech A. Koszek
4ac2fcaa45 Move the comment to it's correct place. 2009-02-07 11:40:47 +00:00
Wojciech A. Koszek
fcba95d49e Remove leftover of alpha support for config(8)--we have MAP_FAILED
globally defined.
2009-02-07 11:12:30 +00:00
Wojciech A. Koszek
d030e65009 Make config -x <kernel> only return non-zero characters,
so that:

	config -x <kernel> | grep <something>

just works.

Reported by:	Danny Braniss <danny@cs.huji.ac.il>
2009-02-06 00:50:21 +00:00
Warner Losh
50a4596585 Delete commented out ancient history. 2009-01-26 21:45:33 +00:00
Andrew Thompson
2880daeb77 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.
2008-11-22 21:12:47 +00:00
David E. O'Brien
eb43240464 Allow kernel config files to include files other than those in the CWD,
using unquoted paths.
2008-07-28 17:11:57 +00:00
John Birrell
4287da9afb Revice the way the CTF conversion is done per object. Avoid creating a second
shell (which was the problem with the original implementation) and avoid
letting make see an empty definition (which was the problem with the current
implementation).
2008-06-29 07:15:57 +00:00
John Birrell
1f1fa917bd Change the CTF conversion makefile code to use a new line to avoid
spawning another shell.

Requested by: Ed Schouten

M    config/mkmakefile.c
2008-06-09 06:33:26 +00:00
John Birrell
4978b9f13c Add the CTF conversion to the generated makefile. In the case where
NO_CTF or !WITH_CTF, the macro is empty.
2008-05-23 03:55:26 +00:00
Warner Losh
30f94bb497 Fix a bug introduced by DEFAULTS feature. When the config file
doesn't exist, we make a directory and then say "oops, that file isn't
there" leaving the directory behind.  Add a stat for the config file
so that we detect this before making the directory.  This is
semi-lame, but less lame than having this bug.
2008-04-10 22:57:54 +00:00
Ed Maste
3b2262e488 Honour the logical current working directory ($PWD) when using config's
-d destdir option.  For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed.  Code to check
$PWD's validity cribbed from pwd(1).

Discussed on hackers@.
2008-01-08 21:10:13 +00:00
Warner Losh
91998fc549 Spring forward into the late 1970's by following item 5 in the yacc
manual's Appendix D ("Old Features Supported but not Encouraged") in
the Seventh Edition Unix Programmer's Manual (January, 1979) by
retiring the " = {" method of of action specification in favor of a
plain "{".  It is no longer necessary for this bootstrap program to
be compatible with 6th Edition systems.  Some yaccs in the wild do not
support this old syntax any more, and compatibility with those systems
is more important these days (as there are easily 7 orders of magnitude
more of them than real v6 systems today).

Reviewed by: jhb@ and dds@ (the latter gave the reference).
2007-12-25 06:22:33 +00:00
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Warner Losh
c1f4dd9355 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@
2007-05-17 04:53:52 +00:00
Wojciech A. Koszek
5f9974ae57 Handle !INCLUDE_CONFIG_FILE entirely in the kernel. This should make some
developers happy, since it will let them to use old config(8) with newer
kernels.

Reviewed by:	imp
Approved by:	imp
2007-05-16 16:08:04 +00:00
Wojciech A. Koszek
9e2f7513e1 Bump config(8) version and build requirement for config(8) to 600006. This
is caused by my latest changes to config(8). You're supposed to install new
config(8) in order to prevent yourself from seeing a warning about old
version of that tool.

You should configure the kernel with a new config(8) then.

Oked by:	rwatson, cognet (mentor)
2007-05-13 02:36:41 +00:00
Wojciech A. Koszek
ae7a150a68 This is loser's commit message:
Remember about tricky cases, where options contain unfriendly characters,
from the ANSI-C string point of view ('"' in this case). The x09 build
breakage was caused by SC_CUT_SEPCHARS options.

I did test this patch number of times; each time unprofessionally and
inappropriately.

OKed by:	cognet (mentor)
2007-05-12 22:37:52 +00:00
Wojciech A. Koszek
c21a9d0c87 Add ${.CURDIR} before kernconf.tmpl in order to let the build see newly
added kernconft.tmpl file.

Approved by:	cognet (mentor)
2007-05-12 20:33:13 +00:00
Wojciech A. Koszek
744b947ef8 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@
2007-05-12 19:38:18 +00:00
Warner Losh
a4ae1f8999 Don't leak files.
This also eliminates the need for ifp init.

Submitted by: ru@
2006-10-24 07:12:31 +00:00
Warner Losh
5fd6a6b362 Document multiple hints lines.
Tweak machine description to more accurately reflect second argument being
the cpu architecture.  Note correspondence with MACHINE and MACHINE_ARCH.
2006-10-24 00:44:40 +00:00
Warner Losh
86418d0cef 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).
2006-10-24 00:31:59 +00:00
Warner Losh
55659bb594 style(9) pedantry 2006-10-24 00:07:39 +00:00
Warner Losh
f4359e4e36 Since multiple hints lines do not work, make doing that a fatal error. 2006-10-24 00:02:23 +00:00
Ruslan Ermilov
fffa30fb6d Comment out the first paragraph; while it tells the true (we're using
the old BSD config(8) utility in FreeBSD), it does not look good.

PR:		docs/100328
2006-10-21 20:09:51 +00:00
Ruslan Ermilov
d9fb65c84d Added rudimentary support for the "include" directive (inside "files").
This will be used to split sys/conf/files into multiple files similar
to how this is done in NetBSD.
2006-10-01 17:17:29 +00:00
Stefan Farfeleder
347a5ee76c Remove unused variables. 2006-07-20 09:38:46 +00:00
Stefan Farfeleder
87364ca6f0 Remove an unused variable. 2006-07-19 10:46:38 +00:00
Xin LI
5f17c1e2b2 Use calloc() instead of zeroing the memory our own. 2006-06-07 01:43:26 +00:00
Joseph Koshy
4bb7c6590e Document the two argument form of the "machine" directive.
Reviewed by:	imp
MFC After:	3 days
2006-02-12 07:56:11 +00:00
Warner Losh
d5e0beb486 Allow newer config versions to config older versions with the same
major number.

Reviewed by: ru@, jhb@, arch@ (a few months ago)

# this is subject to refinement based on experience.
2006-02-03 06:12:10 +00:00
Florent Thoumie
34e703473c - Change the exit message from "make cleandepend; make depend" to
"make cleandepend && make depend".

PR:		bin/91765
Submitted by:	Soeren Straarup <xride@x12.dk>
Approved by:	cpercival
MFC after:	3 days
2006-01-14 08:12:25 +00:00
Ruslan Ermilov
8ee64886ef - Avoid adding devices multiple times to the device list.
- Avoid adding options multiple times to the option list.

Based on a patch by:	Matt Emmerton <matt@gsicomp.on.ca>
2005-12-30 16:28:06 +00:00
Ruslan Ermilov
22025511b4 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>
2005-12-30 15:29:50 +00:00
Ruslan Ermilov
f99d3b7b53 config.5 was repocopied from share/man/man5/ to usr.sbin/config/.
Repocopied by:	peter
2005-12-09 06:46:41 +00:00
Ruslan Ermilov
198423bd20 Document "makeoption", "nocpu", and "nomakeoptions" directives.
(Indeed this should be repo-copied to src/usr.sbin/config/.)
2005-12-03 20:07:32 +00:00
Ruslan Ermilov
233945839b Add "makeoption" as an alias to "makeoptions", for symmetry. 2005-12-03 20:04:24 +00:00
Ruslan Ermilov
f0caeb4419 Style: use S_ISDIR() (submitted by bde@) and eq() where appropriate. 2005-11-30 17:55:49 +00:00
Peter Wemm
03349079fe The DEFAULTS changes caused the user specified config file to be opened
much later than before, and it is now after we do a mkdir ../compile/FILE.
As a result, if you do 'config DOESNOTEXIST', it now creates the directory
../config/DOESNOTEXIST.  It did not do that before.  If DEFAULTS does not
exist, it still fails early before any permanent changes.

This shameless hack restores the old behavior of ensuring the config file
actually exists before mkdiring its counterpart directory.

Now I can rmdir ../compile/D and it will stay dead, after my fingers keep
sabotaging me with 'config D<tab><enter>'.  (Some of my kernel names
started with D, which used to be 1-character unique and my fingers knew
this very well...)
2005-11-29 22:54:49 +00:00
Warner Losh
ae54f5616d 600004 is a better new version than 700000 based on some future commits to
this file.  With ru@'s approval, change it to this version.  In this case we
had to bump the version because the old parser would choke on | in the new
'or' syntax and consider that a device.

Approved by: ru@
2005-11-28 17:47:54 +00:00
Ruslan Ermilov
6646524f34 - Allow duplicate "machine" directives with the same arguments.
- Move existing "machine" directives to DEFAULTS.
2005-11-27 23:17:00 +00:00
Ruslan Ermilov
a8e06f2a52 Make config(8) understand ORed dependecies in "files*" and
improve tracking of known devices.  Bump config(8) version.
2005-11-27 21:41:58 +00:00
Ruslan Ermilov
61ede7eeac 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.
2005-11-25 22:25:34 +00:00
Robert Watson
5baadf2110 Minor comment tweak to prevent gcc from being upset about the substring
/* appearing in a comment.
2005-11-07 18:45:46 +00:00
Peter Wemm
634e3a5c83 Add some rationale about when to bump and not bump the config version.
Clarify that it is not like the shlib versions, and not like param.h's
__FreeBSD_version/osreldate either.

When config(8) was actively changing a while back, the interface between
config and the build system (eg: /sys/conf/files.* and Makefile.*) was
changing rapidly.  configvers is a version number of that interface.

User specified config files do not have a version number.  The decision
about whether a user supplied config file is syntactically valid or not
belongs to the parser and sanity checks, not an arbitary number.
2005-11-07 17:37:27 +00:00
Warner Losh
6383e2266c since nocpu isn't used in the kernel config base, we don't need to
bump the version.  Peter Wemm, John Baldwin and I hammered this out
after the last time I needlessly incremented the version.
2005-11-04 04:16:44 +00:00
Ruslan Ermilov
d3e15dbaa0 Use the eq() macro for comparing strings (style), and remove a "break"
statement to null the effect of several identical "cpu" directives.
2005-11-03 21:27:02 +00:00
Ruslan Ermilov
a15aafd590 By a popular demand, add "nomakeoptions" as an alias to "nomakeoption". 2005-11-03 21:09:59 +00:00
Ruslan Ermilov
acd58322c7 Implement the "nocpu" directive.
Requested by:	rwatson
2005-11-03 14:01:22 +00:00
John Baldwin
b34b3c19c6 Bump config(8) version for the DEFAULTS change. 2005-10-27 19:27:55 +00:00
John Baldwin
dfdbf9be00 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
2005-10-27 17:13:23 +00:00
David E. O'Brien
216a5fbf37 Put rev. 1.65 into usage(). 2005-08-11 15:23:23 +00:00
David E. O'Brien
71d8a448ac Add an option to tell what version of config(8) this is. 2005-08-10 06:36:44 +00:00
Ruslan Ermilov
de12942735 Ask that "make cleandepend" be run before "make depend", now that
we don't do this automatically.

Suggested by:	bde
2005-04-22 17:42:50 +00:00
Warner Losh
51c1297a48 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@
2005-04-01 22:54:22 +00:00
Warner Losh
a2920586a8 style(9) nits 2005-03-30 21:45:08 +00:00
Dag-Erling Smørgrav
8acd37ef20 Unstaticize config. It was being optimized away.
MFC after:	3 days
2005-03-27 13:44:00 +00:00
Dag-Erling Smørgrav
f5c4f5a580 Bump the version number for the addition of devices / nodevices. 2005-02-10 15:16:25 +00:00
Dag-Erling Smørgrav
b83d741b1c Fully document (no)?(device|option)s?.
This page should probably be repocopied to src/usr.sbin/config/.
2005-02-10 14:26:21 +00:00
Dag-Erling Smørgrav
d67c43b3a9 "device" and "nodevice" lines can actually specify more than one device
(separated by commas), so add "devices" and "nodevices" as aliases.

MFC after: 	2 weeks
2005-02-10 10:46:27 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
fff666a6f8 The ioconf.c is no longer generated.
Submitted by:	Craig Rodrigues
2004-12-16 09:52:41 +00:00
Dag-Erling Smørgrav
30fdf276fb Allow multiple devices to be specified on one device / nodevice line.
Also allow "device" / "nodevice" to be spelled "devices" / "nodevices".

MFC after:	2 weeks
2004-10-24 10:27:16 +00:00
Dag-Erling Smørgrav
9b736ef9e6 If the file specified in an "include" line does not exist in the current
directory, and its name does not begin with a period or a forward slash,
go look for it in ../../conf.

Wished for by:	scottl
MFC after:	2 weeks
2004-10-24 09:38:41 +00:00
Poul-Henning Kamp
44c428d240 We accept both "option" and "options" so also accept both "nooption"
and "nooptions".
2004-10-12 13:21:44 +00:00
Peter Wemm
f37a929ca1 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.
2004-08-30 23:03:58 +00:00
Warner Losh
23717fc46a Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.
2004-08-07 04:19:37 +00:00
Brooks Davis
e32e9a42a6 Static device counts will not be supported in 6.x so place the generated
macros (N<driver>) under BURN_BRIDGES.

Discussed with:	peter, imp, scottl, ...
2004-06-30 21:00:47 +00:00
Ruslan Ermilov
bf7f20c2b6 Assorted markup, spelling, and grammar fixes. 2004-06-16 08:33:57 +00:00
Olivier Houchard
fc0c46e313 Document the "files" directive.
Reminded by:	jmg
2004-05-13 21:55:53 +00:00
Olivier Houchard
dd472ec61d Fix a few glitches in my previous commit.
This makes config(8) WARNS?=6 compliant.
2004-05-11 15:42:44 +00:00
Olivier Houchard
43a903c091 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.
2004-05-09 22:29:00 +00:00
Dag-Erling Smørgrav
59b7dcd3d0 Whitespace nit. 2004-02-17 09:59:45 +00:00
Bruce Evans
e3937b620a Fixed spurious syntax errors for including files that don't begin with
a SEMICOLON token (a newline or semicolon, or one of these preceded
by a comment and/or whitespace).  The input stream was switched too
early and the parser was expecting a SEMICOLON in the included file
instead of after the filename in the include directive.

Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
Kept alive by:	Adam C. Migus <adam@migus.org>
2003-11-14 11:23:25 +00:00
Simon L. B. Nielsen
3b5e70922f Add a reference to config(5) in the SEE ALSO section.
Suggested by:	dcs
Approved by:	ceri (mentor)
2003-08-06 21:41:35 +00:00
Joseph Koshy
81e25c5eb2 Eliminate non-existent word.
Submitted by:	jwd
2003-07-13 09:11:10 +00:00
Joseph Koshy
6203e1ea06 "towards" -> "toward". According to dictionary.com, the use of "towards"
is common in British English, while "toward" is the preferred form in
American English.  Use the American form for consistency.

Correct the date on the manual page.

Submitted by:	Tom Rhodes <trhodes@freebsd.org>,
		underway@comcast.net (Gary W. Swearingen)
2003-07-08 01:39:02 +00:00
Joseph Koshy
1949e95550 Disallow multiple 'machine' directives in a kernel configuration
file.

Reviewed by:	ru, bde
2003-07-06 02:00:52 +00:00
Joseph Koshy
1518d1294c New section 5 manual page detailing our kernel configuration file
format.

Reviewed by:	Ruslan Ermilov <ru@freebsd.org>, Jens
		Schweikhardt <schweikh@schweikhardt.net>
2003-07-06 01:52:26 +00:00
Mark Murray
a97024f7c6 Not particularly pretty hack to generate rules to make .ln files
from .c files. Actually, this is overkill, as the .ln file targets
are assumed from .? (any) files. This is not a problem in practice,
merely a bit untidy, as the linting rules DTRT. See the sys/conf/*
and sys/mk/* files for usage.
2003-06-16 20:08:15 +00:00
Thomas Moestl
74155a4873 Check the return values of opendir() and unlink() in cleanheaders().
If unlink() fails, just print a warning for now.
2003-06-12 11:36:54 +00:00
David E. O'Brien
70be60d344 Best we can do is WARNS=1 due to lex. 2003-06-11 21:27:37 +00:00
David E. O'Brien
9cad751da5 Do not refer to the non-existant BDECFLAGS. 2003-06-11 21:25:15 +00:00
Dag-Erling Smørgrav
d885e237ca Don't convert the kernel ident to uppercase when writing the Makefile. 2003-04-24 00:52:58 +00:00
Christian Brueffer
c2f1217b0c Grammar fix
PR:		51164
Submitted by:	Jeff Ito <jeffi@rcn.com>
MFC after:	3 days
2003-04-20 13:11:11 +00:00
Poul-Henning Kamp
18b492fc8c Bump the config version to force people to upgrade their config(8)
so the fix for emitting multiple instances of .o files will prevent
link errors on LINT.
2003-04-15 21:29:11 +00:00
Poul-Henning Kamp
37b2f82295 Avoid emitting duplicate makefile entries. 2003-04-12 14:02:03 +00:00
Dag-Erling Smørgrav
76131e39c3 Print FYI messages on stderr. Previously, they were printed on stdout,
and due to buffering they would sometimes come out after the actual
error message when mkheaders() failed due to an unknown device, so you'd
get an error messages followed by 20 or 30 lines of harmless warnings.

There are lots of other warning messages in config(8) that are printed
on stdout, but these were the most egregious (at least with LINT).
2003-03-09 15:08:47 +00:00
Ruslan Ermilov
824018495d Implemented "nooption" and "nomakeoption" config(8) tokens.
Fixed memory leak in the "nodevice" option implementation.

Use these instead of sed(1) in MD NOTES.

Use a single makefile (sys/conf/makeLINT.mk) to generate
LINT for all architectures.  (Previous versions missed
the LINT dependency on Makefile, and i386 version also
missed the dependency on ${NOTES}.)

Fixed bugs in the previous NOTES conversion using the
"nodevice" token and sed(1):

- i386 LINT lost "device pst".

- pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD
  options, and got needless DPT_* options.

- Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV
  to sparc64 LINT so that it has a chance to config(8).

This basically returns us to where we were before.
2003-02-26 23:36:59 +00:00
Ruslan Ermilov
e20f30f755 Allow for boolean make options (``makeoptions NO_MODULES'').
Fixed the potential bug in rmopt().
2003-02-21 23:17:00 +00:00
Ceri Davies
7f373b5b93 Bring the suggested command for extracting a configuration file from the
kernel into line with that suggested in LINT.

PR:		bin/48157
Submitted by:	naddy
MFC After:	4.8
2003-02-18 21:04:55 +00:00
Ruslan Ermilov
0b56eafddf Implemented a simple "nodevice" config(8) command that cancels
the effect of the "device" command, and use it to generate the
OLDCARD from GENERIC.

Suggested by:	bde
2003-02-15 02:39:13 +00:00
Ruslan Ermilov
292dd8a87f Convert to using <sys/queue.h> macros. 2003-02-15 02:26:13 +00:00
Tom Rhodes
dbbdfcf810 Remove this Makefile, these docs are built by the Makefiles in src/share/doc/smm. 2003-02-01 20:34:04 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov
a654c53e16 mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
Peter Wemm
2f3bead082 Remove stray function prototype. I wrote and removed this function but
forgot the prototype.

Submitted by:	dd
2002-07-21 23:31:43 +00:00
Peter Wemm
4f52fbb1d8 Check for missing static unit 'count' declarations as well. 2002-07-21 23:02:35 +00:00
Peter Wemm
775d6c0ece Check that we are not supplying 'device foo N' to devices that do not take
a statuc unit count.
2002-07-21 22:23:56 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Bruce Evans
8365569883 Moved the setting of all profiling-related variables except the key one
(PROFLEVEL) to kern.pre.mk so that it is easier to manage.  Bumped config
version to match.

Moved the check for cputype being configured to a less bogus place in
mkmakefile.c.
2002-07-13 19:36:14 +00:00
David E. O'Brien
4ffcd14286 We don't need to hit the user over the head so strong now that we've
fixed all the known warnings suffiently to not require NO_WERROR.

Ok'ed by:	peter
2002-07-06 01:07:48 +00:00
Juli Mallett
e872716d8a Clean up hex() and octal() to return and work with unsigned integers since
they scan values of unsigned types, and since they do not need otherwise,
have them take const char * arguments.
2002-06-21 10:56:44 +00:00
Tom Rhodes
67c8020f12 Consistancy check: s/file system/filesystem/g 2002-05-16 02:28:39 +00:00
Peter Wemm
916cd514f2 Add a hint about -DNO_WERROR 2002-02-25 21:59:57 +00:00
Peter Wemm
7a2eb19dbf 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.
2002-02-20 23:35:56 +00:00
Peter Wemm
f99afbb9af Bump configvers for different handling of maxusers. 2001-12-14 09:40:01 +00:00
Matthew Dillon
66a11b9fb1 Allow maxusers to be specified as 0 in the kernel config, which will
cause the system to auto-size to between 32 and 512 depending on the
amount of memory.

MFC after:	1 week
2001-12-09 01:57:09 +00:00
Ruslan Ermilov
66d4a748cf mdoc(7) police:
- Bump document date.
- Remove hard sentence breaks.
- Fix markup.
2001-10-26 11:16:18 +00:00
Peter Wemm
8116859a74 Use includes to get prototypes for hints and env arrays.
Submitted by:	bde
2001-09-17 21:25:48 +00:00
Peter Wemm
76cb0cadf1 Enable hardwiring of things like tunables from embedded enironments
that do not start from loader(8).
2001-08-27 05:11:53 +00:00
Ruslan Ermilov
753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Peter Wemm
e8cc4c7407 Put on my peril-sensitive sunglasses and remove the POLA-violating
stealth hints loading.  'make release' has been fixed to not need this
now anyway.  If you want static hints, specify it explicitly.

Hey! Why did it suddenly get so dark??
2001-07-14 05:02:40 +00:00
Peter Wemm
ef1cb1959c Remove the old machine symlink first. 2001-07-14 00:03:05 +00:00
Dima Dorfman
5e06480c9f 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
2001-07-12 02:08:51 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Warner Losh
b0fa8b5b3b Bring FILES section up to date.
submitted by: Mark Peek <mark-ml@whistle.com>
2001-07-04 18:48:50 +00:00
Warner Losh
a3d1987d23 Bump config version in config. 2001-07-02 05:38:26 +00:00
Warner Losh
971470c36c Move kernel compile directory from sys/compile/FOO to
sys/compile/${MACHINE}/FOO.

Reviewed by: obrien, peter and the USENIX terminal room secret kernel cabal
2001-06-30 06:28:12 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Peter Wemm
6f34947de7 newbus_ioconf() is long gone 2001-02-28 02:55:15 +00:00
Peter Wemm
f9f6bfe762 Some more tidying up. we dont use config-dependent anyware. Eliminate
some duplicate code (cut/paste bug?). tidy up some other minor stuff.
2001-02-28 02:53:32 +00:00
Peter Wemm
388481c1b7 s/special/compilewith/ (so I stop confusing myself) and GC an unused
function I missed before.
2001-02-28 02:30:30 +00:00
Peter Wemm
4336b13f61 Untangle some special magic that happened for conflicting defintions for
local files.* and options.* files on the third pass.
2001-02-28 02:07:47 +00:00
Peter Wemm
5ee6dbc67e Remove some more dead code. :-/ 2001-02-28 01:38:01 +00:00
Peter Wemm
0ef4251fb9 GC some leftover stuff (device-driver suffix) 2001-02-28 01:17:04 +00:00
Peter Wemm
ed53c6c5c0 Move the 'dont forget "make depend"' to be the last thing that people see,
after the warnings.
2001-02-23 00:22:04 +00:00
Peter Wemm
a9973e4ad8 Futher cleanups. Since we have two options lists, one for proper options
and one for Makefile options, pass in the list head and use a common
newopt() routine.
Fix the 'config vmunix' support glue which was broken for a few minutes.
2001-02-22 04:00:29 +00:00
Peter Wemm
2db1cff10d 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.
2001-02-22 03:40:50 +00:00
Peter Wemm
68f4fced95 ${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.
2001-02-19 04:43:21 +00:00
Peter Wemm
357a8c727e Devices are NOT compiled with the "special c2 option -i".. 2001-02-18 22:42:15 +00:00
Peter Wemm
3b10a240e5 Remove the need to list each and every cpu platform. Config will now
take your word for the 'machine' switch.
2001-02-04 13:17:38 +00:00
Peter Wemm
3c36aab606 Try and make it clearer that the static units thing is a FYI only. 2001-01-31 11:18:49 +00:00
Peter Wemm
246449f3e3 Unwind a bit more cruft - we only have one type of device now. 2001-01-31 10:30:30 +00:00
Peter Wemm
62a4bb5509 Oops. An old version of a local change leaked in with the last commit.
Since it is here, clean it up a bit.
2001-01-31 10:06:06 +00:00