How to force "make modules_install" to install elsewhere

Mike A. Harris (mharris@meteng.on.ca)
Thu, 22 Apr 1999 19:01:15 -0400 (EDT)


I'm building kernels on a server right now that are for other machines.
Currently, I'm doing everything up to "make modules", and then I cd into
/lib/modules, rename the currently running module dir, and then do the
final "make modules_install" and then move the module dir that just
installed into another dir prior to tarballing it all up. Then after
that, I rename the running module dir back to it's proper place.

This is of course a nasty hack, and should a module need to load while I'm
doing this, I'm going to have problems.

So, my question is this:

How do I tell "make modules_install" to install the modules to an
alternate arbitrary directory of my choosing. One such as:

/home/customer/spa/kernel/lib/modules

I've examined the top level makefile, and it doesn't appear that it is
possible to have modules install elsewhere without hacking the file.

Can someone please tell me how to do this, or how to modify the existing
kernel Makefile to allow a parameter to specify where modules are
installed? Another option is a script which runs instead which does:

make dep
make clean
make zImage
make modules

then does a custom modules install to a specified location.

Any help with this would be greatly appreciated.

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