Commit Graph

148 Commits

Author SHA1 Message Date
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
cube
083c47ad52 Remove mentions that a kernel configuration file must support at least one
file-system because it's no longer true.
2009-02-20 05:22:59 +00:00
cube
46251c8d6e Ignore line starting with # in Makefile.${arch}. It might be valid make(1)
syntax to have a line that starts with # that is not comment, but well,
let's just say it's not valid syntax for Makefile.${arch}.

Breakage on a couple archs reported by he@.
2009-02-20 05:20:25 +00:00
enami
2c8977b0b4 Fix compiler warning. 2009-02-15 03:45:44 +00:00
cube
016c56ea2f - Allow substition of options values in the generated Makefile using the
syntax %OPTION%.
- Make it possible to specify a syntax version information in the Makefile.
- Bump version to 20090214.
2009-02-15 01:39:54 +00:00
cube
0367057be6 Error out if one f the mkxxx() prints an error. 2009-02-14 21:28:58 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
uebayasi
547b81ca4c Better whitespace in ioconf.c output. 2009-01-16 09:43: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
martin
9cd0cde30f bump version due to recent rootfs changes 2008-12-21 11:39:56 +00:00
pgoyette
9c68331911 Store config(1)'s root filesystem type as a text string rather than
embedding the address of its xxx_mountroot() in swapnetbsd.c.  This
permits booting of kernels with hard-wired filesystem type even if the
filesystem is in a loadable module (ie, not linked into the kernel
image).

Discussed on current-users.  Tested on amd64 and i386 with both hard-
wired and '?' filesystem times, and on both modular and monolithic
kernels.

Thanks to pooka@ for code review and suggestions.

Addresses my PR kern/40167
2008-12-19 17:11:57 +00:00
ad
eb1a865124 Don't complain about a missing 'file-system' directive. File system code
can be provided by modules.
2008-10-20 11:02:18 +00:00
dholland
3b398d5c25 Adjust previous; apb@ points out that _PATH_TMP is provided by compat_defs.h;
thus, this shouldn't need a paranoid fallback definition.
And, use _PATH_TMP also in the second place that was using a hardwired "/tmp".
2008-10-16 05:41:13 +00:00
dholland
36c1b19ba1 Fix ridiculously small filename buffer for temporary file and resulting
truncation if $TMPDIR is set; also, fix an error path to not leave the
temporary file behind. From Gao Ya'nan in PR 39746.
While here, use _PATH_TMP instead of a hardwired "/tmp".
2008-10-16 05:35:01 +00:00
dholland
3251535c47 Avoid memory leak in error case. From Gao Ya'nan in PR bin/39721. 2008-10-09 07:18:15 +00:00
cube
baebbcf71a Bump CONFIG_VERSION after the previous fix to main.c. 2008-08-30 02:59:55 +00:00
cube
8e3d873278 In find_declared_option, use the correct hash for file-systems. That way,
information about dependencies are actually processed.
2008-08-30 02:57:42 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
kent
ecafa994fb * emitrules()
- code cleanup
 - support for extensions of which length is not 1
2008-07-16 11:45:56 +00:00
cube
7490b3179c It actually makes no sense to warn on a behaviour that was allowed in
previous versions, when we know we're working on an old file.  That way,
a -current config(1) works on a 4.0 source tree (or older) without
warning.  Pointed out by Christos Zoulas.

XXX We should set up way to note compatibility code we can get rid of
XXX the day we choose to bump CONFIG_MINVERSION.
2008-07-07 16:10:27 +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
cube
53faa53d5a Do proper config(5) version checking after previous changes [hi drochner!].
The rule is, if you change scan.l or gram.y, you bump the config(5)
version.  If you implement the changes under sys/conf/files or affiliate,
you bump the required version in sys/conf/files or in an appropriate place
to minimise annoyance.  If the changes makes new config(1) incompatible
with a previous version of config(5), embed it in config(1) using the
CONFIG_MINVERSION definition along with CONFIG_VERSION.

This has been in the tree for what, 3 years now?  It's even documented...
2008-06-10 14:03:57 +00:00
wiz
3c60159914 Bump date for previous. 2008-06-10 12:56:33 +00:00