a simple print statement showing the build directory location after
running config and creating a usage() function instead of using the
goto usage statement. Approved by christos@ and thanks to Tor for
the suggestions and patch.
the kernel is missing the newline at the end of the file, the string
doesn't get closed properly, resulting in a message from the compiler
about a missing #endif. It's somewhat misleading, so config will now
point it out and compensate for the missing newline.
Addresses PR kern/21920: including kernel config fails in some cases.
with either "options INCLUDE_CONFIG_FILE" or "options INCLUDE_JUST_CONFIG".
The program can now be invoked like:
- config -b objdir -s srcdir /netbsd
This will use configuration data from /netbsd to automatically create the
build directory of the new kernel.
- config -x /netbsd > CONFFILE
This will store configuration data from /netbsd in the CONFFILE file for
further editing.
such pseudo-devices, create cfdrivers for them which carry the appropriate
attributes. This allows devices in the config file to be attached to
pseudo-devices.
for config_time.h) that contains, for example:
/* Sun Nov 17 05:37:51 2002 GMT */
#define CONFIG_TIME 1037511471
#define CONFIG_YEAR 2002
#define CONFIG_MONTH 11
#define CONFIG_DATE 17
#define CONFIG_HOUR 5
#define CONFIG_MINS 37
#define CONFIG_SECS 51
These values represent the current time as of when config was last
run, so that functions (eg, inittodr()) can use these values instead
of being updated once every year or so with the "current" time.
The associated modification to Makefile.kern.inc makes config_time.h
depend on this depend on this and the kernel Makefile, so that
granularity of kernel builds is not reduced.
means that the appropriate combination of checking for KERNEL_BUILD,
RELEASEDIR, DESTDIR, and/or BSD_PKG_MK, can allow the setting of COPTS
or CFLAGS (or anything else) depending on the specific task at hand.
Personally, I think that per-kernel install rules are the best part.
party software packages to the kernel. The statment:
package "../path/to/some/directory/files.package"
is equivalent to the sequence:
prefix "../path/to/some/directory"
include "files.package"
prefix
allowing for the following:
file foo.c foobar | bar
defflag BAR
device foobar
...to be expressed in the following (more natural) way:
define foo
file foo.c foo
defflag BAR: foo
device foobar: foo
allows for the following:
define foo
define bar { }: foo
device foobar: bar
An instance of "foobar" will select "bar", which will in turn select
"foo" due to "bar"'s dependency on "foo".
Circular dependencies are not allowed, and a dependency may also not
be an interface attribute.
now carries the name of the attachment (e.g. "tlp_pci" or "audio"),
and cfattach structures are registered at boot time on a per-driver
basis. The cfdriver and cfattach pointers are cached in the device
structure when attached.
a vector of indices into the cfdata table to specify potential parents,
record the interface attributes that devices have and add a new "parent
spec" structure which lists the iattr, as well as optionally listing
specific parent device instances.
See:
http://mail-index.netbsd.org/tech-kern/2002/09/25/0014.html
...for a detailed description.
While here, const poison some things, as suggested by Matt Thomas.
This merge changes the device switch tables from static array to
dynamically generated by config(8).
- All device switches is defined as a constant structure in device drivers.
- The new grammer ``device-major'' is introduced to ``files''.
device-major <prefix> char <num> [block <num>] [<rules>]
- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.
- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.
- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.
- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.
- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
filenames had to be unquoted and also had to contain a / or .,
while others had to have no / and no . or be quoted, whereas
arbitrary machine symbols could always be optionally quoted,
which was kind of backwards.
Now, all filesnames use the same rules: quoted, or with a / or .
Arbitrary words can no longer be quoted unless the grammar specifically
allows it, which it now does for filenames, locator values, locator
defaults, compile-with, ident, makeoptions, and options.
Also, locator name symbols can be quoted, so mac68k's "no drq" locator
still works. ("no drq" doesn't appear in any machine description so I
presume it's just for the dmesg. )
- Add `no' keyword, which can be used in the following ways:
no file-system SOMEFS
no makeoptions FOO
no options OPT1[,OPT2[,...]]
no pseudo-device somepseudo
This turns off a previous file-system/makeoptions/options/pseudo-device
entry for the same item.
Grammar support for 'no device DEV at ATTACH' added, but not
implemented yet.
Code changes:
- Convert many simple lists to TAILQs
- Convert prefix to SLIST
- Remove argument names from prototypes.
- Don't bother with custom alloc code for hashtables; just use emalloc()
like everything else.
- Implement ht_remove(), to remove an entry from a hash table.
Add removed entries to a freelist for later reuse.
- Don't selectbase() devices and pseudo-devices at definition time; instead
do it at one pass after the config file has been parsed in fixdevis().
- Rename nvhead to nvfreelist; a more apt name...
- Minor code cleanups.
swap*.c files if they haven't changed from the last time config was
run, so that less stuff will need to be rebuilt (ie, assym.h, upon
which many other things depend) each time config is rerun.