Commit Graph

170 Commits

Author SHA1 Message Date
martin
fcbf6c86a2 If we build several kernel (variants) within the same build directory, bad
things may happen in a parallel build - especially with rules like the
automatic size adjustment for SYMTAB_SPACE, see long standing failure of
evbarm on the build cluster.
Easy fix: .WAIT for each config to complete, before going on with the
next. Low impact, only minor loss of paralellism, and only in cases where
needed.
2012-06-08 08:56:45 +00:00
matt
d34c2845b8 Use C89 function definitions 2012-03-20 20:34:57 +00:00
dholland
471d829aae Remove the NV_OBSOLETE flag, which is no longer needed. While here,
update an outdated comment about condition expressions.
2012-03-12 03:04:56 +00:00
dholland
cb79ede2d1 Give option definitions their own data structure instead of using nvlists.
(and using messy hacks to make up for nvlists not holding quite the right
things)
2012-03-12 02:58:55 +00:00
dholland
a883398ef5 Introduce type-safe wrappers around the hash tables. Use them for a
selected set of tables affected by the next nvlist cleanup in the
works.
2012-03-12 00:20:30 +00:00
dholland
f5d4142b2d Move locator lists to their own data structure. This can use more tidying;
it is not clear to me at the moment what the "string" and "num" values
pushed around in locator lists are supposed to actually mean.
2012-03-11 21:16:07 +00:00
dholland
25c56bd707 Add some organizational comments 2012-03-11 20:02:55 +00:00
dholland
237116305d More naming improvements. 2012-03-11 19:27:26 +00:00
dholland
a551c5e8b7 Create a struct condexpr type to hold condition expressions, instead
of abusing struct nvlist to make trees.

(These are the a|b and a&b constructs.)
2012-03-11 08:21:53 +00:00
dholland
4fbb702df0 Rename a few more things; try to use the same terminology as config(5). 2012-03-11 07:46:47 +00:00
dholland
bbe96a5ad8 Create a new type struct attrlist to manage lists of attributes,
instead of using struct nvlist.

(struct nvlist holds lists (or trees!) of semi-arbitrary stuff with no
structure and almost no type safety; it should go away.)
2012-03-11 07:32:41 +00:00
dholland
720c7fbc2a Strengthen the logic that wraps allocations going on the parser stack.
(This allows cleaning up when a syntax error occurs, because yacc just
dumps the parser stack on the floor.)

The new logic can handle arbitrary data types instead of being limited
to struct nvlist.
2012-03-11 07:27:02 +00:00
dholland
285c15fc92 Remove cf_swap, which hasn't been used in a long time. 2012-03-11 05:31:37 +00:00
dholland
cfffb8a2c1 Write out the expression grammar for dependency constraints instead of
using precedence rules. Precedence rules (besides being a hack) often
lead to unexpected/unwanted behavior in corner cases.
2012-03-11 02:56:25 +00:00
dholland
6df4c5ae47 Sort productions in grammar. No functional change. 2012-03-11 02:43:33 +00:00
dholland
70f2148fe7 Simplify some things. Rename some productions for clarity. 2012-03-11 02:21:04 +00:00
dholland
60c605bb74 A bit more of previous. 2012-03-11 01:09:42 +00:00
dholland
540fdf9f5e Reformat according to (my) basic standards for yacc grammars.
No functional change.
2012-03-11 00:57:44 +00:00
dholland
f3063ae30c Comments. 2012-03-11 00:14:20 +00:00
dholland
671dbef5d6 Use __printflike. Build products unchanged. 2012-03-10 21:53:38 +00:00
matt
105471657d When making the symlink for machine -> arch/foo/include
also make foo -> arch/foo/include.  This allows one to include <foo/bar.h>
include <machine/bar.h> which can be handy.
2011-07-09 08:01:58 +00:00
nakayama
c09c2a7b34 Fix build on Solaris 10. 2011-03-03 14:53:01 +00:00
cube
3f1dd008b1 Emit compatible struct devsw_conv when version is older than 20100430. 2010-07-30 16:23:49 +00:00
pooka
00ed8a38a3 Prefer a real device for pseudoroot and only create a fake device
in the case we are attaching to a pure attribute.  Otherwise we
end up creating a fake device instance every time ...
2010-05-02 15:35:00 +00:00
pooka
145a3f9eec ignore mainbus in previous for now 2010-05-01 23:54:35 +00:00
pooka
194e1c80bc Support interface attributes as pseudoroots. This makes things like
"pseudo-root audiobus*" possible.
2010-05-01 22:17:58 +00:00
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
3718acd4b5 output __arraycount instead of homegrown macro 2010-04-15 12:35:57 +00:00
pooka
b7a2b071f9 Put cfdata* in a similar namespace with cfdriver** cfattachinit*.
This was nagging me already yesterday, but I decided to leave it
alone for better compat with old ioconf.c builds.  But as it turns
out, new code depends on newly built ioconf.c with a new config(1)
anyway, so renaming is not an issue (at least not at this stage).

While renaming, namespace cfdriver and cfattach in "ioconf" rather
than "comp", since the former reflects the config(5) keyword.
2010-03-26 15:51:17 +00:00
pooka
abc34bd561 Generate cfdriver and cfattach lists for ioconf configs. 2010-03-25 19:39:05 +00:00
pooka
d0e5d93744 Some drivers want to include ioconf.h, so generate it if doing
"ioconf" config.
2010-03-22 14:40:54 +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
e6e6744f43 reflect previous change in comment 2010-03-03 13:56:29 +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
7547791dd3 Fix off-by-one (config -x works again) and improve editing artifacts
(actually the whole "config -x must be used alone" change was made
unnecessary along the way.  cest la vie).
2010-02-13 22:57:03 +00:00
pooka
ec78f798c7 ... aaand make the emit-order slightly more sensible for ioconf.c to
actually work again.
2010-02-03 21:32:27 +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
pooka
830034140c Add static to packdevi() like the local prototype says. 2010-01-21 18:06:38 +00:00
christos
c2261f6766 don't '#define yywrap() 1', use '%option noyywrap'. This is because the
#define is doomed to failure if --prefix is used.
2009-10-28 02:42:20 +00:00
wiz
a7c1bdeb22 New sentence, new line. 2009-08-31 07:45:24 +00:00
cube
9a23b0e1a5 .Sx to refer to a section, and add one ref to the lint stuff for clarity. 2009-08-31 03:39:00 +00:00
cube
323b339462 For {pseudo-,}devices, check if an instance of the pseudo or the considered
attachment of the device has already been done by the template config file.
If so, don't emit a line.  Reported by John Nemeth.
2009-08-30 21:07:41 +00:00
cube
d502f7a8c0 Dependency on config_time.src was removed today from Makefile.kern.inc, so
starting from that date it's not necessary to create it.  (Of course that
won't happen until config version is bumped for some other reason.)
2009-05-13 18:54:34 +00:00
wiz
a44b9acd01 Use Sx. Remove superfluous .Pp. 2009-05-04 21:11:53 +00:00
lukem
5cc303e13d Fix WARNS=4 issues (-Wcast-qual -Wsign-compare -Wshadow) 2009-04-11 12:41:10 +00:00
joerg
833d1509e8 .sp -> .Pp 2009-03-24 00:14:01 +00:00
cube
1894a7d27b Now that condmkopttab isn't a hash table anymore, don't initialise it with
ht_new()...  So actually rename it to condmkoptions to avoid confusion.

Reported build failure on amd64 (strange that I wouldn't get it on i386) on
current-users by Kurt Schreiner.
2009-03-13 20:44:59 +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
cube
723938ea23 Bump date. 2009-02-20 05:26:51 +00:00