Commit Graph

24 Commits

Author SHA1 Message Date
pooka 3da3ab250b For the simple cases, augment device-major with information on how
a driver expects /dev/node -> minor mappings to go and include that
information in devsw_conv.
(no, I didn't plow through all the MD majors files)
2010-04-30 20:47:17 +00:00
pooka 523c21179c print ioconf WARNING in caps too 2010-03-08 11:12:32 +00:00
pooka 90ac64de16 Add a highly experimental pseudo-root feature to be used in conjuction
with the also-experimental ioconf keyword.  pseudo-root allows to
specify a root at any point in the device tree without having
attachments from the actual root.

For example, instead of having a config file like this:
mainbus0 at root
bus_a? at mainbus0
bus_b? at bus_a*
device7 at bus_b?

You can have one like this:
pseudo-root bus_b*
device7 at bus_b?

This will produce the relevant ioconf.c glue for device number 7
only instead of the whole 9 yards from root.  Perhaps needless to
say, this can be used to generate snippets of config glue for
modules and, let's not deny that my main motivation for doing this,
rump components.

This is part 2/3 of my modifications to config (the last part is
autogenerating source file lists and component Makefiles).

No strong objection from cube (after a little pressuring ;), but
like he said, the implementation will most likely need some more
tweaking and may not work correctly under all pseudo-root uses yet.
2010-03-08 10:19:14 +00:00
pooka c96070654c Remove fs_foo.h support from deffs now that nothing uses it. 2010-03-03 13:53:22 +00:00
pooka e239742f9b Introduce experimental support for ioconf-only configuration files.
This is done by giving the "ioconf" keyword in the config file.
As a result, config produces only ioconf.c and locators.h.  Currently,
only "monolithic" configurations with the device path starting from
root are supported.  Eventually, the goal is to support a local
root in the input file from any point along the device tree using
files.* in our kernel tree.  This will make autogenerating the
config glue for device modules possible instead of having to write
it by hand like is currently required (yes, it sounds simple to
implement, but ...).

reviewed by cube.
(the next part will demand major discussions with you, so prepare ;)
2010-02-03 21:00:49 +00:00
cube a16a636500 Actually allow a full expression for the condition for "makeoptions" in
files.*

Patch from Yorick Hardy.
2009-03-13 18:24:41 +00:00
christos 0001b92828 rename nv_int -> nv_num and make it long long, so that dev_t will fit when
we change it.
2008-12-28 01:23:46 +00:00
drochner b66156c7c9 Disable use of pseudo-devices defined "defpseudo" with interface
attributes, but provide compatibility for older source trees (according
to the "version" in conf/files and other files.*.
reviewed by cube
2008-06-10 18:11:31 +00:00
drochner 8456b350de Seperate pseudo-devs which don't use device_t et al. (the classical
ones, mostly network pseudo interfaces) and those which use autoconf
to attach instances dynamically, or to attach child devices.
Use a new keyword "defpseudodev" for the latter.
Issue a warning if interface attributes are used with "old" pseudodevs,
but let it work as before for now. This will be removed soon.
approved by cube
2008-06-10 12:35:32 +00:00
cube 66a59dcc4f Don't defattr machinearch if it's NULL. Pointed out by
Juergen Hannken-Illjes.
2007-11-11 17:35:27 +00:00
cube 66796c65e4 Make the "machine" statement define attributes for `machine', `arch' and
all the `subarch' given as parameters.  This is useful in combination with
ifdef...
2007-11-10 00:15:43 +00:00
christos c7295a4c51 - rename {x,}error -> cfg{x,}error and {x,}warn -> cfg{x,}warn so that we
can use err(3) and warn(3) to display errors instead of using inconsistent
  fprintf's.
- remove emalloc/estrdup etc. We have them in libutil.
2007-01-13 23:47:36 +00:00
cube 718ffd7615 Handle defopt lists properly, as ':=' syntax introduce an additional
element...  For that, introduce nvcat(nv1, nv2).
2007-01-12 21:49:51 +00:00
cube 904262675b Add new syntaxic sugar to provide a value in lint (i.e., config -L)
configurations for defparams.  It will be used _only_ by config -L.

This will greatly help automating tests with lint configurations,
hopefully.
2007-01-09 13:03:47 +00:00
dsl 6467d53e48 Add support for specifying a default value on a 'defparam' line.
If a default is specified then the option is always defined in the
corresponding .h file.
Particularly useful for parameters where the default action isn't the
same a defining the value zero, given that the current use of #if defined(opt)
is open to problems wehere the relevant .h file isn't actually included, so
requiring an option to always have a value makes sense.
Also included (but commented out) is code that adds a global symbol to
the object file to stop objects compiled with different values for the
same option being linked together - I'm not quite happy with it yet!
2006-09-04 06:45:14 +00:00
matt 4a82747a8f Allow deffs to take dependencies like defflag and defopt 2006-08-30 10:12:25 +00:00
christos d0fb89015b Now that this is part of tools, we don't need the extra build glue. 2006-08-26 18:17:13 +00:00
cube 87ab9060e2 D'uh. Forgot the file name argument in the "obsolete" statements. 2006-06-04 13:07:24 +00:00
cube ac24e16176 Introduce two new statements:
obsolete defflag <option> [, <option> [, ...]]
    obsolete defparam <option> [, <option> [, ...]]

The two statements actually do the same thing (there could be only one),
but it makes things less cryptic that way.  The optional ": deps" part of
a 'defflag' or 'defparam' still has to be dropped when it gets obsoleted.

When the user has 'options OBSOLETE_OPTION' in his configuration file, it
is ignored (that is, opt_*.h files are generated as if it wasn't there),
and the user gets a warning about it.

Bump version to 20060525.

When someone first uses that syntax in the tree, a "version 20060525"
statement should be added before its occurrence, preferably at the top
of sys/conf/files.

Suggested by Matt Thomas a few months ago.
2006-05-25 22:28:38 +00:00
cube 42b52b8a61 Add 'no config <name>'. 2006-02-11 20:15:53 +00:00
cube 437f8925a6 Introduce versioning to config(1). This will allow us to provide a way to
error out in a bit more friendly way when the user is trying to use
config(1) on a too old or too recent source tree.

To achieve that, introduce the "version NUMBER" statement which can be use
about anywhere in the config files.  Also, use two defines, CONFIG_VERSION
(which is the actual version of binary), and CONFIG_MINVERSION, which is
the minimum version the binary supports.

Allowing a range of versions serves several purposes:  first it allows me
to introduce the versioning without requiring it to be used right away in
the kernel tree, which means it will be possible to introduce new features
of config(1) rather progressively in the future.  E.g., using 'no pci' in
a config file could only require the new version in that config file, so
that the rest remains compatible.

In the end, an actual bump of the main config system (i.e., in conf/files)
will only be required when e.g., ioconf.c semantics change.

(Mostly-)silently accepted on tech-kern.  Error messages turned into
correct and meaningful English thanks to Tracy and Perry.
2005-10-12 01:17:43 +00:00
cube 7b7c582a4f Introduce two new statements:
no device at <attachment>

     <attachment> can take two forms:  either numbered/wildcarded, in which
     case only exactly matching instances will be removed, or plain (with
     no number or wildcard), in which case all matching instances will be
     removed.

     When <attachment> is a plain interface attribute, all instances using
     that attribute (either directly or through an explicit device) will be
     removed.

     E.g.:
             auich* at pci? dev ? function ?
             audio0 at audiobus?
             audio1 at auich?
             audio* at auich0

             no device at auich0     -> removes audio*
             no device at auich?     -> removes audio1
             no device at auich      -> removes audio1 _and_ audio*
             no device at audiobus?  -> removes audio0
             no device at audiobus   -> removes audio0, audio1 and audio*

  no <device>

     As in the previous case, <device> can either be numbered/starred, in
     which case all exactly matching instances are removed, or plain, in
     which case all instances of the device are removed.

    E.g.: (continuing previous example)

             no audio* -> removes 'audio* at auich0'
             no audio  -> removes all audio instances
2005-09-30 22:51:46 +00:00
martin 6fd5c01546 Move package/cinclude/include handling from the parser to the scanner,
where it belongs. This has the side effect of fixing PR toolchain/30903.
2005-09-10 15:38:46 +00:00
thorpej 5ecc953bdb config and genassym are not sysadmin tools, they are development tools.
As such, they don't belong in /usr/sbin, but rather /usr/bin.  Move them
there.
2005-06-05 18:19:52 +00:00