Commit Graph

178 Commits

Author SHA1 Message Date
Warner Losh
581a68a232 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
David E. O'Brien
483cbcc1eb 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 Kennaway
5ca7924a91 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 Wemm
b1fe97412b 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 Wemm
29604605a7 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 Moolenaar
8e739d9fa0 Revert gensetdefs.pl reversal. 2001-02-17 07:26:57 +00:00
David E. O'Brien
f1a87e83ee 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 Moolenaar
8e8cae2b0c Revert previous commit. I messed up my testing. 2001-01-28 21:24:05 +00:00
Marcel Moolenaar
136345c019 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
John Baldwin
dfea516de2 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 Wemm
5ae7f4d746 Corresponding version bump for config with the DEV_FOO replacement for
the NFOO count option.
2001-01-19 12:50:16 +00:00
David E. O'Brien
1bc9ef1684 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
KATO Takenori
7b6cd188ea Merged from Makefile.i386 revision 1.217. 2000-12-22 10:24:55 +00:00
KATO Takenori
384a1c1a81 Merged from Makefile.i386 revision 1.216. 2000-12-22 10:21:33 +00:00
KATO Takenori
7a85504b98 Merged from Makefile.i386 revision 1.215. 2000-12-16 03:17:51 +00:00
Yoshihiro Takahashi
cd52087363 Added 'MACHINE=pc98' to MKMODULESENV variable. It is needed to make modules
for PC-98 on IBM-PC box.
2000-12-10 10:28:01 +00:00
Peter Wemm
3f964411b5 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
David E. O'Brien
363ea5eadf 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
Yoshihiro Takahashi
6ffb65e8b1 Merged from the following changes.
sys/conf/Makefile.i386      1.211
sys/conf/files.i386         1.329
sys/isa/fd.c                1.186, 1.188 and 1.189
sys/isa/sio.c               1.305 and 1.317
sys/i386/conf/GENERIC       1.270, 1.281, 1.282 and 1.284
sys/i386/i386/machdep.c     1.419
sys/i386/i386/userconfig.c  1.184
2000-11-05 14:31:19 +00:00
Poul-Henning Kamp
26dac111f1 Add a hook for doing #include magic (for src/tools/tools/kerninclude). 2000-10-29 09:47:50 +00:00
Poul-Henning Kamp
412916079c Make it possible to specify profiling in the kernel config file.
Do so for LINT.
2000-10-14 08:33:22 +00:00
David E. O'Brien
e48c56aeb6 Do not prepend DESTDIR' to KMODDIR' as sys/conf/kmod.mk already does
that for us.
2000-10-03 20:05:36 +00:00
David E. O'Brien
6c5d644183 Install the kernel KLM as "kernel" by default. 2000-09-14 15:17:19 +00:00
David E. O'Brien
ecf92803ef 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
David E. O'Brien
39f7b60e36 Remove superfluous `/'s before KODIR.
Acceptability explained by:	rgrimes
2000-09-07 00:26:33 +00:00
David E. O'Brien
8a97d93145 DESTDIR'ify the device.hints checking code. 2000-09-06 09:27:25 +00:00
David E. O'Brien
3be254e2c1 I forgot the leading `DESTDIR' before the kernel directory. 2000-09-06 09:14:18 +00:00
David E. O'Brien
3bdfa9e589 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 Wemm
596feda554 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 Wemm
6c243dd175 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
David E. O'Brien
92a4949b42 * Create entire directory path for modules.
* Don't ignore error returns.
2000-08-03 09:06:53 +00:00
Brian Feldman
f623957fef -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 Wemm
02def50484 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
David E. O'Brien
7684b08b56 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
David E. O'Brien
f94a3783cf 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
KATO Takenori
339d78c806 Merged from sys/conf/Makefile.i386 revisions 1.192 and 1.193. 2000-06-16 16:36:50 +00:00
Peter Wemm
f71c01cc52 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 Wemm
d2c48a2708 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 Wemm
3f664fc689 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
KATO Takenori
7dca57550f Merged from sys/conf/Makefile.i386 revision 1.187. 2000-06-06 08:18:31 +00:00
Bruce Evans
f47f0edde4 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
Yoshihiro Takahashi
a5b52892d8 Sync with sys/conf/Makefile.i386 revision 1.184, 1.185 and 1.186. 2000-05-10 13:57:22 +00:00
Peter Wemm
02d06d3007 LOAD_ADDRESS is not used here. See conf/ldscript.* for the link base
address.
2000-04-29 06:29:39 +00:00
KATO Takenori
49a8300403 Merged from sys/conf/Makefile.i386 rev 1.182. 2000-04-12 11:19:56 +00:00
KATO Takenori
e4197aa9d6 Synced with sys/conf/Makefile.i386 revision 1.181. 2000-04-05 12:54:13 +00:00
Peter Wemm
2af66d23ef 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
Peter Wemm
18ecdacc22 Bump configvers.h as a precaution. Although existing config files will
work unmodified still, new config files won't work on the old ones.
2000-01-23 12:24:48 +00:00
Peter Wemm
b7db0275e2 Point to the right kernel ld script.
Remove stray PC98 make variable.
2000-01-09 17:59:49 +00:00
KATO Takenori
a7dcfbda20 Synced with sys/i386/conf/Makefile.i386 rev 1.176. 2000-01-09 14:24:00 +00:00
Peter Wemm
58fa7951a2 Bump configversion. The controller/device changes are upwards but not
downwards compatable.  If you try and config a s/controller/device/ kernel
with an old config(8), the results will be less than satisfactory.
2000-01-09 07:10:27 +00:00
Bruce Evans
c453bba744 Compile genassym.c with ordinary ${CFLAGS}. The (small) needs for
${GEN_CFLAGS} and -U_KERNEL became negative when all all the
genassym.c's were converted to be cross-built.

Makefile.*:
- Cleanups associated with the old genassym.
- Fixed deprecated spelling of ${.IMPSRC} as "$<".
2000-01-08 15:52:22 +00:00
Marcel Moolenaar
3abe5082ad Use genassym(1). The definitions of NKPDE and NKPT have been removed
because they are already defined in pmap.h, resulting in duplicate
definitions.

Reviewed by: bde
2000-01-07 11:50:46 +00:00
KATO Takenori
a7c6b6f184 Synced with sys/i386/conf/Makefile.i386 rev 1.170. 2000-01-03 05:34:48 +00:00
KATO Takenori
18a1cdb3e6 Synced with sys/i386/conf/Makefile.i386 rev 1.169. 1999-12-27 13:53:43 +00:00
KATO Takenori
09f38dc0ab Sync with sys/i386/conf/Makefile.i386 rev 1.167. 1999-12-20 10:55:49 +00:00
KATO Takenori
33dc682a2c Merge from sys/i386/conf/Makefile.i386 rev 1.166. 1999-12-13 13:15:32 +00:00
Yoshihiro Takahashi
2dae6d29ec Sync with sys/i386/conf/Makefile.i386 revision 1.165. 1999-11-25 12:52:13 +00:00
Yoshihiro Takahashi
f3335fa93f Sync with sys/i386/conf/Makefile.i386 revision up to 1.163. 1999-11-18 11:26:45 +00:00
Marcel Moolenaar
7621bfff0f Allow the source root `S' to be overridden by defining it only when
it isn't already defined. It enables config(8) to create the kernel
build directory where it wants.
1999-10-30 09:28:27 +00:00
KATO Takenori
279fefa67d Sync with sys/i386/conf/Makefile.i386 revision 1.160. 1999-10-13 10:59:23 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
KATO Takenori
29390f09cb Sync with sys/i386/conf/Makefile.i386 revision 1.158. 1999-07-08 11:48:47 +00:00
KATO Takenori
819e31e3b3 Sync with sys/i386/conf/Makefile.i386 revision 1.157. 1999-07-03 08:17:40 +00:00
KATO Takenori
8d7f0e7f4c Sync with sys/i386/conf/Makefile.i386 revision 1.156. 1999-06-28 13:07:58 +00:00
KATO Takenori
e453f04978 Sync with sys/i386/conf/GENERIC and Makefile.i386 revisions 1.169 and
1.152, respectively.
1999-05-10 09:00:29 +00:00
KATO Takenori
a1fe075531 Sync with sys/i386/conf/Makefile.i386 revision 1.149. 1999-05-09 04:26:06 +00:00
KATO Takenori
c1327c0f76 Sync with sys/i386/conf/Makefile.i386 revision 1.148. 1999-04-25 04:04:24 +00:00
KATO Takenori
07a6f835ff Sync with sys/i386/conf/Makefile.i386 revision 1.147. 1999-04-20 09:07:19 +00:00
KATO Takenori
c55a92c639 Sync with follwing files:
Path				Revision
i386/conf/GENERIC		1.162
i386/conf/Makefile.i386		1.146
i386/conf/files.i386		1.236
i386/conf/options.i386		1.111
i386/i386/machdep.c		1.329
i386/i386/userconfig.c		1.134
i386/isa/fd.c			1.135
i386/isa/if_ed.c		1.151
i386/isa/isa_dam.c		1.1
i386/isa/npx.c			1.67
isa/sio.c			1.224
dev/syscons/syscons.c		1.300
i386/isa/wd.c			1.194
isa/vga_isa.c           1.5
isa/atkbd_isa.c         1.3
isa/syscons_isa.c       1.2

Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:42:20 +00:00
Greg Lehey
4357ca882d Back out default debug kernel. The flags revert to historical behaviour.
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.
1999-04-11 03:40:11 +00:00
Greg Lehey
2005b07aa8 1. Modify config to issue different code for debugging.
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.
1999-04-07 09:28:03 +00:00
KATO Takenori
25032d1945 Sync with sys/i386/conf/Makefile.i386 revision 1.141. 1999-03-13 13:18:00 +00:00
KATO Takenori
4f0282c066 Sync with sys/i386/conf/Makefile.i386 revision 1.140. 1999-03-02 14:01:33 +00:00
Dag-Erling Smørgrav
ad5ebf3fba Ignore errors from chflags. This makes it possible to make installworld
with DESTDIR set to an NFS-mounted file system.
1999-02-14 13:56:15 +00:00
KATO Takenori
75929847ae Sync with sys/i386/conf/Makefile.i386 revision 1.138. 1999-01-27 08:25:19 +00:00
KATO Takenori
564da2b0d5 Sync with sys/i386/conf/Makefile.i386 revision 1.137. 1999-01-25 12:12:01 +00:00
KATO Takenori
3c4a8b442b Sync with sys/i386/conf/Makefile.i386 revision 1.136. 1999-01-20 08:29:48 +00:00
KATO Takenori
56cdcc561b Sync with sys/i386/conf/Makefile.i386 revision 1.135. 1999-01-18 11:00:29 +00:00
John Polstra
f92bdbd010 Switch to using ".So" as the extension for PIC object files rather
than ".so".  The old extension conflicted with well-established
naming conventions for dynamically loadable modules.

The "clean" targets continue to remove ".so" files too, to deal with
old systems.
1999-01-09 21:51:00 +00:00
KATO Takenori
9ed7b39888 Sync with sys/i386/conf/Makefile.i386 revision 1.133. 1999-01-08 15:59:41 +00:00
KATO Takenori
3bdb02e60a Sync with sys/i386/conf/Makefile.i386 revision 1.132. 1998-12-25 09:03:18 +00:00
KATO Takenori
aad7f41eee Sync with sys/i386/conf/Makefile.i386 revision 1.131. 1998-12-21 09:57:42 +00:00
KATO Takenori
d021dab50a Sync with sys/i386/conf/Makefile.i386 revision 1.130. 1998-12-08 08:19:45 +00:00
KATO Takenori
22276a9a88 Sync with sys/i386/conf/Makefile.i386 revision 1.129. 1998-11-16 08:09:16 +00:00
KATO Takenori
a0a1e229e8 Sync with sys/i386/conf/Makefile.i386 revision 1.128. 1998-11-06 08:06:32 +00:00
KATO Takenori
5ff07d2ee7 Sync with sys/i386/conf/Makefile.i386 revision 1.127. 1998-10-28 10:48:37 +00:00
KATO Takenori
abe3697a3a Sync with sys/i386/conf/Makefile.i386 revision 1.126. 1998-10-11 15:01:40 +00:00
KATO Takenori
2ed839e4cf Sync with sys/i386/conf/Makefile.i386 revision 1.125. 1998-10-05 08:57:17 +00:00
KATO Takenori
a80a8d7271 Sync with sys/i386/conf/Makefile.i386 revision 1.124. 1998-09-22 16:11:08 +00:00
KATO Takenori
6b47fe275c Sync with sys/i386/conf/Makefile.i386 revision 1.123. 1998-09-16 08:04:40 +00:00
KATO Takenori
c17091756f Sync with sys/i386/confMakefile.i386 revision 1.122. 1998-09-15 03:49:43 +00:00
KATO Takenori
0e28be212a Sync with sys/i386/conf/Makefile.i386 revision 1.121. 1998-09-05 02:35:21 +00:00
KATO Takenori
a6ccc598a3 Sync with sys/i386/conf/Makefile.i386 revision 1.120. 1998-09-01 07:18:09 +00:00
KATO Takenori
b5ecefd598 Sync with sys/i386/conf/Makefile.i386 revision 1.118. 1998-08-28 12:48:38 +00:00
KATO Takenori
0faba01ed8 Sync with sys/i386/conf/Makefile.i386 revision 1.117. 1998-07-12 14:30:54 +00:00
KATO Takenori
e379d366dd Sync with sys/i386/conf/Makefile.i386 revision 1.115. 1998-06-25 10:49:49 +00:00
KATO Takenori
a47dddaf2d Sync with sys/i386/conf/Makefile.i386 revision 1.114. 1998-06-17 16:30:53 +00:00
KATO Takenori
8c1bd9897c Fixed missing semicolon and added space before semicolon.
Noticed by:	Toshikazu Kaho <kaho@elam.kais.kyoto-u.ac.jp>
1998-05-25 09:57:34 +00:00
KATO Takenori
a85be450c5 Sync with sys/i386/conf/Makefile.i386 revision 1.113. 1998-05-23 07:45:54 +00:00
Warner Losh
3f6c4fc33b Use ${.TARGET} rather than $@. i386 tested, pc98 untested because config
on my box doesn't grok machine type pc98.
PR:		3272
Submitted by:	jhs
1998-04-29 18:21:35 +00:00