summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/main.c
Commit message (Collapse)AuthorAgeFilesLines
* - Change the exit message from "make cleandepend; make depend" toflz2006-01-141-1/+1
| | | | | | | | | "make cleandepend && make depend". PR: bin/91765 Submitted by: Soeren Straarup <xride@x12.dk> Approved by: cpercival MFC after: 3 days
* Clean up most of the "XXX"-tagged items:ru2005-12-301-0/+15
| | | | | | | | | | | - 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>
* Style: use S_ISDIR() (submitted by bde@) and eq() where appropriate.ru2005-11-301-4/+3
|
* The DEFAULTS changes caused the user specified config file to be openedpeter2005-11-291-0/+5
| | | | | | | | | | | | | | | 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...)
* Optionally include a DEFAULTS config file if it is present in the currentjhb2005-10-271-3/+10
| | | | | | | | | | | | | 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
* Put rev. 1.65 into usage().obrien2005-08-111-1/+1
|
* Add an option to tell what version of config(8) this is.obrien2005-08-101-1/+5
|
* Ask that "make cleandepend" be run before "make depend", now thatru2005-04-221-1/+1
| | | | | | we don't do this automatically. Suggested by: bde
* Allow one to specify a second parameter to the machine line. Thisimp2005-04-011-0/+14
| | | | | | | | | | | 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@
* style(9) nitsimp2005-03-301-2/+3
|
* Unstaticize config. It was being optimized away.des2005-03-271-1/+1
| | | | MFC after: 3 days
* 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/+2
| | | | | from a kernel config file. Bump config version to reflect this change.
* Check the return values of opendir() and unlink() in cleanheaders().tmm2003-06-121-2/+4
| | | | If unlink() fails, just print a warning for now.
* Convert to using <sys/queue.h> macros.ru2003-02-151-2/+3
|
* We don't need to hit the user over the head so strong now that we'veobrien2002-07-061-1/+0
| | | | | | fixed all the known warnings suffiently to not require NO_WERROR. Ok'ed by: peter
* Add a hint about -DNO_WERRORpeter2002-02-251-0/+1
|
* Remove the old machine symlink first.peter2001-07-141-3/+2
|
* 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
* Move kernel compile directory from sys/compile/FOO toimp2001-06-301-3/+2
| | | | | | sys/compile/${MACHINE}/FOO. Reviewed by: obrien, peter and the USENIX terminal room secret kernel cabal
* Move the 'dont forget "make depend"' to be the last thing that people see,peter2001-02-231-0/+1
| | | | after the warnings.
* ${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"peter2001-02-191-5/+4
| | | | | 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-10/+1
| | | | take your word for the 'machine' switch.
* Redo the stray header file cleanup code to not depend on timestampspeter2001-01-311-27/+44
| | | | | or access times or anything. Just bite the bullet and keep a list of header files that we know about.
* AARGH! This does not mix too well with the -o noatime mount option.peter2001-01-291-1/+6
| | | | :-(
* I confess. This is a truely nasty hack. I am so ashamed!peter2001-01-291-0/+57
| | | | | | | | (I think config(8) source does bad things to your brain :-) Clean up likely stray *.h files in the build directory. Eg: if isa.h ceases being generated, zap it. The heuristics to figure out a 'likely' file are pretty revolting.
* Add support for configuring PowerPC kernels.benno2001-01-221-0/+1
| | | | Reviewed by: peter
* Clean up some obsolete stuff. config -r has not been needed since aroundpeter2001-01-221-27/+3
| | | | | | 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. :-(
* Try and stop config(8) from freaking out due to unnecessary paranoiapeter2001-01-041-13/+2
| | | | | | | when using -d. Use realpath(3) to locate the top of the tree rather than trying to manually trim back the results of a getcwd(). Requested by: alfred
* Fix buffer overflows in filenames. If you had a path > 80 charactersimp2000-11-211-11/+9
| | | | | | | | | | for your /usr/obj/path/to/my/files path to the kernel, then weird things happened. make buildkernel would fail because config was dumping core or generating bad file names (depending on the lenght of the path). While I was here, also use strlcpy, strlcat and snprintf (or asprintf) as necessary. Minor format policing for the snprintf calls as well.
* Add ia64 support.dfr2000-09-291-0/+1
|
* Borrow phk's axe and apply the next stage of config(8)'s evolution.peter2000-06-131-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+0
| | | | | | | | 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.
* Add option "-d destdir" which instructs config to use another outputmarcel1999-10-301-11/+59
| | | | | | | | | | | | | | | | 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-27/+18
| | | | and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Put on my viking helmet from the closet, and get out the war axe andpeter1999-05-091-26/+1
| | | | "retire" some more stuff.
* config(8) lobotomy, please see commit msg in sys.phk1999-05-091-4/+24
| | | | (I have no idea why cvs didn't take these changes before.)
* More cleanups, tweaks and features.peter1999-04-241-2/+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-8/+7
| | | | | 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-31/+8
| | | | | | 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.
* Back out default debug kernel. The flags revert to historical behaviour.grog1999-04-111-18/+4
| | | | | | | | | | | | | | | Requested-by: ache bde dg Modify targets for debug kernels: when -g was specified, make will now build a debug kernel called kernel.debug, and create a stripped version called kernel at the same time. The two targets install and install.debug are otherwise unchanged. Requested-by: dillon Update man page accordingly.
* add -s to usageache1999-04-101-2/+2
| | | | | PR: 11056 Submitted by: Nickolay N. Dudorov <nnd@mail.nsk.ru>
* 1. Modify config to issue different code for debugging.grog1999-04-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2. Config complains if you use -g: Debugging is enabled by default, there is no ned to specify the -g option 3. Config warns you if you don't use -s: Building kernel with full debugging symbols. Do "config -s BSD" for historic partial symbolic support. To install the debugging kernel, do make install.debug (BSD was the name of the config file I used; I print out the same name). 4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to work if a kernel name other than 'kernel' is specified. This is not absolutely necessary, but useful, and it was relatively easy. I now have a kernel called /crapshit :-) 5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target to remove both the debug and normal kernel. 6. Modify all to install the stripped kernel by default and the debug kernel if you enter "make install.debug". 7. Update version number of Makefiles and config.
* Eliminate compiler warning when compiling "config.c" in a kernel.archie1998-12-101-2/+2
|
* Add (mostly stub) alpha support. Incidentally, it doesn't build on stabledfr1998-06-091-1/+8
| | | | unless I manually construct y.tab.h. Is this normal?
* Support PC-98 machine.kato1998-05-021-1/+2
|
* Don't generate code with syntax errors (hard newlines in string constantsbde1998-04-231-5/+5
| | | | in config.c).
* Add message when using obsolete command line option.eivind1998-03-161-1/+3
| | | | Suggested by: joerg
* Re-introduce '-n' - now a no-op for backwards compatibility only.eivind1998-02-191-2/+5
| | | | Requested by: David Quattlebaum <sasdrq@unx.sas.com>
OpenPOWER on IntegriCloud