Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2009 10:48:32 +0000
From:      Rui Paulo <rpaulo@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: [PATCH] Set SYSDIR for modules built with kernel
Message-ID:  <7B12E246-F284-4436-BDAD-5263769E339E@gmail.com>
In-Reply-To: <200903051041.10678.jhb@freebsd.org>
References:  <200903051041.10678.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-3-331275001
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit


On 5 Mar 2009, at 15:41, John Baldwin wrote:

> One of the things each kernel module build has to do is figure out  
> where the
> source tree it belongs to lives.  /usr/share/mk/bsd.kmod.mk uses a  
> heuristic
> where it walks up N levels of the tree looking for a kernel source  
> directory.
> If that fails it falls back to /sys or /usr/src/sys.  One side  
> effect of this
> (besides lots of directory lookups during a build as each kernel  
> module build
> stage has to do this) is that if CURRENT adds an even deeper level  
> of nesting
> (such as with the recent ata chipset modules) then you can't build a  
> kernel
> with those modules until /usr/share/mk/bsd.kmod.mk on your build  
> machine has
> been updated.  This means you can't build an 8.0 kernel on 7.0  
> simply because
> ata chipset modules don't find the right headers.
>
> However, the SYSDIR is already known during a kernel build (we  
> depend on this
> to make modules built in ports DTRT when they are rebuilt via  
> buildkernel).
> I just changed the kernel build Makefile to always set SYSDIR.  With  
> this
> change, I was able to build an 8.0 kernel + modules on a 7.1-ish  
> machine with
> an unpatched /usr/share/mk/bsd.kmod.mk.  This should also have the  
> side
> effect of reducing the number of pathname lookup operations done  
> during a
> kernel build with modules.
>
> Thoughts?

I think this should go in. Thanks.

--
Rui Paulo


--Apple-Mail-3-331275001
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkmw/4AACgkQfD8M/ASTygJXbgCdEBz+J9Vh18DoTYsVCMX/jHkm
97sAnjD0A9+eJSxEc/UltRdqHwHCxZ2A
=HWcQ
-----END PGP SIGNATURE-----

--Apple-Mail-3-331275001--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B12E246-F284-4436-BDAD-5263769E339E>