lkml.org 
[lkml]   [1998]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSmall yet helpful patch for SMP experiments
After having installed a second processer I noticed that it's hard to
have both an smp 2.0.35 kernel and a non-smp 2.0.35 kernel when they're
modularized. Modules are installed in the same directory and non-smp
modules can be loaded in an smp kernel with horrible results.

The attached patch/diff fixes this problem by changing the 2.0.35
Makefile. It names a non-smp kernel just 2.0.35, but the smp-kernel is
called 2.0.35S. This results in modules that are installed in
/lib/modules/2.0.35S/ instead of /lib/modules/2.0.35/. This way both
kernels can coexist peacefully.

Go to the /usr/src/linux directory and apply the patch:

patch < Makefile.diff.
--- Makefile.orig Sat Sep 5 22:57:29 1998
+++ Makefile Sat Sep 5 22:57:37 1998
@@ -9,6 +9,11 @@
# because it makes re-config very ugly and too many fundamental files depend
# on "CONFIG_SMP"
#
+# Added different kernel naming for SMP and non-SMP kernels. This allows
+# modules for SMP and non-SMP versions of the same kernel to coexist, hence
+# allowing both an SMP and a non SMP versions of he same kernel to coexist
+# 5-sep-98 Rolf Fokkens fokkensr@vertis.nl
+#
# NOTE! SMP is experimental. See the file Documentation/SMP.txt
#
# SMP = 1
@@ -16,6 +21,12 @@
# SMP profiling options
# SMP_PROF = 1

+ifdef SMP
+SMP_RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)S
+else
+SMP_RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
+endif
+
.EXPORT_ALL_VARIABLES:

CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -236,7 +247,7 @@
@mv -f .ver $@

include/linux/version.h: ./Makefile
- @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
+ @echo \#define UTS_RELEASE \"$(SMP_RELEASE)\" > .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
@mv -f .ver $@

@@ -281,7 +292,7 @@

modules_install:
@( \
- MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL); \
+ MODLIB=/lib/modules/$(SMP_RELEASE); \
cd modules; \
MODULES=""; \
inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \
\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.065 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site