Rik van Riel <H.H.vanRiel@phys.uu.nl> wrote:
> On Mon, 24 Aug 1998, Neil Conway wrote:
>
> > Subject says it mostly. This has been prompted by one too many messages
> > from knowledgeable folk saying things like "use make oldconfig", or "use
> > make bzImage"...
> >
> > Knowing when one does and doesn't need a "make mrproper" or a "make
> > clean" etc. would be kinda useful for know-nothings like me.
>
> OK, I'll write up some nice documentation. Watch out for a
> Documentation/Compiling.txt...
> The document should be ready before this time next week ;)
Could you then include a little not about flavors?
----- s n i p -----
Multiple flavours of the same kernel version
======== ======== == === ==== ====== =======
There is an expressed need from people to have several
alternative flavors of a single kernel version around. It is
certainly useful to have a backup flavour of a kernel version around
when one is experimenting with device driver variations (it may not
be possible to run a different version of a kernel and hence have
that as a backup).
Unfortunately, this is more complicated than it initially
appears, since the presence of possibly incompatible modules has to
be addressed.
Firstly, the modules from different flavours have to be
installed in separate directories, the modutils have to be made aware
of this alternative directory, and also, the kernel (and klogd)
should be able to load the right set of symbols from a System.map
file (which are different enough in different flavours that klogd
refuses to load the wrong one).
The proper way to address this may well be to modify the
kernel version in some fashion (Note: this would involve modifying
the kernel source's top level Makefile). Unfortunately, SUBLEVEL
needs to stay numeric (and under 255, as far as I can tell), so it is
a wee bit more complex than just modifying the SUBLEVEL variable.
The solution seems to be to add a FLAVOUR field to the end of
UTS_RELEASE, which uname then reads properly. As of 2.1.47, this
variable is used purely for output purposes (nothing seems to parse
it).
This way, the user has to modify the kernel Makefile (an sample
patch is provided below) to read, say, "FLAVOUR := speed_hack", and
the kernel would be installed as /boot/vmlinuz-2.0.30-speed_hack, the
modules would be installed under /lib/modules/2.0.30-speed_hack,
uname -r would report the version as 2.0.30-speed_hack.
There is a patch appended to the bottom of this message that
would allow klogd to discover the new System.map file, and to not
choke on the non-numeric kernel version.
The patch provided below is from the Makefile for 2.1.47
kernel, and may not apply cleanly on other Makefiles. It is
recommended that you use it purely as a guideline, and modify the
Makefile manually.
This effort has been based on the ideas and work of Bill
Mitchell <mitchell@mozcom.com> and Noel Maddy <ncm@biostat.hfh.edu>.
======================================================================
--- Makefile.dist Mon Aug 4 12:18:57 1997
+++ Makefile Mon Aug 4 12:24:55 1997
@@ -2,6 +2,22 @@
PATCHLEVEL = 1
SUBLEVEL = 47
+# This is an example only: Uncomment the FLAVOUR line below and name
+# this flavour.
+#
+# If you want to have more than one kernel configuration per kernel
+# version, set FLAVOUR -- it will be appended to UTS_RELEASE in
+# version.h (separated by a hyphen)
+#
+#FLAVOUR = speed_hack
+
+ifneq ($(strip $(FLAVOUR)),)
+INT_FLAV := -$(FLAVOUR)
+else
+INT_FLAV :=
+endif
+
+
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
#
@@ -244,7 +260,7 @@
@mv -f .ver $@
include/linux/version.h: ./Makefile
- @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
+ @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(INT_FLAV)\" > .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
@mv -f .ver $@
@@ -289,7 +305,7 @@
modules_install:
@( \
- MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL); \
+ MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(INT_FLAV); \
cd modules; \
MODULES=""; \
inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \
______________________________________________________________________
One can edit /etc/init.d/syslogd (or however you start klogd)
like so (this is from the Debian init.d directory)
----------------------------------------------------------------------
# Use KLOGD="-k /boot/System.map-$(uname -r)" to specify System.map
#
KLOGD="-k /boot/System.map-$(uname -r)"
....
.... /sbin/klogd $KLOGD
----------------------------------------------------------------------
----- s n i p -----
-- ----------------------------------------------------------------------- Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just ^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are / / | | '_ \| | | \ \/ / papadoc.nocrew.org _ /// / /__| | | | | |_| |> < Turbo Fredriksson turbo@tripnet.se \\\/ \____/_|_| |_|\__,_/_/\_\ Surrey/B.C./Canada (604)572-3523 Debian Certified Linux Developer PGP#788CD1A9 www5.tripnet.se/~turbo ------- PGP: B7 92 93 0E 06 94 D6 22 98 1F 0B 5B FE 33 A1 0B ---------- bomb Soviet jihad PLO Serbian nuclear $400 million in gold bullion explosion arrangements North Korea South Africa Peking Ortega Mossad munitions--pgp-sign-Multipart_Mon_Aug_24_18:49:33_1998-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit
-----BEGIN PGP MESSAGE----- Version: 2.6.3ia Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
iQCVAwUBNeIYLxZ4ByN4jNGpAQHAFwP/btJ4NJ51LAJTARHMK9TQL95T6/0zgiUD Z6rqRiw4dDeMUwCyaBYbp98RG9hRTv4W2rc7rZ+r/fSV5ybrqdgcUfM0baN9qcAZ khjth2spZ4Kv8iPkhYfaqNakHLq0RFMnCcK9Uf9E4wQoOeMtoEJsPM7Mb72UUEOk a/hfAq01IM8= =rAJf -----END PGP MESSAGE-----
--pgp-sign-Multipart_Mon_Aug_24_18:49:33_1998-1--
- 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.altern.org/andrebalsa/doc/lkml-faq.html