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

Re: [PATCHES] 686-bigmem/Xen enabled netboot images



On Sat, 2008-07-12 at 21:11 +0200, Frans Pop wrote:
> On Saturday 12 July 2008, Ian Campbell wrote:
> > > As these modules are only going to be used with the i386 -bigmem
> > > kernel and even only exist there, I wonder if we want them in
> > > kernel-wedge.
> >
> > They will eventually be needed for the amd64 kernels too, although
> > probably not in time for Lenny. There's also a port of Xen to IA64
> > which is fairly active and just starting to go into the upstream
> > kernel, again probably not for Lenny though.
> 
> That's still only a minority of arches where it's actually used.

Sure. I'll take them out of kernel-wedge and add to the i386 kernel udeb
source directly.

My patch to kernel-wedge is now trivially to serial-modules:
        -generic_serial
        +generic_serial ?
(plus changelog etc).

> > What about retasking the new virtio udebs into virtuali{s,z}ion (or
> > just virt) and adding them there?
> 
> That could work, but I suspect it could result in a dependency mess. You 
> can either check /lib/modules/<ver>/modules.dep to see how bad it is or 
> just try it. If these modules do not depend on anything much then this 
> could be a good option.

The xen-{blk,net}front.ko modules currently don't depend on any others
so it should be fairly clean. What do you think?

I guess I'd need to add this udeb to the pkglist for the i386 netboot.
Currently there is 52k worth of modules in there and the xen ones would
add another 45k. Currently adding the net one to nic-modules as I do now
adds 26k with another 19k for the blk driver being loaded later.

> > Other distros (and *bsd etc) would tend to call it either xen or
> > xenpae, I think, rather than bigmem (which is something of a Debianism)
> > -- what do you think of those names?
> 
> I don't have any problem with either of those. As mentioned before, IMO 
> that the fact it uses the -bigmem kernel is only incidental to its 
> purpose. Main thing is to be clear to users.

I've gone with EXTRANAME=netboot/xen. I decided that since non-PAE
support is gone upsteam using e.g. xenpae would be redundant in the long
run, so might as well drop it now.

> No need for the full set. Just base-installer and maybe kernel-wedge will 
> do I think. We'll do quick checks of the final changes anyway based on 
> the commit mails that get sent out.

The kernel-wedge patch is now trivial as mentioned above. I've included
the base-installer (on top of #490542, called bigmem.patch) and
linux-kernel-di...patch and the main installer.patch again.

I will comment out netboot-xen from MEDIUM_SUPPORTED until the udebs are
uploaded.

I've used the "set" trick which was recently removed from
base-installer again. I could duplicate the echo 686 or add an ||
686-bigmem check to the 686 test if you would prefer.

Ian.
-- 
Ian Campbell

You know, Callahan's is a peaceable bar, but if you ask that dog what his
favorite formatter is, and he says "roff! roff!", well, I'll just have to...
Index: kernel/README
===================================================================
--- kernel/README.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/README	2008-07-12 18:20:34.000000000 +0000
@@ -61,6 +61,8 @@
     The major version of the running kernel, e.g. 2.6.
   KERNEL_VERSION
     The full version of the running kernel, e.g. 2.6.8.
+  KERNEL_FLAVOUR
+    The flavour of the running kernel, e.g. 486, 686-bigmem or ixp4xx.
   MACHINE
     The machine hardware name (as returned by uname -m).
   NUMCPUS
Index: kernel/tests/i386/cittagazze.test
===================================================================
--- kernel/tests/i386/cittagazze.test.orig	2008-07-12 18:06:03.000000000 +0000
+++ kernel/tests/i386/cittagazze.test	2008-07-12 18:21:38.000000000 +0000
@@ -11,3 +11,4 @@
   linux-image-2.6.25-1-486 \
   linux-image-2.6.25-1-686 \
   linux-image-2.6.25-1-686-bigmem
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/via-c7-Samuel.test
===================================================================
--- kernel/tests/i386/via-c7-Samuel.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/via-c7-Samuel.test	2008-07-12 18:20:34.000000000 +0000
@@ -15,3 +15,4 @@
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/via-c7-Esther.test
===================================================================
--- kernel/tests/i386/via-c7-Esther.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/via-c7-Esther.test	2008-07-12 18:20:34.000000000 +0000
@@ -16,3 +16,4 @@
 unusable \
   linux-image-2.6-k7 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/oqo1.test
===================================================================
--- kernel/tests/i386/oqo1.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/oqo1.test	2008-07-12 18:20:34.000000000 +0000
@@ -14,3 +14,4 @@
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-3.test
===================================================================
--- kernel/tests/i386/pentium-3.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/pentium-3.test	2008-07-12 18:20:34.000000000 +0000
@@ -15,3 +15,4 @@
 unusable \
   linux-image-2.6-k7 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-d-2p.test
===================================================================
--- kernel/tests/i386/pentium-d-2p.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/pentium-d-2p.test	2008-07-12 18:20:34.000000000 +0000
@@ -15,3 +15,4 @@
 unusable \
   linux-image-2.6-k7 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium.test
===================================================================
--- kernel/tests/i386/pentium.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/pentium.test	2008-07-12 18:20:34.000000000 +0000
@@ -15,3 +15,4 @@
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-4M-bigmem.test
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ kernel/tests/i386/pentium-4M-bigmem.test	2008-07-12 18:27:22.000000000 +0000
@@ -0,0 +1,20 @@
+cpuinfo pentium-4M.cpuinfo
+machine i686
+majors 2.6
+flavour 686-bigmem
+env SPEAKUP /nonexistent
+kernel-2.6 \
+  linux-image-2.6-686-bigmem \
+  linux-image-2.6-686 \
+  linux-image-2.6-486
+usable \
+  linux-image-2.6-486 \
+  linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
+  linux-image-2.6.18-1-486 \
+  linux-image-2.6.18-1-686 \
+  linux-image-2.6.18-1-686-bigmem
+unusable \
+  linux-image-2.6-k7 \
+  linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 686-bigmem
Index: kernel/tests/i386/pentium-4M.test
===================================================================
--- kernel/tests/i386/pentium-4M.test.orig	2008-07-12 18:05:58.000000000 +0000
+++ kernel/tests/i386/pentium-4M.test	2008-07-12 18:20:34.000000000 +0000
@@ -16,3 +16,4 @@
 unusable \
   linux-image-2.6-k7 \
   linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/i386.sh
===================================================================
--- kernel/i386.sh.orig	2008-07-12 18:06:03.000000000 +0000
+++ kernel/i386.sh	2008-07-12 18:24:22.000000000 +0000
@@ -2,16 +2,26 @@
 	VENDOR=`grep '^vendor_id' "$CPUINFO" | head -n1 | cut -d: -f2`
 	FAMILY=`grep '^cpu family' "$CPUINFO" | head -n1 | cut -d: -f2`
 	MODEL=`grep '^model[[:space:]]*:' "$CPUINFO" | head -n1 | cut -d: -f2`
+
+	# Only offer bigmem is the system supports pae and the
+	# installer itself is already using a bigmem kernel.
+	if grep '^flags' "$CPUINFO" | grep -q pae ; then
+	    case "$KERNEL_FLAVOUR" in
+		686-bigmem*) BIGMEM="-bigmem" ;;
+		*) ;;
+	    esac
+	fi
+
 	case "$VENDOR" in
 	    " AuthenticAMD"*)
 		case "$FAMILY" in
-		    " 15")	echo 686 ;;	# k8
-		    " 6")			# k7
+		    " 15")	echo 686$BIGMEM ;;	# k8
+		    " 6")				# k7
 			case "$MODEL" in
 			    " 0"|" 1"|" 2"|" 3"|" 4"|" 5")
 				# May not have SSE support
 				echo 486 ;;
-			    *)	echo 686 ;;
+			    *)	echo 686$BIGMEM ;;
 			esac
 			;;
 		    *)		echo 486 ;;
@@ -19,7 +29,7 @@
 		;;
 	    " GenuineIntel")
 		case "$FAMILY" in
-		    " 6"|" 15")	echo 686 ;;
+		    " 6"|" 15")	echo 686$BIGMEM ;;
 		    *)		echo 486 ;;
 		esac
 		;;
@@ -27,7 +37,7 @@
 		case "$FAMILY" in
 		    " 6")
 			case "$MODEL" in
-			    " 9"|" 10")	echo 686 ;;
+			    " 9"|" 10")	echo 686$BIGMEM ;;
 			    *)		echo 486 ;;
 			esac
 			;;
@@ -47,7 +57,7 @@
 	if echo "$1" | grep -Eq -- "-486(-.*)?$"; then return 0; fi
 	if [ "$2" = 486 ]; then return 1; fi
 	if echo "$1" | grep -Eq -- "-686(-.*)?$"; then return 0; fi
-	if [ "$2" = 686 ]; then return 1; fi
+	if [ "$2" = 686 ] || [ "$2" = 686-bigmem ]; then return 1; fi
 
 	# default to usable in case of strangeness
 	warning "Unknown kernel usability: $1 / $2"
@@ -59,6 +69,10 @@
 
 	# See older versions of script for more flexible code structure
 	# that allows multiple levels of fallbacks
+	if [ "$1" = 686-bigmem ]; then
+		echo "$imgbase-$KERNEL_MAJOR-686-bigmem"
+		set 686
+	fi
 	if [ "$1" = 686 ]; then
 		echo "$imgbase-$KERNEL_MAJOR-686"
 	fi
Index: debian/changelog
===================================================================
--- debian/changelog.orig	2008-07-12 18:05:58.000000000 +0000
+++ debian/changelog	2008-07-12 18:20:35.000000000 +0000
@@ -1,3 +1,12 @@
+base-installer (1.93) UNRELEASED; urgency=low
+
+  [ Ian Campbell ]
+  * i386: If the installer is running a -bigmem kernel and the processors
+    support PAE then select a -bigmem kernel for installation. For
+    compatibility with running under Xen.
+
+ -- Ian Campbell <ijc@hellion.org.uk>  Thu, 10 Jul 2008 18:34:25 +0100
+
 base-installer (1.92) unstable; urgency=low
 
   * Call base-installer.d hooks after running debootstrap, for consistency
Index: library.sh
===================================================================
--- library.sh.orig	2008-07-12 18:05:58.000000000 +0000
+++ library.sh	2008-07-12 18:20:35.000000000 +0000
@@ -17,6 +17,7 @@
 KERNEL_MAJOR="$(uname -r | cut -d . -f 1,2)"
 KERNEL_VERSION="$(uname -r | cut -d - -f 1)"
 KERNEL_ABI="$(uname -r | cut -d - -f 1,2)"
+KERNEL_FLAVOUR=$(uname -r | cut -d - -f 3-)
 MACHINE="$(uname -m)"
 NUMCPUS=$(cat /var/numcpus 2>/dev/null) || true
 CPUINFO=/proc/cpuinfo
Index: packages/kernel/linux-kernel-di-i386-2.6/debian/changelog
===================================================================
--- packages/kernel/linux-kernel-di-i386-2.6/debian/changelog	(revision 54290)
+++ packages/kernel/linux-kernel-di-i386-2.6/debian/changelog	(working copy)
@@ -3,6 +3,11 @@
   [ Jérémy Bobbio ]
   * Add virtio-modules.
 
+  [ Ian Campbell ]
+  * Build -686-bigmem udebs and include xen-{net,blk}front.ko modules in
+    relevant udebs. These are needed for the installer variant which
+    runs on PAE and 64 bit Xen hypervisors.
+
  -- Jérémy Bobbio <lunar@debian.org>  Sat, 05 Jul 2008 22:05:44 +0000
 
 linux-kernel-di-i386-2.6 (1.63) unstable; urgency=low
Index: packages/kernel/linux-kernel-di-i386-2.6/kernel-versions
===================================================================
--- packages/kernel/linux-kernel-di-i386-2.6/kernel-versions	(revision 54290)
+++ packages/kernel/linux-kernel-di-i386-2.6/kernel-versions	(working copy)
@@ -1,2 +1,3 @@
 # arch   version  flavour       installedname        suffix build-depends
 i386     2.6.25-2 486           2.6.25-2-486         -      linux-image-2.6.25-2-486
+i386     2.6.25-2 686-bigmem    2.6.25-2-686-bigmem  -      linux-image-2.6.25-2-686-bigmem
Index: packages/kernel/linux-kernel-di-i386-2.6/modules/i386/nic-modules
===================================================================
--- packages/kernel/linux-kernel-di-i386-2.6/modules/i386/nic-modules	(revision 54290)
+++ packages/kernel/linux-kernel-di-i386-2.6/modules/i386/nic-modules	(working copy)
@@ -1 +1,2 @@
 #include <nic-modules>
+xen-netfront ?
Index: packages/kernel/linux-kernel-di-i386-2.6/modules/i386/scsi-modules
===================================================================
--- packages/kernel/linux-kernel-di-i386-2.6/modules/i386/scsi-modules	(revision 54290)
+++ packages/kernel/linux-kernel-di-i386-2.6/modules/i386/scsi-modules	(working copy)
@@ -1 +1,2 @@
 #include <scsi-modules>
+xen-blkfront ?
Index: installer/build/config/i386.cfg
===================================================================
--- installer/build/config/i386.cfg	(revision 54290)
+++ installer/build/config/i386.cfg	(working copy)
@@ -1,7 +1,8 @@
-MEDIUM_SUPPORTED = cdrom netboot netboot-gtk hd-media #floppy #monolithic
+MEDIUM_SUPPORTED = cdrom netboot netboot-gtk netboot-xen hd-media #floppy #monolithic
 
 # The version of the kernel to use.
-KERNELVERSION = 2.6.25-2-486
+BASEVERSION = 2.6.25-2
+KERNELVERSION = $(BASEVERSION)-486
 KERNELMAJOR = 2.6
 KERNEL_FLAVOUR = di
 KERNELNAME = vmlinuz
Index: installer/build/config/i386/netboot-xen.cfg
===================================================================
--- installer/build/config/i386/netboot-xen.cfg	(revision 0)
+++ installer/build/config/i386/netboot-xen.cfg	(revision 0)
@@ -0,0 +1,7 @@
+KERNELVERSION = $(BASEVERSION)-686-bigmem
+TYPE=netboot
+include config/i386/netboot.cfg
+EXTRANAME=netboot/xen/
+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server (Xen)"
+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory (Xen)"
+MANIFEST-MINIISO = "tiny CD image that boots the netboot installer (Xen)"

Property changes on: installer/build/config/i386/netboot-xen.cfg
___________________________________________________________________
Added: svn:mergeinfo

Index: installer/debian/changelog
===================================================================
--- installer/debian/changelog	(revision 54290)
+++ installer/debian/changelog	(working copy)
@@ -1,4 +1,4 @@
-debian-installer (2008xxxx) UNRELEASED; urgency=low
+ebian-installer (2008xxxx) UNRELEASED; urgency=low
 
   [ Frans Pop ]
   * Test that a mirror supports the target suite before it's added to
@@ -42,6 +42,10 @@
   * Add ext2-modules for i386 boot floppy as ext2 is no longer built in.
   * Move hppa to 2.6.25.
 
+  [ Ian Campbell ]
+  * Add i386 netboot-xen flavour using PAE enabled kernel compatible with PAE
+    and 64 bit hypervisors.
+
   [ Bastian Blank ]
   * Move s390 to 2.6.25.
 

Reply to: