Commit Graph

174 Commits

Author SHA1 Message Date
Ruslan Ermilov
9f73f0e897 Properly handle vnode_if.h dependencies, and don't forget to clean all files. 2004-12-08 07:23:12 +00:00
Brian Feldman
78b2c86828 Unbreak KLDs that use VFS by accounting for changes in the generation
process for the vnode header files.
2004-12-08 03:54:32 +00:00
Marius Strobl
21a0216e96 Revert rev. 1.166 and remove sparc64/pci/ofw_pci_if.m from MFILES again,
sparc64/pci/ofw_pci.h is no longer required for compiling modules.
2004-12-04 14:20:56 +00:00
Marcel Moolenaar
268597acfe Sort MFILES. 2004-11-20 06:09:11 +00:00
Ruslan Ermilov
743d0f6640 Hack around a problem with sys/tools/usbdevs2h.awk that generates
both usbdevs.h and usbdevs_data.h.  (The latter was not cleaned.)
2004-10-24 08:26:48 +00:00
Ruslan Ermilov
f49f4f366b Back out cumulative changes from revs. 1.92-1.94: "make depend"
followed by "make depend" shouldn't do anything.  It doesn't
seem to be a problem anymore, and if someone finds it to break
again, please contact me so we can work on a real fix.

Reviewed by:	bde
2004-10-12 15:08:24 +00:00
Ruslan Ermilov
1f0896165b Style fixes, including:
- Sort kmod.mk knobs in the documentation section.
- Fixed misuses of the word "KLD" which stands for
  "kernel ld", or "kernel linker", where kernel
  module is meant.
- Removed redundant uses of ${.OBJDIR}.
- Whitespace and indentation fixes.
- CLEANFILES cleanup.
- Target redefinition protection (install.debug).

Submitted by:	bde, ru
Reviewed by:	ru, bde
2004-10-12 15:04:10 +00:00
Joerg Wunsch
31e81ae45d Revert the change from rev 1.168. ru convinced me that the situation
that was fixed by this should not normally happen, and since I did not
record the traces of my failed build attempt that had been solved with
that change, it's not entirely clear whether it hadn't been a pilot
error on my end.  In dubio pro reo. :-)
2004-10-11 21:23:56 +00:00
Joerg Wunsch
4e8ba8de26 Forcibly create symlinked headers, otherwise the build process may fail
if the target link already existed (e. g. -DNO_KERNELCLEAN).
2004-10-09 13:51:28 +00:00
Ian Dowse
83c457dc27 Unconditionally add `-fno-omit-frame-pointer' to CFLAGS when building
modules on the amd64 platform. Without this, ddb stack traces cannot
follow module function calls, which makes debugging very difficult.
2004-08-29 02:00:50 +00:00
Marius Strobl
d25ed517a4 Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will
get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.
2004-08-14 23:53:04 +00:00
Ruslan Ermilov
48aea4da66 Removed COPTS support from kmod.mk and kern.pre.mk.
COPTS support in bsd.prog.mk is preserved but discouraged.
2004-08-13 14:30:26 +00:00
Marius Strobl
26280d88d7 - Introduce an ofw_bus kobj-interface for retrieving the OFW node and a
subset ("compatible", "device_type", "model" and "name") of the standard
  properties in drivers for devices on Open Firmware supported busses. The
  standard properties "reg", "interrupts" und "address" are not covered by
  this interface because they are only of interest in the respective bridge
  code. There's a remaining standard property "status" which is unclear how
  to support properly but which also isn't used in FreeBSD at present.
  This ofw_bus kobj-interface allows to replace the various (ebus_get_node(),
  ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type()
  vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one.
  This in turn allows to simplify and remove code-duplication in drivers for
  devices that can hang off of more than one OFW supported bus.
- Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the
  drivers for their children to use the ofw_bus kobj-interface. The IVAR-
  interfaces of the Central, EBus and FHC are entirely replaced by this. The
  PCI bus driver used its own kobj-interface and now also uses the ofw_bus
  one. The IVARs special to the SBus, e.g. for retrieving the burst size,
  remain.
  Beware: this causes an ABI-breakage for modules of drivers which used the
  IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be
  recompiled.
  The style-inconsistencies introduced in some of the bus drivers will be
  fixed by tmm@ in a generic clean-up of the respective drivers later (he
  requested to add the changes in the "new" style).
- Convert the powerpc MacIO bus driver and the drivers for its children to
  use the ofw_bus kobj-interface. This invloves removing the IVARs related
  to the "reg" property which were unused and a leftover from the NetBSD
  origini of the code. There's no ABI-breakage caused by this because none
  of these driver are currently built as modules.
  There are other powerpc bus drivers which can be converted to the ofw_bus
  kobj-interface, e.g. the PCI bus driver, which should be done together
  with converting powerpc to use the OFW PCI code from sparc64.
- Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take
  advantage of the ofw_bus kobj-interface and simplify them a bit.

Reviewed by:	grehan, tmm
Approved by:	re (scottl)
Discussed with:	tmm
Tested with:	Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386
2004-08-12 17:41:33 +00:00
Nate Lawson
d13e5a4065 Add acpi methods for HID/CID probing, evaluating objects, and walking the
namespace.  This is to allow decoupling of attachments from ACPI where they
need some functionality when ACPI is present but do not want to require ACPI
to always be loaded.
2004-06-29 18:56:14 +00:00
Nate Lawson
684c1c1ddb Hook acpi_quirks up to the build for kernel and modules. 2004-06-24 06:29:22 +00:00
Max Laier
02b199f158 Link ALTQ to the build and break with ABI for struct ifnet. Please recompile
your (network) modules as well as any userland that might make sense of
sizeof(struct ifnet).
This does not change the queueing yet. These changes will follow in a
seperate commit. Same with the driver changes, which need case by case
evaluation.

__FreeBSD_version bump will follow.

Tested-by:	(i386)LINT
2004-06-13 17:29:10 +00:00
Warner Losh
6732641e0a Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus.  This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work
2004-06-09 16:08:20 +00:00
Warner Losh
dba6dd177b Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.
2004-05-26 00:53:10 +00:00
Warner Losh
c4e54758fe devlist2h.awk is too generic a name for what it does. It really
converts miidevs to a .h file, so rename to reflect that.

The usb and pccard versions have also been renamed and will be hooked
into the build system shortly (I've made the conversion in my p4
tree).
2004-05-26 00:19:39 +00:00
Peter Wemm
4d6bcc8306 Enable first part of kld's on amd64. This is known to not work right
yet, but building kld's is OK now and they can be loaded by kldload(2).
(but the machine will likely crash soon afterwards, a "minor" problem :-)

Brought to you by:  my injured knee (from moving)
2004-05-16 20:11:38 +00:00
Tom Rhodes
5a19f6d9d4 Fix some style bugs in previous commit.
Fix 'broken' ifdefs.
icc does not support profiling yet so remove unfinished code which was
supposed to help.

Submitted by:	netchild (original version)
Reviewed by:	ru
2004-03-14 01:29:05 +00:00
Tom Rhodes
06d6e4fcfe This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.

The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.

Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.

To use it update share/mk, add
	/usr/local/intel/compiler70/ia32/bin	(icc v7, works)
or
	/usr/local/intel_cc_80/bin		(icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
	CFLAGS="-O2 -ip" CC=icc make depend
	CFLAGS="-O2 -ip" CC=icc make
in it.

Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.

Problems with icc v8:
 - panic: npx0 cannot be emulated on an SMP system
 - UP: first start of /bin/sh results in a FP exception

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	silence on -arch
Submitted by:	netchild
2004-03-12 21:36:12 +00:00
Ruslan Ermilov
776f50b966 Overdue reversion of revision 1.143.
OK'ed by:	imp
2004-03-06 21:23:56 +00:00
Ruslan Ermilov
817b59bff6 Reduce the number of knobs controlling the build of debug modules
to one, DEBUG_FLAGS, which is also compatible with <bsd.prog.mk>.
Previously one had to set both DEBUG and DEBUG_FLAGS to build the
.ko.debug with debugging symbols which was boring when doing this
manually.
2004-02-13 10:40:54 +00:00
Ruslan Ermilov
4c293d355f We didn't strip debugging symbols from .ko if DEBUG was undefined. 2004-02-13 09:39:45 +00:00
Ruslan Ermilov
e0dd77fdd7 Don't add CWARNFLAGS to CFLAGS here, they were already added by bsd.sys.mk. 2003-12-25 14:07:52 +00:00
Warner Losh
3193579b66 o Remove @- from the ln and change it to a -sf. This was bogus, and
regocnized as such at the time.  Now that the other bogons in the
  tree have been fixed, we can remove this ugly kludge.
o Remove stale/bogus opt_foo.h files.  These are left over from
  by-gone resources.  And they point to the need, yet again, to
  improve the build system so meta information is only in one place.

Submitted by: ru
Reviewed by: bde
Approved by: re@ (jhb)
2003-11-19 05:08:27 +00:00
Warner Losh
62d768efe6 Ignore errors on ln. This is a quick fix for the make depend twice in
a row being broken.  A better filx will come as soon as I have time to
analyse things more deeply.
2003-11-17 05:21:18 +00:00
Brian Feldman
75504450a1 As mentioned by warner, previous revision (opt_ddb.h) was just a fluke --
I'm having bad luck with different parts of the sys tree being checked
out at slightly different times.  Back it out, noting it doesn't cause
harm in any case.  Tinderbox also makes these things more fun.
2003-11-16 08:10:59 +00:00
Brian Feldman
5e36d52bef It appears opt_global.h may cause opt_ddb.h to be needed. Adding it
with the full path on the command line like with -include opt_global.h
currently unbreaks tinderbox.
2003-11-16 07:50:14 +00:00
Warner Losh
6b1bb55958 Fix the building of null module. In the DIAGNOSTICS case, we include
opt_ddb.h.  These changes expand green's work of including
opt_global.h to prefer opt files in the kernel directory.  Further
refinement might be needed, but I think this is good.

Note: While this is a step on the path to moving the meta information
about modules into the config files, it doesn't actually do that.  It
just pulls in the opt files in a way that allows one to build
'generic' modules outside the tree.
2003-11-16 01:41:38 +00:00
Brian Feldman
8fa793d0fe Include opt_global.h in the modules build, when building from a normal
kernel build.  This makes it possible for me not to get pissed off that
random.ko crashes the system trying to rdtsc() when the i386/cpu.h
support code decides it's okay to call that op when neither I386_CPU or
I486_CPU is defined.  I guess it also makes WITNESS/INVARIANTS defines
get picked up by the modules.
2003-11-14 16:04:11 +00:00
Peter Wemm
5064105e52 Move the inline limit default variable to a per-arch place. For example,
the amd64 implementation of the pcpu macros is even more verbose than on
i386 and that causes gcc to way overestimate the complexity of this
2-instruction macro.  The other platforms can probably lower their
default values.
2003-11-04 23:29:17 +00:00
Warner Losh
eefb5d68b2 While make has been fixed to grok this construct, the new make hasn't
been widely deploy and that's causing us a lot of pain.  Back out the
last commit for a few weeks so that we can lessen the support load in
current@ asking why they can't build kernels anymore.  Instructions in
UPDATING have been updated, but this should be more effective.

Revert the reverting: November 1st, 2003
2003-10-03 22:00:06 +00:00
Ruslan Ermilov
bf17fc53ac Revert rev. 1.86, I've fixed make(1) (make/dir.c,v 1.32).
PR:		bin/34062
2003-10-02 21:34:06 +00:00
Marcel Moolenaar
2bec1c8919 Hook-up the uart(4) driver to the build. For a detailed description
of what uart(4) is and/or is not see the initial commit log of one
of the files in sys/dev/uart (or see share/man/man4/uart.4).

Note that currently pc98 shares the MD file with i386. This needs
to change when pc98 support is fleshed-out to properly support the
various UARTs. A good example is sparc64 in this respect.

We build uart(4) as a module on all platforms. This may break
the ppc port. That depends on whether they do actually build
modules.

To use uart(4) on alpha, one must use the NO_SIO option.
2003-09-06 23:23:26 +00:00
Warner Losh
74455e5526 Now that the pci include file location migration has been completed,
remove the -I$S/dev and -I@/dev which were there only for pci.

# If I've broken something, please let me know.
2003-08-22 15:41:44 +00:00
Peter Wemm
a92a214401 Change the inline limit switch to something that exists in gcc-3.2.
Unfortunately, it has different units.
2003-07-26 02:27:50 +00:00
Peter Wemm
2a51529f7e Provide a knob for raising the inline instruction estimate threshold and
set an initial value.  This is aimed at getting us closer to being able to
turn -Werror back on and we can adjust the settings later on.  Yes, we
could turn off -Wno-inline instead, but that would hide the effect of
gcc's bogo-estimator ignoring inline (either rightly or wrongly).
2003-07-23 20:03:42 +00:00
Ruslan Ermilov
f2bffe0f7f exists() is too aggressive when searching for files without a full path.
Inspired by:	bsd.prog.mk,v 1.105
2003-03-03 22:51:22 +00:00
Ruslan Ermilov
ddc474a84b Initiate the de-orbit burn sequence for <bsd.kern.mk>.
Always use sys/conf/kern.mk when building kernel/modules.
<bsd.kern.mk> is only preserved for sys/boot/pc98/boot2
for now, but this will be fixed.  If there are other
users of <bsd.kern.mk>, please let me know.

Reminded by:	bde
2003-02-28 22:12:17 +00:00
Yoshihiro Takahashi
83536948ae Add CanBe power management controller support.
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2003-02-03 14:46:26 +00:00
Jake Burkholder
4875819c6e Run kldxref on sparc64, it works now. 2003-01-21 05:52:48 +00:00
David E. O'Brien
2d3ce7133a Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
2003-01-19 02:59:34 +00:00
Jake Burkholder
f2de139378 Don't run kldxref when installing modules on sparc64. kldxref and the whole
module dependency system rely on linker behaviour that is machine dependent
and not part of the elf spec, and only work by accident on other platforms.

Approved by:	re
2002-12-13 00:32:29 +00:00
Maxime Henrion
361186e5d5 In the !DEBUG case, we were passing foo.ko two times on the
rm -f command line when doing a make clean.  Fix this.

Reviewed by:	ru
2002-11-06 17:40:13 +00:00
Sam Leffler
c4f9e3ae7f add crypto interface to the MFILES list 2002-10-04 20:36:39 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov
2b06260dfa Handle installation of links through bsd.links.mk.
Removed comments that no longer directly apply here.
2002-07-17 08:21:50 +00:00