[PATCH] Set SYSDIR for modules built with kernel
Rui Paulo
rpaulo at gmail.com
Fri Mar 6 02:48:37 PST 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20090306/9fdf3552/PGP.pgp
More information about the freebsd-arch
mailing list