Commit Graph

229 Commits

Author SHA1 Message Date
imp
a24ec299ea Add support for MODULES_OVERRIDE. This is a list of modules to build
instead of all of them.  You can put this in /etc/make.conf or in
makeoptions.

Reviewed by: arch@

# docs to follow.
2001-04-02 08:52:05 +00:00
obrien
99daa32404 Restore the careful preservation of .depend (rev 1.78 of Makefile.i386)
that I removed in my last commit dealing with `make depend' bogons.
This commit has some races, but hopefully they are too short to matter.
Unfortuneatly, neither .newdep nor .olddep is removed by `make clean'.

Submitted by:	bde
2001-03-24 08:44:28 +00:00
kris
b38db8f922 Use CPUTYPE to add appropriate compiler flags to COPTFLAGS for kernel
builds.  This may be disabled using the NO_CPU_COPTFLAGS variable.

Reviewed by:	arch
2001-03-12 07:47:09 +00:00
peter
3dba1d1543 Add a 'clobber' target.. Like 'clean' but it takes out even the config
generated stuff, leaving only 'version' in the build dir.
2001-02-27 08:13:32 +00:00
peter
eccd7b6a58 genassym.sh does not work with a.out because the sizes are rounded up
by the compiler.  ie: char foo[0] comes out as 4 bytes on a.out, and
we depended on it coming out as 0 for the script version. :-(

Make double sure that genassym.o is built and nm'ed in elf mode.

(ia64 skipped since it is stuck on the linux toolchain and doesn't
 understand the -elf switches)
2001-02-25 07:51:19 +00:00
marcel
ea2a4b55bc Revert gensetdefs.pl reversal. 2001-02-17 07:26:57 +00:00
obrien
8befe8802d Fix make depend' => make kernel-depend'. Using the dependancy file
when rebuilding it is just Wrong.
2001-02-12 05:55:33 +00:00
marcel
7d79d6d1ab Revert previous commit. I messed up my testing. 2001-01-28 21:24:05 +00:00
marcel
93f1d42808 Improve kernel bootstrapping:
o  Use objdump instead of gensetdefs(1) to build the linker sets.
o  Allow overriding of nm and objdump in resp. genassym.sh and
   gensetdefs.pl for non-native toolchains.

Reviewed by: arch
Perl improvements: Jos Backus <josb@cncdsl.com>, benno
2001-01-28 06:39:56 +00:00
jhb
ffbcfd67f3 Change the reinstall.debug target to depend on
{kernel,modules}-reinstall.debug rather than {kernel,modules}-reinstall.
Otherwise, the '.debug' portion of the target is lost, and you end up
reinstalling the non debug version instead of the debug version.
2001-01-19 19:43:45 +00:00
peter
18e1e35a25 Corresponding version bump for config with the DEV_FOO replacement for
the NFOO count option.
2001-01-19 12:50:16 +00:00
obrien
82a38e65b4 Back out the modules `make obj' speedup.
I cannot find a way to do this with the more esoteric source dir schemes
I thought of.
2000-12-24 13:29:58 +00:00
obrien
2d19e2b1b2 Use the canonical spelling for the path to sys. 2000-12-22 10:05:07 +00:00
obrien
f8004b2d22 Greatly speed up the module `depend' phase. 2000-12-21 20:01:27 +00:00
msmith
03b00161a7 Next-phase PCI system update; move PCI core code to sys/dev and update
header include path to include sys/dev to avoid massive #include updates.
2000-12-08 22:26:48 +00:00
peter
87f2317296 Make the xxxFILES= list generation generic. This makes it easier to add
things like MFILES= or CONFFILES= without having to modify config code.
2000-11-25 03:25:34 +00:00
obrien
eb7769fac6 Fix the `make -jX' (X>1) breakage.
Based on patch submitted by:	Makoto MATSUSHITA <matusita@jp.freebsd.org>
Reviewed by:	marcel, bde
2000-11-17 21:25:15 +00:00
phk
e96f5ed9b3 Add a hook for doing #include magic (for src/tools/tools/kerninclude). 2000-10-29 09:47:50 +00:00
msmith
de46dd5596 Connect the new ACPICA code to the 'acpica' device. 2000-10-28 07:03:39 +00:00
phk
362242ba16 Make it possible to specify profiling in the kernel config file.
Do so for LINT.
2000-10-14 08:33:22 +00:00
obrien
619341766f Blah rev 1.208 got bits of the proposed "I want the file /kernel to be
the kernel" patch.

This commit is only the "Do not prepend `DESTDIR' to `KMODDIR' as
sys/conf/kmod.mk already does that for us" change.
2000-10-03 20:09:51 +00:00
obrien
5e185d1bd4 Do not prepend DESTDIR' to KMODDIR' as sys/conf/kmod.mk already does
that for us.
2000-10-03 20:05:36 +00:00
obrien
c598149948 Install the kernel KLM as "kernel" by default. 2000-09-14 15:17:19 +00:00
obrien
47ffb8a090 Create an "expert" mode where the device hints are not checked during
installation.  This is need for the release build.
2000-09-07 05:50:07 +00:00
obrien
2359f15a4f Remove superfluous `/'s before KODIR.
Acceptability explained by:	rgrimes
2000-09-07 00:26:33 +00:00
obrien
7b071840d5 DESTDIR'ify the device.hints checking code. 2000-09-06 09:27:25 +00:00
obrien
89470e5786 I forgot the leading `DESTDIR' before the kernel directory. 2000-09-06 09:14:18 +00:00
obrien
6de7dfbb5a The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.
2000-09-05 22:37:46 +00:00
peter
05f5722996 If a ${KERNEL}.hints file exists, and no hints are specified explicitly,
then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.
2000-08-25 19:30:03 +00:00
peter
ba486c0c62 Add some anti-foot-shooting protection to the kernel install target.
Do not install a kernel unless a device.hints exists.  Yes, you can
create an empty hints file if you refuse to use them.
2000-08-25 19:16:43 +00:00
obrien
ea5b5bab77 * Create entire directory path for modules.
* Don't ignore error returns.
2000-08-03 09:06:53 +00:00
sheldonh
14d2d4059b Don't bitch when trying to create a ${DESTDIR}/modules which already
exists.
2000-08-03 08:24:42 +00:00
green
a92ef5a71e -mkdir the ${DESTDIR}/modules directory upon modules-install in case it
doesn't exist.  This could bite you by allowing you merrily install your
modules one on top of the other as the regular file ${DESTDIR}/modules
and think it completed properly...
2000-07-27 03:50:25 +00:00
peter
f7710446df Make the generated set headers depend on Makefile as well (that is where
the list of .o files comes from - if we change the list of files that
are built, we need to rescan the files)

Obtained from:	bde (indirectly)
2000-06-22 19:44:25 +00:00
obrien
72dbbe24eb Add back "NO_MODULES" as using ``make -DMODULES_WITH_WORLD'' in the
kernel build dir doesn't really say what your intentions are.
2000-06-17 10:56:15 +00:00
obrien
53eb2d3431 If "MODULES_WITH_WORLD" is defined, sys/modules will be built with the
world as was our old way, rather than when building a kernel.

Some people do not like the new way, and the release building still assumes
modules are built with the world.
2000-06-17 10:51:56 +00:00
brian
0bbfeb1258 Fix ``make installkernel'' 2000-06-16 08:01:17 +00:00
obrien
c7fd162d5a Only copy /modules to /modules.old if /modules exists and is populated.
Submitted by:	John DeBoskey <jwd@FreeBSD.org>
2000-06-15 15:57:33 +00:00
peter
647ef85d48 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
2000-06-13 22:28:50 +00:00
peter
f8f83dbe72 Use objcopy to strip the gcc2_compiled. symbol from kernels.
ld(1) doesn't seem to have the ability to delete an arbitary symbol.
2000-06-12 20:22:07 +00:00
peter
9fbe309bef A checkpoint of a part of a work-in-progress. Some more cleanups for
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.
2000-06-10 22:13:40 +00:00
bde
7fbccf3ef8 Use "nm | awk ..." instead of genassym(1) to generate symbol value headers.
Symbol values are now represented using array sizes (4 arrays per symbol
so that 16-bit machines can represent 64-bit values) instead of being raw
binary values.

Reviewed by:	marcel
2000-06-02 09:27:48 +00:00
obrien
d25477b7e7 MFA: Add {kernel,module}-{depend,clean,cleandepend,tags,install,reinstall}
targets.  The {depend,clean,cleandepend,tags,install,reinstall} targets
are composits of the {kernel,module}-* targets (based on NO_MODULES).
2000-05-27 21:50:15 +00:00
n_hibma
aae396953a Create a separate target for the 'modules'. Without this the modules
are only rebuilt if the kernel has changed as well.

While there make 'all' and 'modules' a PHONY target.
2000-05-09 10:39:38 +00:00
obrien
4d19687a3c Set MAKEOBJDIRPREFIX to modules/ in the current directory and build modules
there.
2000-05-04 21:12:28 +00:00
chuckr
5f34b128da Cause modules to build with the kernel build. Modules are removed
from the sys Makefile's SUBDIRs.  This is conditioned in make.conf by the
NO_MODULES variable and the existence of the modules directory.  The
actual location of the modules is not modified.  Changes in Makefiles
only, this does not affect Peter's recent changes.

Reviewed by:	Peter Wemm, who warned me I would get some flack, and
		he had the good idea for the NO_MODULES variable.
2000-05-02 02:26:04 +00:00
peter
1aa88f6889 LOAD_ADDRESS is not used here. See conf/ldscript.* for the link base
address.
2000-04-29 06:29:39 +00:00
dfr
c9bf4be3c2 * Factor out the object system from new-bus so that it can be used by
non-device code.
* Re-implement the method dispatch to improve efficiency. The new system
  takes about 40ns for a method dispatch on a 300Mhz PII which is only
  10ns slower than a direct function call on the same hardware.

This changes the new-bus ABI slightly so make sure you re-compile any
driver modules which you use.
2000-04-08 14:17:18 +00:00
dfr
c41aef9448 Make it possible to include a device interface description by a single
line in files or files.${arch} instead of 13 lines of code.

This is a small chance that this will break the alpha kernel build - I'll
fix it this evening if it does.
2000-04-05 10:33:55 +00:00
peter
1f6e099839 Include param.o in the list of files that we scan for linker sets.
Without this, we cannot put sysctl nodes in there.
2000-03-29 23:20:35 +00:00