Re: several messages

From: David Woodhouse (dwmw2@infradead.org)
Date: Mon Jan 27 2003 - 11:59:35 EST


davidsen@tmr.com said:
> You make my point for me, there is no magic, and when building a
> module it should require that the directory be specified by either a
> command line option (as noted below) or by being built as part of a
> source tree. There *is* no good default in that particular case.

/lib/modules/`uname -r`/build _is_ a good default for a module to build
again. It is correct in more cases than a simple failure to do anything.

For _installing_, the correct place to install the built objects is surely
/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) where the
variables are obtained from the top-level Makefile in the kernel sources
you built against.

You _default_ to building and installing for the current kernel, if it's
installed properly. But of course you should be permitted to override that
on the command line.

> Related for sure, the point I was making was that there is no good
> default place to put modules built outside a kernel source tree (and
> probably also when built for multiple kernels).

I disagree. Modutils will look in only one place -- the /lib/modules/...
directory corresponding to the kernel version for which you built each
module. Each module, therefore, should go into the directory corresponding
to the version of the kernel against which it was built.

Finding the appropriate _installation_ directory is trivial, surely? You
can even find it from the 'kernel_version' stamp _inside_ the object file,
without any other information?

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:17 EST