Re: ANN: LKMB (Linux Kernel Module Builder) version 0.1.16

Olaf Titz
2003-01-20T20:08:35Z

> > It is a bug that the current Makefile can't compile modules in an
> > object directory different from the source directory. This means the
> > module source tree can't be mounted read-only (again, without
> > resorting to symlinks).
>
> make -C path/to/kernel/src SUBDIRS=$PWD modules
> So simple when you know the trick. That what I have documented

no, this doesn't work when you have the source and object files _of
the module_ in separate directories. You'd have to run make in the
object directory, but there seems no way to tell it where the source
is. (At least I have not found any.)

The reason to do this is compiling one module for different kernel
configurations as well as compiling one kernel for different
configurations. I.e. I want to have a tree like this:

first the kernel:

/usr/src/linux/2.5.99/ this is directory X
/var/obj/linux/2.5.99/boxa here is X compiled for boxa
/var/obj/linux/2.5.99/boxb here is X compiled for boxb

(this doesn't work either at the moment, another bug/missing feature...)

then the external module:

/usr/src/cipe this is directory Y
/var/obj/cipe/2.5.99/boxa here is Y compiled against X for boxa
/var/obj/cipe/2.5.99/boxb here is Y compiled against X for boxb

and /usr/src might be mounted read-only.

Olaf