summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/config.y
Commit message (Collapse)AuthorAgeFilesLines
* Allow lists for "nooption" and "nooptions" keywords.will2015-01-231-1/+11
| | | | | | | | | | | | | | | | usr.sbin/config/config.y According to config(5), the "device", "devices", "nodevice", "nodevices", "option", "options", "nooption", and "nooptions" keywords can all take a comma-separated list of values. However, the yacc code did not allow lists for "nooption" and "nooptions", only single values. This commit fixes the yacc code to allow comma separated values for all the above keywords. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1095296 on 2014/10/07
* Remove the advertising clause from UCB copyrighted files in usr.sbin. Thisjoel2010-12-111-4/+0
| | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
* Allow a kernel config to specify a set but empty value viaemaste2010-09-131-0/+1
| | | | | | | | 'makeoptions OPTION=' for consistency with the make commandline. Previously 'makeoptions WERROR=' would result in a syntax error; now it produces the same effect as 'makeoptions WERROR'. Both forms now result in 'WERROR=' in the generated Makefile.
* Put warnings out to stderr rather than stdout.imp2010-07-151-2/+4
| | | | MFC after: 3 days
* - Handle calloc() allocation failures.ru2010-03-301-0/+10
| | | | | | | | | - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper
* Allow multiple makeoption lines to be used with the += operator, this permitsthompsa2008-11-221-11/+19
| | | | | | | | | | 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.
* Allow kernel config files to include files other than those in the CWD,obrien2008-07-281-0/+6
| | | | using unquoted paths.
* Spring forward into the late 1970's by following item 5 in the yaccimp2007-12-251-51/+34
| | | | | | | | | | | | | 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).
* Fix some problems that affect multiple file inclusion. Bruce foundimp2007-05-171-63/+17
| | | | | | | | | | | | | | 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@
* Improve INCLUDE_CONFIG_FILE support.wkoszek2007-05-121-27/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* End my resistance to jmg's multiple hints files and bring in supportimp2006-10-241-5/+5
| | | | | for having multiple hints files generate a correct hints.c (eg, with all the specified ones catenated together).
* style(9) pedantryimp2006-10-241-7/+7
|
* Since multiple hints lines do not work, make doing that a fatal error.imp2006-10-241-0/+3
|
* Remove unused variables.stefanf2006-07-201-3/+1
|
* Use calloc() instead of zeroing the memory our own.delphij2006-06-071-8/+4
|
* - Avoid adding devices multiple times to the device list.ru2005-12-301-28/+64
| | | | | | - Avoid adding options multiple times to the option list. Based on a patch by: Matt Emmerton <matt@gsicomp.on.ca>
* - Allow duplicate "machine" directives with the same arguments.ru2005-11-271-2/+3
| | | | - Move existing "machine" directives to DEFAULTS.
* Use the eq() macro for comparing strings (style), and remove a "break"ru2005-11-031-5/+4
| | | | statement to null the effect of several identical "cpu" directives.
* Implement the "nocpu" directive.ru2005-11-031-0/+12
| | | | Requested by: rwatson
* Optionally include a DEFAULTS config file if it is present in the currentjhb2005-10-271-0/+16
| | | | | | | | | | | | | 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
* Allow one to specify a second parameter to the machine line. Thisimp2005-04-011-0/+9
| | | | | | | | | | | 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@
* Allow multiple devices to be specified on one device / nodevice line.des2004-10-241-7/+27
| | | | | | Also allow "device" / "nodevice" to be spelled "devices" / "nodevices". MFC after: 2 weeks
* Kill count device support from config. I've changed the last fewpeter2004-08-301-12/+2
| | | | | | | | | | | | | | | | | 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.
* Add a new "files" directive, which allows to include a files.foo file directlycognet2004-05-091-0/+19
| | | | | from a kernel config file. Bump config version to reflect this change.
* Fixed spurious syntax errors for including files that don't begin withbde2003-11-141-3/+4
| | | | | | | | | | 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>
* Disallow multiple 'machine' directives in a kernel configurationjkoshy2003-07-061-0/+3
| | | | | | file. Reviewed by: ru, bde
* Implemented "nooption" and "nomakeoption" config(8) tokens.ru2003-02-261-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Allow for boolean make options (``makeoptions NO_MODULES'').ru2003-02-211-1/+4
| | | | Fixed the potential bug in rmopt().
* Implemented a simple "nodevice" config(8) command that cancelsru2003-02-151-0/+47
| | | | | | | the effect of the "device" command, and use it to generate the OLDCARD from GENERIC. Suggested by: bde
* Convert to using <sys/queue.h> macros.ru2003-02-151-15/+6
|
* Enable hardwiring of things like tunables from embedded enironmentspeter2001-08-271-0/+8
| | | | that do not start from loader(8).
* Introduce an "include" directive. It takes one argument, a filenamedd2001-07-121-8/+15
| | | | | | | | | | | | | | 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
* Futher cleanups. Since we have two options lists, one for proper optionspeter2001-02-221-18/+9
| | | | | | 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.
* Collect together a handful of copies of the option generator code into apeter2001-02-221-55/+29
| | | | | single newopt(char *name, char *value) function. Change newdev() to do the same thing rather than depending on the evil 'cur' device hack.
* ${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"peter2001-02-191-2/+2
| | | | | 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.
* Remove the need to list each and every cpu platform. Config will nowpeter2001-02-041-17/+1
| | | | take your word for the 'machine' switch.
* Unwind a bit more cruft - we only have one type of device now.peter2001-01-311-3/+0
|
* Add support for configuring PowerPC kernels.benno2001-01-221-0/+3
| | | | Reviewed by: peter
* Clean up some obsolete stuff. config -r has not been needed since aroundpeter2001-01-221-8/+5
| | | | | | FreeBSD 3.x or so when the 'make depend' picked up the opt_foo.h files. Convert warnings into actual errors in the hope that buildkernel users will pay more attention. :-(
* Implement option strings that we can use in #ifdefs (where unavoidable)peter2001-01-191-0/+25
| | | | | | | | as a replacement for the evil #define NFOO. If 'device npx' is in the static kernel, a synthetic option '#define DEV_NPX 1' will be available to stick in an opt_xxx.h file. "#if NNPX > 0" can be replaced with "#ifdef DEV_NPX" and we can get rid of the overloaded meaning of the device count mechanism.
* Make it possible to specify profiling in the kernel config file.phk2000-10-141-0/+3
| | | | Do so for LINT.
* Add ia64 support.dfr2000-09-291-0/+3
|
* If a ${KERNEL}.hints file exists, and no hints are specified explicitly,peter2000-08-251-1/+5
| | | | | then include the hints with a marker indicating that it is a fallback. The kernel side of this is to come shortly.
* Borrow phk's axe and apply the next stage of config(8)'s evolution.peter2000-06-131-230/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mark the 'conflicts' keyword as obsolete, and don't generate (unused)peter2000-01-291-2/+3
| | | | resource table entries for it.
* Remove the cam-specific device wiring code. This was a duplicate ofpeter2000-01-231-6/+0
| | | | the data in the resource tables, and cam is getting it directly now.
* Clean up something in config(8) that has annoyed me for ages. Removepeter2000-01-231-11/+15
| | | | | | | | | | | | | | the need to specify the unit number of unwired devices. ie: instead of saying "device fxp0" we can say "device fxp" which is much closer to what it actually means. The former (fxp0) implied something about reserving the 0th unit, but it does not and never did - it was a figment of config(8)'s imagination that we had to work around.. "device fxp0" simply means "compile in the fxp device driver", so we may as well just write it as "device fxp" which is closer to what it really means. Doing this also saves us from filling up the ioconf.c tables with meaningless entries.
* Apply the axe to some more cruft in config(8). In particular:peter2000-01-081-86/+34
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* Re-support "tape" as an alias for device and clean up a bit more cruftpeter1999-11-091-2/+11
| | | | | left over from the original system (d_dk was for preassigned iostat unit numbers for disks)
* Add option "-d destdir" which instructs config to use another outputmarcel1999-10-301-2/+2
| | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud