#
352280 |
|
13-Sep-2019 |
bapt |
MFC r352119-r352124, r352130
Stop linking to libl by specifying we do not need yywrap
|
#
337333 |
|
04-Aug-2018 |
kevans |
kenv MFC: r335998, r336019, r336026, r336036, r336217, r336335, r336337, r336415-r336416, r336419
As an aside- this has been slightly altered from the version in head to keep the MD and config-static environments mutually exclusive by default.
This difference is a one-line change in init_static_kenv to setup the MD environment if the config-static environment is empty or if loader_env.disabled is explicitly set to 0.
r335998: kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static hints or static env have been provided in the kernel config(5) and the static versions are mutually exclusive with loader(8)-provided environment. hintmode *can* be reconfigured later to pull from the dynamic environment, thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing state to a consistent state: if an environment file, hints file, or loader(8) environment are provided, we use them in a well-known order of precedence:
- loader(8) environment - static environment - static hints file
Once the dynamic environment is setup this becomes a moot point. The loader(8) and static environments are merged (respecting the above order of precedence), and the static hints are merged in on an as-needed basis after the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic environment is setup, lookups use the above-mentioned order and fallback to the next environment if a matching hint is not found. Once the dynamic environment is setup, that is used on its own since it captures all of the above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using the chain of environments (or dynamic environment) without relying on global state - All three environments will be searched if they actually have valid hints to use, rather than just choosing the first environment that actually had a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are still honored and will disable their respective environments from being used for hint lookups and from being merged into the dynamic environment, as expected.
r336019: config(8): De-dupe hint/env vars within a single file
r335653 flipped the order in which hints/env files are concatenated to match the order in which vars are processed by the kernel. This is the other hammer to drop.
Use nv(9) to de-dupe entries within a single `hint` or `env` file, using the latest value specified for a key. This leaves some duplicates if a variable is specified in multiple hint/env files or via `envvar` in a kernel config, but the reversed order of concatenation (from r335653) makes this a non-issue as the latest-specified version will be seen first.
This change also silently rewrote hint bits to use the same sanitization process that ian@ wrote for r335642. To the kernel, hints and env vars are basically the same thing through early boot, then get merged into the dynamic environment once kmem becomes available and the dynamic environment is created. They should be subjected to the same restrictions.
libnv has been added to -legacy for the time being to support the build of config(8) with the new cnvlist API.
r336026: config(8): Fix broken ABI
r336019 introduced ${SRCTOP}/sys to the include paths in order to pull in a new sys/{c,}nv.h. This is wrong, because the build tree's ABI isn't guaranteed to match what's running on the host system.
Fix instead by removing -I${SRCTOP}/sys and installing the libnv headers with `make -C lib/libnv includes`... this may or may not get re-worked in the future so that a userland lib isn't installing includes from sys/.
r336036: kern_environment: Fix SYSINIT ordering
The dynamic environment was being initialized at SI_SUB_KMEM, SI_ORDER_ANY. I added the hint-merging at SI_SUB_KMEM, SI_ORDER_ANY as well in r335998 - this can only work by coincidence.
Re-do both to operate at SI_SUB_KMEM + 1, SI_ORDER_FIRST and SI_ORDER_SECOND respectively to be safe. It's sufficiently obfuscated away as to when in SU_SUB_KMEM malloc will be available, and the dynamic environment cannot be relied upon there anyways since it's initialized at SI_ORDER_ANY.
r336217: kern_environment: Give the static environment a chance to disable MD env
This variable has been given the name "loader_env.disabled" as it's the primary way most people will have an MD environment. This restores the previously-default behavior of ignoring the loader(8) environment, which may be useful for vendor distributions or other scenarios where inheriting the loader environment may be considered a security issue or potentially breaking of a more locked-down environment.
As the change to config(5) indicates, disabling the loader environment should not be a choice made lightly since it may provide ACPI hints and other useful things that the system can rely on to boot.
An UPDATING entry has been added to mention an upgrade path for those that may have relied on the previous behavior.
r336335 by arichardson: No longer install sys/nv.h and sys/cnv.h in lib/libnv/Makefile
Use tools/build/Makefile to install the headers into ${WORLDTMP}/legacy instead. Compared to r336026 this has the minor advantage that it avoids unncessary header installation when building the non-bootstrap libnv.
r336337: Unconditionally build libnv in legacy
Rather than using a config(8) built from new tree linking libnv built on host.
r336415: config(8): Add compatibility shims for r335998
Plumb the %VERSREQ from Makefile.<arch> through to the rest of config(8). We've recorded the config(8) version that we're calling "the end of envmode and hintmode," and we'll write them out for earlier versions. Later kernel version bumps will remove envmode/hintmode from the kernel as needed, which is OK since the current kernel does not use them at all.
These compatibility shims really need to go away when the major version rolls over...
r336416: Fix GCC 4.2 build after r336415, proper declaration and prototype
r336419: config(8): Invert checks; envmode/hintmode reflect "env provided"
Relnotes: yes (maybe) [The loader environment may now be used with the config-static environment by specifying loader_env.disabled=0 in the config-static environment]
|
#
336938 |
|
30-Jul-2018 |
kevans |
MFC r307967,324082,325955: config(8) fixes
r307967: Allow config to be compiled from another source directory, such as one for building tools. This boils down to replacing ${.CURDIR} with ${SRCDIR}, where the latter is the directory in which this makefile lives.
Also allow overriding where file2c comes from using ${FILE2C}.
r324082: Typo in filename in comment.
r325955: Fix 'local' to not look in the source tree for the file.
Usually 'local' is used along with other rules such as 'no-implicit-rule' or 'dependency' which avoids this problem. It's possible to need to use 'local' while relying on the default rules though for a file which is not in the source tree nor generated in the kernel.
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
275054 |
|
25-Nov-2014 |
bapt |
Convert usr.sbin to LIBADD Reduce overlinking
|
#
249657 |
|
19-Apr-2013 |
ed |
Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables static or use an external declarations for the variable, similar to how -Wmissing-prototypes works for functions.
Due to the fact that Yacc/Lex generate code that cannot trivially be changed to not warn because of this (lots of yy* variables), add a NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this specific compiler warning.
Announced on: toolchain@
|
#
201390 |
|
02-Jan-2010 |
ed |
The last big commit: let usr.sbin/ use WARNS=6 by default.
|
#
172401 |
|
01-Oct-2007 |
ru |
Fixed "make checkdpadd" (missing library dependencies).
Approved by: re (kensmith)
|
#
169508 |
|
12-May-2007 |
wkoszek |
Add ${.CURDIR} before kernconf.tmpl in order to let the build see newly added kernconft.tmpl file.
Approved by: cognet (mentor)
|
#
169507 |
|
12-May-2007 |
wkoszek |
Improve INCLUDE_CONFIG_FILE support.
This change will let us to have full configuration of a running kernel available in sysctl:
sysctl -b kern.conftxt
The same configuration is also contained within the kernel image. It can be obtained with:
config -x <kernelfile>
Current functionality lets you to quickly recover kernel configuration, by simply redirecting output from commands presented above and starting kernel build procedure. "include" statements are also honored, which means options and devices from included files are also included.
Please note that comments from configuration files are not preserved by default. In order to preserve them, you can use -C flag for config(8). This will bring configuration file and included files literally; however, redirection to a file no longer works directly.
This commit was followed by discussion, that took place on freebsd-current@. For more details, look here:
http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html
Development of this patch took place in Perforce, hierarchy:
//depot/user/wkoszek/wkoszek_kconftxt/
Support from: freebsd-current@ (links above) Reviewed by: imp@ Approved by: imp@
|
#
153260 |
|
09-Dec-2005 |
ru |
config.5 was repocopied from share/man/man5/ to usr.sbin/config/.
Repocopied by: peter
|
#
129119 |
|
11-May-2004 |
cognet |
Fix a few glitches in my previous commit. This makes config(8) WARNS?=6 compliant.
|
#
116220 |
|
11-Jun-2003 |
obrien |
Best we can do is WARNS=1 due to lex.
|
#
116219 |
|
11-Jun-2003 |
obrien |
Do not refer to the non-existant BDECFLAGS.
|
#
80029 |
|
20-Jul-2001 |
obrien |
Perform a major cleanup of the usr.sbin Makefiles. These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
|
#
74816 |
|
26-Mar-2001 |
ru |
- Backout botched attempt to introduce MANSECT feature. - MAN[1-9] -> MAN.
|
#
74532 |
|
20-Mar-2001 |
ru |
Set the default manual section for usr.sbin/ to 8.
|
#
72684 |
|
19-Feb-2001 |
peter |
${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS" string could have been passed to free(); There are some warnings here I am not sure how to fix as they are in the lex scanner code, etc.
|
#
61640 |
|
13-Jun-2000 |
peter |
Borrow phk's axe and apply the next stage of config(8)'s evolution.
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
|
#
52098 |
|
10-Oct-1999 |
peter |
Further cleanup. Also remove the following unused or defunct tokens: and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
|
#
50479 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
46821 |
|
09-May-1999 |
peter |
Put on my viking helmet from the closet, and get out the war axe and "retire" some more stuff.
|
#
45775 |
|
18-Apr-1999 |
peter |
Further cleanups. i386_ioconf.c and alpha_ioconf.c were essentially the same and were merged into a single newbus_ioconf.c. CG'd some more unused code.
|
#
45744 |
|
17-Apr-1999 |
peter |
Get out the blow torch and hack away all the unused stuff. Note that 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.
|
#
45660 |
|
13-Apr-1999 |
peter |
Clean up the -g/DEBUG handling. This logic can go in the Makefile so that config -g can work the same as: makeoptions DEBUG="-g"
|
#
35782 |
|
06-May-1998 |
bde |
Backed out previous backout. Put y.tab.h back in SRCS.
|
#
35737 |
|
05-May-1998 |
bde |
Backed out previous commit. It was tested, but not for the case where a separate object tree doesn't exist. Crufty makefiles will have to put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
|
#
35708 |
|
04-May-1998 |
bde |
Fixed races in `make -jN' using new yacc rules.
|
#
34134 |
|
06-Mar-1998 |
bde |
Fixed `make -jN' for large N, as usual.
|
#
33598 |
|
18-Feb-1998 |
eivind |
Style police service brought to you by: bde
|
#
30639 |
|
21-Oct-1997 |
peter |
For safety's sake, explicitly depend all objects on the configvers.h header to make sure that it's all recompiled even if there is no 'make depend'. This is overkill, but should be one less thing that someone can do wrong.
|
#
29198 |
|
07-Sep-1997 |
bde |
Oops, the previous commit shouldn't have touch the Makefile.
|
#
29193 |
|
07-Sep-1997 |
bde |
Don't say that swapping is configured by config.
|
#
16073 |
|
02-Jun-1996 |
phk |
Backout yacc changes.
|
#
16023 |
|
30-May-1996 |
phk |
yacc rule changes.
|
#
12772 |
|
11-Dec-1995 |
peter |
Implement support for conf/options and i386/conf/options.i386 Note that this code is dormant unless the options files exist. Also, parsing of quoted options in the config files is improved.
What this allows, is all the options in LINT to be specified to be configured as #defines in a file rather than on the CC command line at kernel build time. This means that 'make depend' will catch dependencies on actual *options*, meaning that you can run 'config' and 'make depend' in complete safety WITHOUT removing the compile directory each time.
Unfortunately, this requires a pass over the source to get the individual files to #include the new .h files that would be generated by config. This has a small compile time penalty (appears up to about 2% slower) from a "fresh" build. Of course, you should not be needing to do complete rebuilds very often once this was completed, so it would be an overall win for most people.
Since this code is dormant and we've got a lot of other things happening on the kernel tree at the moment (prototypes, devfs, static declarations etc) I am not planning on doing any changes to activate this feature just yet.
|
#
12508 |
|
28-Nov-1995 |
wollman |
If CONFIG_NO_CLOBBER_EVER is defined (e.g., in /etc/make.conf), don't make it possible for config to ever blow away a work directory. Default behavior remains broken.
|
#
11053 |
|
28-Sep-1995 |
bde |
Fix CLEANFILES. Some temporary files were missing.
|
#
6631 |
|
22-Feb-1995 |
jkh |
Make good on my promise to finally clean up the config clobbering. If you invoke config with the `-n' flag or have NO_CONFIG_CLOBBER in your environment, config will behave the same way it used to. This is now _documented_ as well. Rip out all the CONFIG_DONT_CLOBBER cruft; some of it wasn't even correct anyway.
|
#
4841 |
|
27-Nov-1994 |
bde |
Remove ifdef for STATCLOCK. STATCLOCK is standard.
|
#
2525 |
|
06-Sep-1994 |
wollman |
Revert back to old config behavior if compiled with -DCONFIG_DONT_CLOBBER.
|
#
2105 |
|
18-Aug-1994 |
dg |
Oops...forgot to list the changes....
/usr/src/usr.sbin.config: o -DSTATCLOCK gives kludges to support the rtc non-device as well as old kludges to support the clk non-device.
/usr/src/usr.sbin/config.8: o Document the trivialness of the new vector.h.
/usr/src/usr.sbin/mkglue.c: o Only print DEVICE_NAMES and NR_DEVICES in vector.h. These are only required to support vmstat. The vmstat interface will need to be improved for dynamic loading.
/usr/src/usr.sbin/mkioconf.c: o Print device ids to be used as indexes into DEVICE_NAMES. o Print secondary interrupt handler entry points (xxxintr()) instead of primary ones (VdevU()). Primary ones are now XintrI() and XfastintrI() and are independent of the config so they are not handled here. o Minor cleanups.
Submitted by: Bruce Evans
|
#
2104 |
|
18-Aug-1994 |
dg |
Support for Bruce Evans' new dynamic interrupt support.
Submitted by: Bruce Evans
|
#
1566 |
|
26-May-1994 |
rgrimes |
Upgrade config to be compatible with our i386 port, pull in 95% of the changes that have been made in FreeBSD 1.x, except for possibly the nfs diskless support this is a completed config.
|
#
1554 |
|
26-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1553, which included commits to RCS files with non-trunk default branches.
|
#
1553 |
|
26-May-1994 |
rgrimes |
BSD 4.4 Lite usr.sbin Sources
|