Flag and param are to change contents of attributes (modules). These don't
have code (*.[coS]).
Filesystem definition still defines an attribute (module) implicitly.
config(1) still keeps backward-compatibility; it is more permissive than
before. The tree, however, needs the updated config(1), mainly to strictly
define attribute ("module") ownership and dependencies.
object files. Disabled for now. Commit this for further experiments.
Kernel (netbsd) has been built as:
netbsd: *.o
ld -o netbsd *.o
Change this to:
netbsd: *.ko
ld -o netbsd *.ko
acpica.ko: ${OBJS.acpica}
ld -r acpica.ko ${OBJS.acpica}
:
You can call *.ko as a module, but this is not only beneficial for loadable
module, but also localize related text/data. Various options/flags/params
will be able to be per-ko. Unnecessary symbols can be hidden. Many ideas
will follow.
specified expression is an attribute, mark the file as belonging to the
attribute.
At this moment this information is not used for any purpose, but can be
traced by config -ddd.
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
option.
Allows one to win with declarations like:
no options MSGBUFSIZE
options MSGBUFSIZE="128*1024"
Briefly discussed with cube@, lukem@ and martin@.
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.
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.)
(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.
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.
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.
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 ;)
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.
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@.
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.
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
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".
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.
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...
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
that uses each configuration parameter.
This will stop kernel objects build with different options (that come from
config files) being linked together or loaded as a LKM.
Currently some options that have an effect on the kernel DDI/KI are passed
directly as parameters to cc.
An aim (for anyone adequately bored) would be to reduce the number of these
constants that appear in each .o file. .o files with the same constants
should be sharable between kernels (even between XEN and i386).
configuration file (although it is meant to be used mostly with
std.${ARCH}), and prints out a configuration file that includes it and
select every single option and parameter, and define an instance for every
single possible attachment. IOW, selects everything, into a would-be
"LINT" config.
The resulting config really isn't meant to be runnable, but should be
somewhat buildable on most archs. It still needs adjustments because some
options are peculiar (e.g., ACPI_DSDT_FILE wants an existing file as its
value), so it's not yet possible to do "config -L; config; build" in an
automated way.
- Move documentation for "package", because as I learned tonight, it's not
allowed before setmachine. You get to discover scary new stuff about
config(1) each time you look at it.
It caused config(1) to crash on the following assert() if the list was used.
This bug shows up after the recent change in files.c which fixed a memory leak.
pointed out by dogcow@
reviewed by cube@
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
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!
does is cause confusion when I try to add default values for defparam.
Also if malloc()/free() aren't efficient enough for us, we ought to fix
them rather than having local free list - so kill the local free lists.
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.