[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel flavors (Re: boot-time kernel selection)


	If this FLAVOUR variable is acceptable, I can have
 kernel-package look for it in the Makefile and act upon it. (I think
 I like this already;-).

	I also propose to remove the System.map symlink in /, since
 top, ps, and klogd do understand /boot/System.map-`uname -r` (I do
 intend to continue to keep /boot/System.map-`uname -r`).

	This looks like a win-win solution, unless someone sees an
 objection ...


>>"Noel" == Noel Maddy <ncm@biostat.hfh.edu> writes:

Noel> On  1 Aug 1997, Bill Mitchell wrote:
Bill> Neither of these, however, seem to address an expressed need
Bill> from kernel hackers to have several alternative flavors of a
Bill> single kernel version around.
Bill> Perhaps the proper way to address this need would be for the
Bill> kernel hackers to modify the SUBLEVEL definition in
Bill> /usr/src/kernel/linux/Makefile to read e.g., "SUBLEVEL =
Bill> 30-speed_hack" (or some such) before building the kernel.  That
Bill> should get the kernel installed as
Bill> /boot/vmlinuz-2.0.30-speed_hack, and get `uname -r` to say
Bill> "2.0.30-speed_hack", and should allow differentiation between
Bill> alternative kernels.  (I haven't tried this because I'm
Bill> currently unable to build kernels, but it looks to me like
Bill> that's the way it would work).

Noel> Close, but SUBLEVEL needs to stay numeric, so it's just a tad
Noel> more involved.

Noel> I was twiddling with GGI a while back, and wanted this very
Noel> thing... now I don't have the kernel sources (or the room), but
Noel> if I remember correctly, this is what I did to linux/Makefile.
Noel> It adds the FLAVOR to the end of UTS_RELEASE, which uname then
Noel> reads properly.  However, I remember having to look through the
Noel> rest of the kernel source--I'm not sure whether I found anywhere
Noel> that UTS_RELEASE was parsed, but it's probably worth checking
Noel> again.

	I don't think so (this is on kernel-version 2.1.47)
__> find . -type f | xargs egrep -n UTS_RELEASE
./Makefile:247: @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
./init/version.c:29:    "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
./include/linux/config.h:26: * The definitions for UTS_RELEASE and UTS_VERSION are now defined
./include/linux/module.h:191:"kernel_version=" UTS_RELEASE;
./include/asm-sparc/linux_logo.h:24:#define linux_logo_banner "Linux/SPARC version " UTS_RELEASE
./include/asm-sparc64/linux_logo.h:24:#define linux_logo_banner "Linux/UltraSPARC version " UTS_RELEASE
./drivers/net/smc9194.c:169:char kernel_version[] = UTS_RELEASE;
./drivers/net/eepro100.c:1681:char kernel_version[] = UTS_RELEASE;
./drivers/block/floppy.c:4205:  printk(KERN_INFO "inserting floppy driver for " UTS_RELEASE "\n");
./drivers/char/rocket.c:151:/*static*/ char kernel_version[] = UTS_RELEASE;
./drivers/char/ftape/kernel-interface.c:134:           KERN_INFO " Compiled for kernel version " UTS_RELEASE
./drivers/char/epca.c:89:char kernel_version[]=UTS_RELEASE;
./drivers/sound/soundcard.c:399:char            kernel_version[] = UTS_RELEASE;
./drivers/cdrom/mcdx.c:1173:    xwarn("Version 2.14(hs) for " UTS_RELEASE "\n");
./drivers/sbus/char/suncons.c:394:      sprintf (buffer, linux_serial_image, UTS_RELEASE);
./arch/i386/boot/setup.S:609:kernel_version:    .ascii  UTS_RELEASE
./arch/alpha/boot/main.c:211:   printk("Linux/AXP bootloader for Linux " UTS_RELEASE "\n");

Noel> Anyway, try this and see...

--- linux/Makefile.orig	Fri Aug  1 10:25:45 1997
+++ linux/Makefile	Fri Aug  1 10:24:54 1997
@@ -2,6 +2,18 @@
+# If you want to have more than one kernel configuration per
+# kernel version, set FLAVOR -- it will be appended to
+# UTS_RELEASE in version.h (separated by a hyphen)
+ifneq ($(strip $(FLAVOR)),)
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
@@ -240,7 +252,7 @@
 	@mv -f .ver $@
 include/linux/version.h: ./Makefile
-	@echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > 
VOR)\" > .ver
 	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + 
$(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
 	@mv -f .ver $@
@@ -285,7 +297,7 @@
 	@( \
 	cd modules; \
 	MODULES=""; \
 	inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \

 "Is this foreplay?" "No, this is Nuke Strike.  Foreplay has lousy
 graphics.  Beat me again." Duckert, in "Bad Rubber," Albedo #0
Manoj Srivastava               <url:mailto:srivasta@acm.org>
Mobile, Alabama USA            <url:http://www.datasync.com/%7Esrivasta/>

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: