Messages in this thread Patch in this message | | | From | "Marc A. Volovic" <> | Subject | Kernel Makefile Change for multiple machines and modules | Date | Wed, 10 Dec 1997 15:21:12 +0200 |
| |
Compiling a single kernel for a number of wildly different machines on a single host is simple enough in Linux as long as one does not play with modules.
As soon as modules muddle the issue, one encounters a problem of installing them, as compiled, on a single machine, becomes annoying: one must manually jiggle the /lib/modules/something hierarchy.
Therefore, as a quick, slap-together, solution, enclosed is a Makefile patch to add another target to the Makefile - modules_altinstall - which
stuffs new modules into /lib/modules/x.y.z.ALT.
---cut---chop---dice---
--- Makefile Wed Dec 10 14:17:44 1997 +++ /usr/src/linux/Makefile.orig Mon Dec 1 23:30:10 1997 @@ -272,29 +272,6 @@ do $(MAKE) -C $$i CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 module s; \ done
-modules_altinstall: - @( \ - MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).ALT; \ - cd modules; \ - MODULES=""; \ - inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \ - mkdir -p $$MODLIB/$$2; cp -p $$These $$MODLIB/$$2; \ - echo Installing modules under $$MODLIB/$$2; \ - }; \ - \ - if [ -f BLOCK_MODULES ]; then inst_mod BLOCK_MODULES block; fi; \ - if [ -f NET_MODULES ]; then inst_mod NET_MODULES net; fi; \ - if [ -f IPV4_MODULES ]; then inst_mod IPV4_MODULES ipv4; fi; \ - if [ -f SCSI_MODULES ]; then inst_mod SCSI_MODULES scsi; fi; \ - if [ -f FS_MODULES ]; then inst_mod FS_MODULES fs; fi; \ - if [ -f CDROM_MODULES ]; then inst_mod CDROM_MODULES cdrom; fi; \ - \ - ls *.o > .allmods; \ - echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \ - if [ -s .misc ]; then inst_mod .misc misc; fi; \ - rm -f .misc .allmods; \ - ) - modules_install: @( \ MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL); \
---cut---chop---dice--- -- ---MAV Type Bits/KeyID Date User ID pub 1024/2971208D 1997/09/11 Marc A. Volovic
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.3i mQCNAzQYNjQAAAEEANNIjkR/0Z/HFdhIvGLf7K+YvBrcY34H1IwRPitKi29aKoan wrm5Ia2XHFxk92JJ4r0ojdTQd2e/mvOJTG6um2DykLWUmpcBhkvPtxhsP5gOrCwD fRoqQ8SIK9pxMIrIgidKa0Z1Fo+kMn7CFUy1W4oYkN96GEV2nVVaYMIpcSCNAAUR tCJNYXJjIEEuIFZvbG92aWMgPG1hcmNAYmFyZC5vcmcuaWw+iQCVAwUQNBg2NFVa YMIpcSCNAQFYwgP8Ci8CuTWtkYBsM1Ucb/cJXtYxV10piQ+5+ADt2aEgbA84imYd NS4fLh5NtrqnytD93TQZ9Ofws7jYVvfm+CtqEhZhQ0I/O4KHz/akqUHFMqQr4TDw jr4WdSGFM7Z1uwnQntMFi6HOAo21X6P6jnsKL9p4yv9pTTrSRnUynY1q9dM= =wP8P -----END PGP PUBLIC KEY BLOCK-----
| |