Re: Kernel and modules for another machine.

David Luyer (
Tue, 28 Jul 1998 15:25:10 +0800

> Iusty Pop wrote:
> > As for modules, (...) you could save your current directory
> > of modules ...
> Actually, I now came up with a slicker solution. I modified the
> Makefile in /usr/src/linux by copying the rule for modules_install,
> renaming it to modules_alt and changing MODLIB from /lib/modules/...
> to /usr/src/linux/alter/... It seams to have warked like charm.
> Perhaps this is a modification that is worth taking up in upcoming
> versions of kernel releases?

Maybe something along the lines of a make target for an alternate machine,
here's what I use (named 'ucs' as the name of where I work, it should
obviously be given a better name if it was in the kernel proper:).

ucs: clean depend zImage modules
@( \
rm -rf /usr/src/linux/INSTALL; \
cd modules; \
[... middle part of existing modules_install omitted ...]
rm -f .misc .allmods; \
ln /usr/src/linux/arch/i386/boot/zImage /usr/src/linux/INSTALL/vmlinuz-$
ln /usr/src/linux/ /usr/src/linux/INSTALL/$(VERSION

This is based on the modules_install target but is designed to build an entire
directory ready to be tarred in /usr/src/linux/INSTALL, and completely cleans
the tree before building.

To install on another machine, untar the resulting tarball, and then just
cp -ipr 2.x.x /lib/modules
cp *-2.x.x /boot
update /vmlinuz* symlinks, run lilo and reboot.

Building an INSTALL directory also makes archiving kernels with appropriate and modules much simpler.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at