summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/config.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix some problems that affect multiple file inclusion. Bruce foundimp2007-05-171-1/+1
| | | | | | | | | | | | | | 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-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+7
| | | | | for having multiple hints files generate a correct hints.c (eg, with all the specified ones catenated together).
* Clean up most of the "XXX"-tagged items:ru2005-12-301-0/+2
| | | | | | | | | | | - 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>
* Clean some code that became obfuscated over the years:ru2005-11-251-3/+0
| | | | | | | | | 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.
* Optionally include a DEFAULTS config file if it is present in the currentjhb2005-10-271-0/+1
| | | | | | | | | | | | | 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-1/+3
| | | | | | | | | | | 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@
* Kill count device support from config. I've changed the last fewpeter2004-08-301-5/+3
| | | | | | | | | | | | | | | | | 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.
* Per letter dated July 22, 1999, delete clause 3 from code directlyimp2004-08-071-4/+0
| | | | from Berkeley.
* Add a new "files" directive, which allows to include a files.foo file directlycognet2004-05-091-0/+7
| | | | | from a kernel config file. Bump config version to reflect this change.
* Convert to using <sys/queue.h> macros.ru2003-02-151-10/+17
|
* Commit some infrastructure for turning on -Werror for kernel compiles.peter2002-02-201-0/+1
| | | | | | 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.
* Enable hardwiring of things like tunables from embedded enironmentspeter2001-08-271-0/+2
| | | | that do not start from loader(8).
* Introduce an "include" directive. It takes one argument, a filenamedd2001-07-121-0/+1
| | | | | | | | | | | | | | 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
* newbus_ioconf() is long gonepeter2001-02-281-1/+0
|
* Some more tidying up. we dont use config-dependent anyware. Eliminatepeter2001-02-281-7/+5
| | | | some duplicate code (cut/paste bug?). tidy up some other minor stuff.
* s/special/compilewith/ (so I stop confusing myself) and GC an unusedpeter2001-02-281-1/+1
| | | | function I missed before.
* Collect together a handful of copies of the option generator code into apeter2001-02-221-1/+0
| | | | | 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-6/+0
| | | | take your word for the 'machine' switch.
* Unwind a bit more cruft - we only have one type of device now.peter2001-01-311-1/+1
|
* Redo the stray header file cleanup code to not depend on timestampspeter2001-01-311-0/+1
| | | | | or access times or anything. Just bite the bullet and keep a list of header files that we know about.
* Add support for configuring PowerPC kernels.benno2001-01-221-0/+1
| | | | Reviewed by: peter
* Add ia64 support.dfr2000-09-291-0/+1
|
* If a ${KERNEL}.hints file exists, and no hints are specified explicitly,peter2000-08-251-0/+1
| | | | | 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-28/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* A checkpoint of a part of a work-in-progress. Some more cleanups forpeter2000-06-101-2/+2
| | | | | | | | 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.
* Mark the 'conflicts' keyword as obsolete, and don't generate (unused)peter2000-01-291-1/+0
| | | | resource table entries for it.
* Remove the cam-specific device wiring code. This was a duplicate ofpeter2000-01-231-2/+0
| | | | the data in the resource tables, and cam is getting it directly now.
* Apply the axe to some more cruft in config(8). In particular:peter2000-01-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* Add a 'warning' option for the files* files. This is intended to enablepeter1999-12-121-0/+1
| | | | giving a dire warning about certain drivers going away in the future.
* Re-support "tape" as an alias for device and clean up a bit more cruftpeter1999-11-091-1/+0
| | | | | 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/+1
| | | | | | | | | | | | | | | | 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
* Further cleanup. Also remove the following unused or defunct tokens:peter1999-10-101-2/+3
| | | | and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
* Delete special handling for 'device-driver' suffix, it's not used inpeter1999-07-031-6/+5
| | | | the kernel source now.
* Put on my viking helmet from the closet, and get out the war axe andpeter1999-05-091-8/+3
| | | | "retire" some more stuff.
* We don't have composite devices here either.peter1999-05-091-18/+2
|
* config(8) lobotomy, please see commit msg in sys.phk1999-05-091-14/+1
| | | | (I have no idea why cvs didn't take these changes before.)
* More cleanups, tweaks and features.peter1999-04-241-12/+2
| | | | | | | | | | - 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)
* Further cleanups. i386_ioconf.c and alpha_ioconf.c were essentially thepeter1999-04-181-15/+16
| | | | | same and were merged into a single newbus_ioconf.c. CG'd some more unused code.
* Get out the blow torch and hack away all the unused stuff. Note thatpeter1999-04-171-34/+20
| | | | | | 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.
* Reviewed by: Doug Rabsonnsouch1998-09-031-0/+2
| | | | | | Submitted by: nsouch 'local' token added to support new bus architecture .c files generated by .m files.
* Add (mostly stub) alpha support. Incidentally, it doesn't build on stabledfr1998-06-091-0/+1
| | | | unless I manually construct y.tab.h. Is this normal?
* Support PC-98 machine.kato1998-05-021-0/+1
|
* Style police service brought to you by: bdeeivind1998-02-191-2/+2
|
* Make '-n' the default, and introduce a new flag '-r' to get oldeivind1998-02-181-0/+3
| | | | | behaviour. Also indicate which option(s) are unknown if there are any old-style options.
* Allow for a keyword in the "files" file named "mandatory". The firstjoerg1997-10-281-0/+2
| | | | | | | | 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.
* Remove support for "port none" and "port auto", it gains nothing,ache1997-03-281-2/+0
| | | | | | 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).
* Add #define's for port "none" and "auto"ache1997-03-261-0/+2
| | | | Now port ommiting is equal to port "none" not to port 0
* Bugfix: all device counts >= 256 was broken, they truncated by % 255ache1996-08-211-1/+1
| | | | | because of u_char count field size. It hits when device header file already present.
OpenPOWER on IntegriCloud