Commit Graph

161 Commits

Author SHA1 Message Date
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
Bruce Evans
503e666658 Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in the
kernel, but gcc provides a pessimal builtin for it.

Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.

LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.
1999-10-03 07:09:31 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
6c205e59db Delete the 'device-driver' suffix. It's been meaningless for a long time.
On the VAX, it used to be used for special compilation to avoid the
optimizer which would mess with memory mapped devices etc.  These days
we use 'volatile'.
1999-07-03 19:19:34 +00:00
Jordan K. Hubbard
93740fb962 Working kernel tags!
Submitted by:	Craig Leres <leres@ee.lbl.gov>
PR:		2806
1999-07-02 04:00:01 +00:00
Peter Wemm
320138da4c Use the same -UKERNEL strategy as the alpha to avoid the inlines etc. 1999-06-28 09:21:41 +00:00
Poul-Henning Kamp
46d2febf9d Hmm, might as well make all of BEFORE_DEPEND first in case make depend
wasn't run.
1999-06-28 07:19:51 +00:00
Poul-Henning Kamp
d86578de9d Also make pci_if.h early if make depend wasn't run. 1999-06-28 07:10:55 +00:00
Poul-Henning Kamp
85a96bc645 Make bus_if.h and device_if.h as early as possible if make depend hasn't
been run.
1999-06-28 07:06:21 +00:00
Peter Wemm
a127a70452 Move KERNEL?=kernel to top of the file where it's more obvious and add
a pointer to 'makeoptions' and /etc/make.conf.
Catch a few stray "kernel" hardcoded references.
Move the kernel.debug and related kernel build rules together.
1999-05-09 22:42:17 +00:00
Peter Wemm
37558b0171 Move a couple of bits of (now) static content from config(8) (ie: %LOAD)
directly into the Makefile.  Remove references to swapkernel.c, it's
not generated by config(8) now.  (The previous config commits had
generated it, but they had an unused 'char *' in them).
1999-05-09 18:57:02 +00:00
Poul-Henning Kamp
b307e58fc7 Major lobotomy of config(8). The
config kernel mumble mumble

line has been obsoleted and removed and with it went all knowledge of
devices on the part of config.

You can still configure a root device (which is used if you give
the "-r" flag) but now with an option:

        options         ROOTDEVNAME=\"da0s2e\"

The string is parsed by the same code as at the "boot -a" prompt.

At the same time, make the "boot -a" prompt both more able and more
informative.

ALPHA/PC98 people:  You will have to adapt a few simple changes
(defining rootdev and dumpdev somewhere else) before config works
for you again, sorry, but it's all in the name of progress.
1999-05-09 16:46:01 +00:00
Peter Wemm
6d04a6cb97 I'm sick of the automatic rename of /kernel to /kernel.old while doing
development that leads to lots of crashes during boot.

I have made a 'reinstall' target (like in ports, and reinstall.debug)
This is most useful if you want to keep /kernel.old as a known bootable
kernel.  If you test a new kernel and have to reboot for a fix, a
'make reinstall' will install the new kernel over the top of the old
non-viable one, leaving the old one untouched.  This is mainly meant
for development, not general users.
1999-05-08 20:04:39 +00:00
Peter Wemm
061eb3abb3 Bump configvers; when the updates to generic/lint get committed, the old
config has severe indigestion.
1999-04-24 21:38:50 +00:00
Peter Wemm
db42d90829 unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.
1999-04-19 14:14:14 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Bruce Evans
e05da2e941 Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic".

usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
  warning about them.  They haven't done anything related to swap
  for almost 4 years, and were previously silently ignored,
  except for "swap on generic" which stopped swap${KERNEL}.c
  from being generated.  Code to support swapping is now deader
  than before.

usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.

sys/i386/conf/files.i386:
- swapgeneric.c is now standard.  It should be merged into autoconf.c
  so that it doesn't conflict with swap${KERNEL}.c for kernels named
  "generic".

sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots.  Since setroot() doesn't do anything
  harmful, this was just a waste of time, except possibly for booting with
  -a it may have helped prevent an undesireable call to setconf() by
  finding a bogus rootdev.
- honor -a for ffs roots.  -a now overrides all other ways of specifying
  the root device.  Previously, -r had precedence over -a, and the -a
  handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
  the way of a clean panic.

sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
  Don't decide things that are now decided in autoconf.c.  Code to
  support the "generic" case is now dead instead of useless.
1999-04-15 14:52:24 +00:00
Peter Wemm
4e8691dc95 Clean up the kernel/kernel.debug/install.debug etc stuff.
Sense ${DEBUG} to decide on building kernel.debug or not.
Use a common install and install.debug target to minimize duplication.
(I deleted the ELF transition kernel warning, it was getting dated..)
1999-04-13 18:25:08 +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
David Greenman
8681b974c1 Increased kernel virtual address space to 1GB. NOTE: You MUST have fixed
bootblocks in order to boot the kernel after this! Also note that this
change breaks BSDI BSD/OS compatibility.
Also increased default NKPT to 17 so that FreeBSD can boot on machines
with >=2GB of RAM. Booting on machines with exactly 4GB requires other
patches, not included.
1999-03-11 18:28:46 +00:00
Dmitrij Tejblum
bb4b3fa51e Ensure that vnode_if.h build before object files, if make depend has not
been run.
1999-03-01 09:54:51 +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
Julian Elischer
2907af2a96 Mostly remove the VM_STACK OPTION.
This changes the definitions of a few items so that structures are the
same whether or not the option itself is enabled. This allows
people to enable and disable the option without recompilng the world.

As the author says:

|I ran into a problem pulling out the VM_STACK option.  I was aware of this
|when I first did the work, but then forgot about it.  The VM_STACK stuff
|has some code changes in the i386 branch.  There need to be corresponding
|changes in the alpha branch before it can come out completely.

what is done:
|
|1) Pull the VM_STACK option out of the header files it appears in.  This
|really shouldn't affect anything that executes with or without the rest
|of the VM_STACK patches.  The vm_map_entry will then always have one
|extra element (avail_ssize).  It just won't be used if the VM_STACK
|option is not turned on.
|
|I've also pulled the option out of vm_map.c.  This shouldn't harm anything,
|since the routines that are enabled as a result are not called unless
|the VM_STACK option is enabled elsewhere.
|
|2) Add what appears to be appropriate code the the alpha branch, still
|protected behind the VM_STACK switch.  I don't have an alpha machine,
|so we would need to get some testers with alpha machines to try it out.
|
|Once there is some testing, we can consider making the change permanent
|for both i386 and alpha.
|
[..]
|
|Once the alpha code is adequately tested, we can pull VM_STACK out
|everywhere.
|

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:49:52 +00:00
Peter Wemm
43482c407d Force the order of the setdefs* so that make -jN doesn't build the
setdefs* multiple times at the same time that it's compiling setdefs[0].c.
I think this was leading to unterminated linker sets etc.
1999-01-25 04:08:28 +00:00
Peter Wemm
dcddc353f7 Hide the gensetdefs run the same way we hide the final ld command. 1999-01-19 17:08:28 +00:00
Peter Wemm
f7dd86c147 Use the gensetdefs that is now in /usr/bin, it's a superset of the
one in the kernel source, and that one is already used for modules.

I don't _think_ this will hurt releases, aout-to-elf, etc, but it is
possible.  In all the cases I've looked at, config(8) has been
generated straight after a make world, so if /usr/sbin/config exists and
is the right version for the kernel, then we can pretty much count on
/usr/bin/gensetdefs being there too.
1999-01-17 21:17:27 +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
Peter Wemm
c30fe42c78 Flip the kernel default to ELF.. Add a test to try and warn people
that they might be about to blow their feet off if they have not been
reading their mail.  I don't know if or how well this will work, but it's
worth a try.
1999-01-07 06:52:41 +00:00
Mike Smith
3d89c2cdb2 Regrettably, you can't take setdef0.c out of order, or, surprise,
linker sets don't work and thus neither does the kernel.

This should stop being a problem with an improved linker set mechanism in
the pipeline (see the bootloader) but for now this has to stay like this.
1998-12-21 10:29:09 +00:00
Bruce Evans
3d2ffe2196 Fixed building elf kernels without a `make depend' step. The magic
ordering in rev.1.38 was broken by putting setdef0.o before vnode_if.o
in SYSTEM_OBJS.
1998-12-20 16:25:21 +00:00
Warner Losh
f7c9e34bea If there is no .depends file, use the standard ad-hoc way of ensuring
that the generated files are generated before any of the object files.
Also minor cleanup of dependencies in conf/files that I bogusly added
before.

This should fix the requirement that make depend be done starting from
a clean config directory.  If you don't have a clean directory, make
depend is still required if you want the proper .o's to be recompiled.

Reviewed by: bde
1998-12-07 22:36:54 +00:00
Doug Rabson
2f2dcad41b * Change 'struct resource' to 'struct config_resource'.
* Bump config version.
1998-11-15 18:07:35 +00:00
Peter Wemm
3187d896a1 Make a.out kernels kld compatable by default... 1998-11-04 15:27:41 +00:00
Bruce Evans
4af4007dbb Ignore `vector xxxintr' specifications except for checking their syntax.
Interrupt handlers are now configured in drivers.

Didn't update config/SMM.doc.  It doesn't have any i386 examples (not
even `isa').

Bumped CONFIGVERS.  This is not necessary for -current yet, but using
the new config with old system sources gives null pointers for all
vectors.
1998-10-23 17:05:06 +00:00
Peter Wemm
b24d73e14b rm *.so and *.ko in clean as well. 1998-10-10 01:00:56 +00:00
Peter Wemm
6b7a14ce57 Make the ELF kernel build produce a dynamic executable (!). This enables
the in-kernel linker to access the _DYNAMIC data for doing loadable elf
modules.  The alpha kernel is already done this way, I've borrowed some of
the hacks from there.

This is primarily aimed at the 3-stage boot process which is intended to
be able to do pre-loading of kernel modules.

Note that the entry point isn't 0xf0100000 any more, it'll be a little
further on - but this value is stored in the headers.  I don't think this
will be a problem, but I'm sure somebody will tell me if it is. :-)

I'm not sure if btxboot is going to like this, it doesn't do proper ELF
header checking and assumes that there are exactly two program header
entries and that they are both PT_LOAD entries - a bad assumption.
1998-09-30 12:14:39 +00:00
Bruce Evans
5b036e2b3c Fixed missing dependencies of genassym.o, gensetdefs.o and vers.o
on opt_global.h.  This actually matters for genassym.o (it depends
on at least SMP).

Don't undefine KERNEL for compiling genassym.c.  genassym.o really
depends on KERNEL, and the prototype mismatches that required
undefining KERNEL in rev.1.49 no longer exist.

Compile gensetdefs* with the same flags as genassym*.  External
`gen' programs such linux_genassym should also use these flags
(${GEN_CFLAGS}).

Fixed missing dependency generation for gensetdefs.o.  C sources
for external `gen' programs should be added to GEN_CFILES to get
their dependencies generated.

Cleaned up flags definitions and use.  All of ${CFLAGS} is now
passed to mkdep and the assembler (both are actually variants of
${CC} and will ignore the irrelevant flags).
1998-09-21 06:39:11 +00:00
Justin T. Gibbs
79dadba22a Bump config version. 1998-09-15 21:07:07 +00:00
Jordan K. Hubbard
ac80870e0b Decouple genassym flags from CFLAGS.
Submitted by:	jhay
1998-09-14 11:32:17 +00:00
Nicolas Souchu
8afa373cc6 Reviewed by: Doug Rabson
Submitted by:	nsouch
Adding I2C and SMB entries to LINT, CONFIGVERS modified in Makefile.i386
1998-09-03 20:58:34 +00:00
John Birrell
c155091cc8 Change BINFORMAT to KERNFORMAT and add -aout or -elf to the tool
arguments as appropriate. This is necessary because setting OBJFORMAT=aout
in the makefile doesn't get exported to the environment. I wish our
make could do that!
1998-09-01 00:11:02 +00:00
John Birrell
0cdd2a270f Force OBJFORMAT=aout. 1998-08-31 11:43:26 +00:00
Bruce Evans
9478de47f4 Use a relative path to bsd.kern.mk if the relative mk directory exists. 1998-08-24 06:42:26 +00:00
Bruce Evans
a872b9bdd0 Removed historical dependencies on `Makefile'. They had rotted to being
mostly for objects that have the fewest dependencies on `Makefile'
(since they were mostly for utilities and objects generated from *.s
and these don't depend on profiling flags).

Give an explicit rule for building vnode_if.o.  This fixes building
it without ${PROF}.

Use .ORDER instead of a stamp file to avoid building vnode_if.[ch]
concurrently.

Removed explicit dependencies that will be generated by `make' (.c.o)
or will be generated by mkdep.

Added missing dependencies of special objects on opt_global.h.

Use ${NORMAL_C} instead of special rules for special objects where
possible.

FIxed dependencies of vers.o.
1998-07-12 10:47:32 +00:00
Bruce Evans
784c3c3465 Removed all traces of PARAM in Makefile.i386. Incremented CONFIGVERS
to reflect the dependency of Makefile.i386 on nothing being put in
PARAM.

Config versioning is too closely coupled with the Makefile.i386.
1998-07-12 09:52:45 +00:00
Eivind Eklund
1fcddf2eea Fix race condition for creation of vnode_if.c and vnode_if.h.
Exact problem pointed out by: Cyrus Rahman <cr@jcmax.com>
1998-06-24 13:55:32 +00:00
Bruce Evans
afafca8bcb Don't generate declarations for isa device structs in "ioconf.h".
Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.

Updated CONFIGVERS.  New configs are very incompatible with
previous versions.
1998-06-17 15:16:53 +00:00
Eivind Eklund
3933c622cd Move __FreeBSD_version from src/sys/conf/newvers.sh to
src/sys/sys/param.h, to facilitate access from the kernel.  This make
it possible to do outside kernel development and have it actually work
properly.
1998-05-21 19:21:46 +00:00
Eivind Eklund
94610ec47e Back out previous commit - it breaks when called from 'buildworld' :-(
(Damn, I wanted that in the -snap).
1998-05-20 20:54:10 +00:00