It doesn't actually do it yet though. This adds a flag to config so
that we can exclude certain vendor files from this even when the rest
of the kernel has it on. make -DNO_WERROR would also bypass all of it.
stealth hints loading. 'make release' has been fixed to not need this
now anyway. If you want static hints, specify it explicitly.
Hey! Why did it suddenly get so dark??
FreeBSD 3.x or so when the 'make depend' picked up the opt_foo.h files.
Convert warnings into actual errors in the hope that buildkernel users
will pay more attention. :-(
for your /usr/obj/path/to/my/files path to the kernel, then weird
things happened. make buildkernel would fail because config was
dumping core or generating bad file names (depending on the lenght of
the path).
While I was here, also use strlcpy, strlcat and snprintf (or asprintf)
as necessary. Minor format policing for the snprintf calls as well.
Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.
config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320
userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.
It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.
All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.
There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/
Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.
Please exercise EXTREME CAUTION when transitioning!
Moral support by: phk, msmith, dfr, asmodai, imp, and others
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.
This would mean that we could move files.alpha, files.i386, files.pc98
etc all next to conf/files, and the various Makefiles next to each
other. This should go a long way towards committers "seeing" the
Alpha etc stuff and remembering to update that too as it would be
right next to the i386 config files. Note this does not include
the GENERIC etc files as they can't be shared. I haven't actually
moved the files, but the support is here for it. It still supports
the per-machine conf directories so that folks working on a new arch
can just distribute a subdir of files.
files in a 'files.XXX' file, config allows non-FreeBSD source files
with the same name as a FreeBSD source file to override the latter,
and in this situation it issues a warning.
However, if one of the user-specified files is actually a FreeBSD
source file (perhaps your kernel has some custom option that requires
that file), config mistakenly thinks it's a completely new file
and goes ahead and overrides all previous information for that file
(and issues the warning).
Fix this.
With help from: julian
directory than the default one. If the option is not given, then the
output of config is exactly as before. Only when an alternate output
directory has been specified will config modify its behavior.
Additional changed:
o Remove the now conflicting and unused NODEV define. It
conflicts with NODEV in sys/param.h.
o Rename the now conflicting MACHINE token to ARCH. It
conflicts with MACHINE in sys/param.h.
o Fix some easy style bugs.
o Fix some easy grammar bugs in the manpage.
Approved by: peter, archie
- make this work: options FOO123=456 *without quotes*
- grumble (but accept) vector xxxintr, and tty/net/bio/cam flags.
- complain if a device is specified twice (eg: 2 x psm0)
- don't require quotes around: port IO_COM2
- recognize negative numbers. (ie: options CAM_DEBUG_UNIT=-1)
- GC some more unused stuff (we don't have composite disks from config(8)).
- various other nits (snprintf paranoia etc)
I zapped the MACHINE_MIPS stuff, it isn't likely to be useful apart from
recognition of the machine name. It would be reasonable to expect new
ports would look something like the alpha/i386 from a config perspective.
Requested-by: ache
bde
dg
Modify targets for debug kernels: when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time. The two targets install and
install.debug are otherwise unchanged.
Requested-by: dillon
Update man page accordingly.
2. Config complains if you use -g:
Debugging is enabled by default, there is no ned to specify the -g option
3. Config warns you if you don't use -s:
Building kernel with full debugging symbols. Do
"config -s BSD" for historic partial symbolic support.
To install the debugging kernel, do make install.debug
(BSD was the name of the config file I used; I print out the same
name).
4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
work if a kernel name other than 'kernel' is specified. This is
not absolutely necessary, but useful, and it was relatively easy.
I now have a kernel called /crapshit :-)
5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
to remove both the debug and normal kernel.
6. Modify all to install the stripped kernel by default and the debug
kernel if you enter "make install.debug".
7. Update version number of Makefiles and config.
define MAXUSERS in opt_param.h as directed in /sys/conf/options;
if it's not mentioned there, then define it in IDENT; never define
it in PARAM). MAXUSERS probably should be a completely normal option.
Don't define PARAM now that it is empty.
Cleaned up similar conversion of cpu directives to XXX_CPU options.
candidate for this is "npx0", more are likely to follow.
Check for pseudo-devices that are being configured, but don't appear
in any "files" file. The ``pseudo-device bpf 2'' already hit me too
often.
and the kernel will have a 'config interface version number'. If an
incompatable change is made to the kernel that requires a rebuild of
config(8) (such as the cam devtab stuff), then the version number would be
bumped in both places. If a user neglects to rebuild config, then they
will get a nagging (but non-fatal) warning that they need to rebuild
config.