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.
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
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.
- 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.
round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
preprocessors complain bitterly when they are encountered.
For now, terminate all lines with \n (and make each line its own
string literal). The author of this code can figure out how to
do the sed trick another way.
restore the previous behaviour of packing locators.
Results in a 2.5KB increase in size for the current i386 GENERIC
kernel. My custom kernel resulted in a 12-byte increase.
a `machine' line. For each of these subarches, its
arch/${SUBARCH}/conf/files.${SUBARCH} is included, and
a symlink ${SUBARCH} -> arch/${SUBARCH}/include is made.
This will for a "richer structure" and easier code
sharing under sys/arch.
have a way to embed the revision number into the kernel's "uname -v"
output. The patch below does this, by generating a new keyword "ident"
that can be followed by any string, e.g.
ident "NOON-$Revision$"
will lead to
vvvvvvvvvvvvvvvvvvvvvv
char version[] = "NetBSD 1.4P (NOON-$Revision: 1.21 $) #37: Thu Jan
20 02:01:23 MET 2000\n feyrer@noon:/usr/cvs.local/src-current/sys/arch/i386/c
ompile/NOON\n";
This will lead to a version of "MYMACHINE-$Revision$" instead of the
kernel config file name. If "ident" is not present, the current behaviour
of using the kernel config file's name as identifier is used.
Implement by writing the ident to a file ("ident") in the compile dir,
which newvers.sh will pick up for generating the ident.
to file specifications. The prefixes are arranged in a stack, and
nest, so that file, object, and include specifications are normalized,
and all end up relative to the kernel compile directory.
For example, in the kernel config file:
# Pull in config fragments for kernel crypto
prefix ../crypto-us/sys # push it
cinclude "conf/files.crypto-us" # include it if it's there
prefix # pop it
and in files.crypto-us:
file netinet6/esp_core.c ipsec & ipsec_esp
file netinet6/esp_output.c ipsec & ipsec_esp
file netinet6/esp_input.c ipsec & ipsec_esp
...generates the following in the kernel Makefile:
$S/../crypto-us/sys/netinet6/esp_core.c \
$S/../crypto-us/sys/netinet6/esp_output.c \
$S/../crypto-us/sys/netinet6/esp_input.c \
By placing this all in the kernel config file, all the magic involved in
reaching into non-standard kernel source directories is placed into a file
that the user is expected to edit anyway, and reasonable examples (and
sane defaults, for typical source checkouts) can be provided.
is declared at most once.
* Do option dependency across all def{opt,param, flag}.
* Make the default value of otherwise-unspecified defopt's be 1,
for consistency with non-defopt'ed options.
* Wrap an abstraction layer (macros) around tests for defopt, filesystem,
defparam, etc. to catch outdated defopt-vs-filesystem tests.
* machinery for nonfatal warnings.
* new backend config-file keywords:
defparam -- like defopt, but each defparam option is required
to have a value when configured via "options".
defflag -- like defopt, but defflag options may not have a value.
Also, on "option FOO", a needs-count style flag
(NFOO, either 0 or 1) is emitted to the .h file.
* Warn about old-style options that aren't defined via def{opt,param,flag}
and which are added to IDENT. (These behave subtly differently
to defopt options when no explicit value is given.)