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

Bug#589579: marked as done (debian-installer: i386 kernel flavour selection is poor)



Your message dated Sat, 04 Sep 2010 05:32:07 +0000
with message-id <E1OrlMF-00066N-J9@franck.debian.org>
and subject line Bug#589579: fixed in base-installer 1.110
has caused the Debian Bug report #589579,
regarding debian-installer: i386 kernel flavour selection is poor
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
589579: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589579
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: debian-installer
Tags: squeeze patch

There are several problems with the current selection:
1. 686-bigmem is not preferred when there is RAM above 4GB
2. 686-bigmem is not always offered where it is usable, and amd64 is
never offered
3. The 686 flavour is considered unsuitable for some AMD K7 processors

Problem 3 appears to be due to a workaround for an incorrect kernel
configuration.  The comment on this exclusion is 'May not have SSE
support', but this has never been a requirement for the 686 flavour.
(The Pentium Pro and Pentium II don't have SSE either.)

This patch rewrites the flavour selection so that:
1. 686-bigmem is preferred when there is RAM above 4GB, otherwise 686 is
preferred
2. All usable flavours are offered
3. The 686 flavour is considered suitable for all K7 processors

It updates the tests accordingly, adding amd64 to the usable/unusable
flavours lists and adding a test case for RAM above 4GB.

Ben.

Index: packages/base-installer/kernel/i386.sh
===================================================================
--- packages/base-installer/kernel/i386.sh	(revision 63990)
+++ packages/base-installer/kernel/i386.sh	(working copy)
@@ -1,45 +1,94 @@
 arch_get_kernel_flavour () {
-	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`
+	# Should we offer an amd64 kernel?
+	local HAVE_LM
+	if grep -q '^flags.*\blm\b' "$CPUINFO"; then
+		HAVE_LM=y
+	else
+		HAVE_LM=n
+	fi
 
-	# Only offer bigmem if 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
+	# Should we offer a bigmem kernel?
+	local HAVE_PAE
+	if grep -q '^flags.*\bpae\b' "$CPUINFO"; then
+		HAVE_PAE=y
+	else
+		HAVE_PAE=n
 	fi
 
+	# Should we prefer a bigmem/amd64 kernel - is there RAM above 4GB?
+	local WANT_PAE
+	if [ -z "$RAM_END" ]; then
+		local MAP MAP_END
+		RAM_END=0
+		for MAP in /sys/firmware/memmap/* ; do
+			if [ "$(cat $MAP/type)" = "System RAM" ]; then
+				MAP_END="$(cat $MAP/end)"
+				if [ $(($MAP_END > $RAM_END)) = 1 ]; then
+					RAM_END=$MAP_END
+				fi
+			fi
+		done
+	fi
+	if [ $(($RAM_END > 0x100000000)) = 1 ]; then
+		WANT_PAE=y
+	else
+		WANT_PAE=n
+	fi
+	# or is the installer running a 686-bigmem kernel?
+	case "$KERNEL_FLAVOUR" in
+	    686-bigmem*)
+		WANT_PAE=y
+		;;
+	esac
+
+	case "$HAVE_LM$HAVE_PAE$WANT_PAE" in
+	    yyy)
+		echo 686-bigmem amd64 686 486
+		return 0
+		;;
+	    yyn)
+		echo 686 686-bigmem amd64 486
+		return 0
+		;;
+	    yn?)
+		warning "Processor with LM but no PAE???"
+		;;
+	    nyy)
+		echo 686-bigmem 686 486
+		return 0
+		;;
+	    nyn)
+		echo 686 686-bigmem 486
+		return 0
+		;;
+	    nn?)
+		# Need to check whether 686 is suitable
+		;;
+	esac
+
+	local VENDOR FAMILY MODEL
+	VENDOR=$(sed -n 's/^vendor_id\s*: //; T; p; q' "$CPUINFO")
+	FAMILY=$(sed -n 's/^cpu family\s*: //; T; p; q' "$CPUINFO")
+	MODEL=$(sed -n 's/^model\s*: //; T; p; q' "$CPUINFO")
+
 	case "$VENDOR" in
-	    " AuthenticAMD"*)
+	    AuthenticAMD*)
 		case "$FAMILY" in
-		    " 15"|" 16"|" 17")			# k8
-			echo 686$BIGMEM
-			;;
-		    " 6")				# k7
-			case "$MODEL" in
-			    " 0"|" 1"|" 2"|" 3"|" 4"|" 5")
-				# May not have SSE support
-				echo 486 ;;
-			    *)	echo 686$BIGMEM ;;
-			esac
-			;;
+		    6|15|16|17)	echo 686 486 ;;
 		    *)		echo 486 ;;
 		esac
 		;;
-	    " GenuineIntel")
+	    GenuineIntel)
 		case "$FAMILY" in
-		    " 6"|" 15")	echo 686$BIGMEM ;;
+		    6|15)	echo 686 486 ;;
 		    *)		echo 486 ;;
 		esac
 		;;
-	    " CentaurHauls")
+	    CentaurHauls)
 		case "$FAMILY" in
-		    " 6")
+		    6)
 			case "$MODEL" in
-			    " 9"|" 10")	echo 686$BIGMEM ;;
+			    9|10)	echo 686 486 ;;
 			    *)		echo 486 ;;
 			esac
 			;;
@@ -53,30 +102,34 @@
 	return 0
 }
 
-# Note: the -k7 flavor has been dropped with linux-2.6 (2.6.23-1)
-
 arch_check_usable_kernel () {
-	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 ] || [ "$2" = 686-bigmem ]; then return 1; fi
+	local NAME="$1"
 
-	# default to usable in case of strangeness
-	warning "Unknown kernel usability: $1 / $2"
-	return 0
+	set -- $2
+	while [ $# -ge 1 ]; do
+		case "$NAME" in
+		    *-"$1")
+			return 0;
+			;;
+		    *-"$1"-bigmem*)
+			# Don't allow -bigmem suffix
+			;;
+		    *-"$1"-*)
+			# Do allow any other hyphenated suffix
+			return 0
+			;;
+		esac
+		shift
+	done
+	return 1
 }
 
 arch_get_kernel () {
-	imgbase=linux-image
+	imgbase="linux-image-$KERNEL_MAJOR"
 
-	# 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
-	echo "$imgbase-$KERNEL_MAJOR-486"
+	set -- $1
+	while [ $# -ge 1 ]; do
+		echo "$imgbase-$1"
+		shift
+	done
 }
Index: packages/base-installer/kernel/tests/i386/cittagazze.test
===================================================================
--- packages/base-installer/kernel/tests/i386/cittagazze.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/cittagazze.test	(working copy)
@@ -1,8 +1,9 @@
 cpuinfo cittagazze.cpuinfo
 majors 2.6
-flavour 686
+flavour 686 686-bigmem 486
 kernel-2.6 \
   linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
@@ -11,4 +12,8 @@
   linux-image-2.6.25-1-486 \
   linux-image-2.6.25-1-686 \
   linux-image-2.6.25-1-686-bigmem
+unusable \
+  linux-image-2.6-amd64 \
+  linux-image-2.6.25-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x10000000
Index: packages/base-installer/kernel/tests/i386/via-c7-Samuel.test
===================================================================
--- packages/base-installer/kernel/tests/i386/via-c7-Samuel.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/via-c7-Samuel.test	(working copy)
@@ -11,7 +11,10 @@
   linux-image-2.6-686-bigmem \
   linux-image-2.6-686 \
   linux-image-2.6-k7 \
+  linux-image-2.6-686-amd64 \
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6-18-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x4000000
Index: packages/base-installer/kernel/tests/i386/via-c7-Esther.test
===================================================================
--- packages/base-installer/kernel/tests/i386/via-c7-Esther.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/via-c7-Esther.test	(working copy)
@@ -1,9 +1,10 @@
 cpuinfo via-c7-Esther.cpuinfo
 machine i686
 majors 2.6
-flavour 686
+flavour 686 686-bigmem 486
 kernel-2.6 \
   linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
@@ -14,4 +15,7 @@
   linux-image-2.6.18-1-686
 unusable \
   linux-image-2.6-k7 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6-amd64 \
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
+env RAM_END 0x4000000
Index: packages/base-installer/kernel/tests/i386/oqo1.test
===================================================================
--- packages/base-installer/kernel/tests/i386/oqo1.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/oqo1.test	(working copy)
@@ -10,7 +10,10 @@
   linux-image-2.6-686-bigmem \
   linux-image-2.6-686 \
   linux-image-2.6-k7 \
+  linux-image-2.6-amd64 \
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x4000000
Index: packages/base-installer/kernel/tests/i386/pentium-3.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium-3.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/pentium-3.test	(working copy)
@@ -1,8 +1,9 @@
 cpuinfo pentium-3.cpuinfo
 majors 2.6
-flavour 686
+flavour 686 686-bigmem 486
 kernel-2.6 \
   linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
@@ -13,5 +14,8 @@
   linux-image-2.6.18-1-686
 unusable \
   linux-image-2.6-k7 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6-amd64 \
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x10000000
Index: packages/base-installer/kernel/tests/i386/pentium-d-2p.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium-d-2p.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/pentium-d-2p.test	(working copy)
@@ -1,17 +1,22 @@
 cpuinfo pentium-d-2p.cpuinfo
 majors 2.6
-flavour 686
+flavour 686 686-bigmem amd64 486
 kernel-2.6 \
   linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
+  linux-image-2.6-amd64 \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
   linux-image-2.6-686-bigmem \
+  linux-image-2.6-amd64 \
   linux-image-2.6-686 \
   linux-image-2.6.18-1-486 \
   linux-image-2.6.18-1-686-bigmem \
+  linux-image-2.6.18-1-amd64 \
   linux-image-2.6.18-1-686
 unusable \
   linux-image-2.6-k7 \
   linux-image-2.6.18-1-k7
 env KERNEL_FLAVOUR 486
+env RAM_END 0x10000000
Index: packages/base-installer/kernel/tests/i386/pentium.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/pentium.test	(working copy)
@@ -11,7 +11,10 @@
   linux-image-2.6-686-bigmem \
   linux-image-2.6-686 \
   linux-image-2.6-k7 \
+  linux-image-2.6-amd64 \
   linux-image-2.6.18-1-686-bigmem \
   linux-image-2.6.18-1-686 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x4000000
Index: packages/base-installer/kernel/tests/i386/amd-k7-old.test
===================================================================
--- packages/base-installer/kernel/tests/i386/amd-k7-old.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/amd-k7-old.test	(working copy)
@@ -1,13 +1,18 @@
 cpuinfo amd-k7-old.cpuinfo
 majors 2.6
-flavour 486
+flavour 686 686-bigmem 486
 kernel-2.6 \
+  linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
-  linux-image-2.6.25-1-486
-unusable \
   linux-image-2.6-686 \
   linux-image-2.6-686-bigmem \
+  linux-image-2.6.25-1-486 \
   linux-image-2.6.25-1-686 \
   linux-image-2.6.25-1-686-bigmem
+unusable \
+  linux-image-2.6-amd64 \
+  linux-image-2.6.25-1-amd64
+env RAM_END 0x10000000
Index: packages/base-installer/kernel/tests/i386/pentium-4M-bigmem-2.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium-4M-bigmem-2.test	(revision 0)
+++ packages/base-installer/kernel/tests/i386/pentium-4M-bigmem-2.test	(revision 0)
@@ -0,0 +1,22 @@
+cpuinfo pentium-4M.cpuinfo
+machine i686
+majors 2.6
+flavour 686-bigmem 686 486
+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-amd64 \
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
+env KERNEL_FLAVOUR 486
+env RAM_END 0x140000000
Index: packages/base-installer/kernel/tests/i386/pentium-4M-bigmem.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium-4M-bigmem.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/pentium-4M-bigmem.test	(working copy)
@@ -1,7 +1,7 @@
 cpuinfo pentium-4M.cpuinfo
 machine i686
 majors 2.6
-flavour 686-bigmem
+flavour 686-bigmem 686 486
 kernel-2.6 \
   linux-image-2.6-686-bigmem \
   linux-image-2.6-686 \
@@ -15,5 +15,8 @@
   linux-image-2.6.18-1-686-bigmem
 unusable \
   linux-image-2.6-k7 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6-amd64 \
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
 env KERNEL_FLAVOUR 686-bigmem
+env RAM_END 0x10000000
Index: packages/base-installer/kernel/tests/i386/pentium-4M.test
===================================================================
--- packages/base-installer/kernel/tests/i386/pentium-4M.test	(revision 63990)
+++ packages/base-installer/kernel/tests/i386/pentium-4M.test	(working copy)
@@ -1,9 +1,10 @@
 cpuinfo pentium-4M.cpuinfo
 machine i686
 majors 2.6
-flavour 686
+flavour 686 686-bigmem 486
 kernel-2.6 \
   linux-image-2.6-686 \
+  linux-image-2.6-686-bigmem \
   linux-image-2.6-486
 usable \
   linux-image-2.6-486 \
@@ -14,5 +15,8 @@
   linux-image-2.6.18-1-686-bigmem
 unusable \
   linux-image-2.6-k7 \
-  linux-image-2.6.18-1-k7
+  linux-image-2.6-amd64 \
+  linux-image-2.6.18-1-k7 \
+  linux-image-2.6.18-1-amd64
 env KERNEL_FLAVOUR 486
+env RAM_END 0x10000000
Index: packages/base-installer/debian/changelog
===================================================================
--- packages/base-installer/debian/changelog	(revision 63990)
+++ packages/base-installer/debian/changelog	(working copy)
@@ -1,3 +1,13 @@
+base-installer (1.109) UNRELEASED; urgency=low
+
+  [ Ben Hutchings ]
+  * Improve i386 kernel flavour selection:
+    - Prefer 686-bigmem flavour if it is needed to access all RAM
+    - Prefer 686 or 686-bigmem flavour for all AMD K7 processors
+    - Offer 686-bigmem and amd64 flavours for processors that support them
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Sun, 18 Jul 2010 18:16:13 +0100
+
 base-installer (1.108) unstable; urgency=low
 
   [ Martin Michlmayr ]
--- END ---

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
Source: base-installer
Source-Version: 1.110

We believe that the bug you reported is fixed in the latest version of
base-installer, which is due to be installed in the Debian FTP archive:

base-installer_1.110.dsc
  to main/b/base-installer/base-installer_1.110.dsc
base-installer_1.110.tar.gz
  to main/b/base-installer/base-installer_1.110.tar.gz
base-installer_1.110_all.udeb
  to main/b/base-installer/base-installer_1.110_all.udeb
bootstrap-base_1.110_i386.udeb
  to main/b/base-installer/bootstrap-base_1.110_i386.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 589579@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated base-installer package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 04 Sep 2010 07:05:32 +0200
Source: base-installer
Binary: base-installer bootstrap-base
Architecture: source all i386
Version: 1.110
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description: 
 base-installer - base system installation framework (udeb)
 bootstrap-base - Install the base system (udeb)
Closes: 589579
Changes: 
 base-installer (1.110) unstable; urgency=low
 .
   * Team upload.
 .
   [ Ben Hutchings ]
   * Improve i386 kernel flavour selection. Closes: #589579
     - Prefer 686-bigmem flavour if it is needed to access all RAM
     - Prefer 686 or 686-bigmem flavour for all AMD K7 processors
     - Offer 686-bigmem and amd64 flavours for processors that support them
Checksums-Sha1: 
 116c3e2662a767d0115a1a53e34c81dab9d58506 1058 base-installer_1.110.dsc
 5c35b8e19c79df2b6fe696ef26d85be4f29f2c2e 279055 base-installer_1.110.tar.gz
 da3d7ea90bf4f8f5203356f7820aba66f887fe97 42552 base-installer_1.110_all.udeb
 bc34fba96cee97f46ae6fe9bdd47e3400c217c55 169184 bootstrap-base_1.110_i386.udeb
Checksums-Sha256: 
 ac08631f9284f4bba20f01bb54f8fb2cdf00e3fdcc758ee4d2c2df49978eeea4 1058 base-installer_1.110.dsc
 c97ea2c9aa7f246e99e5aab63b15defd53cc59928acf5daeda6316c8d75c40aa 279055 base-installer_1.110.tar.gz
 86faba2fc7be9e58a8a6ff83f589bf9d2fba064223e6dc7a8dbc2673fe3d725e 42552 base-installer_1.110_all.udeb
 6f656b0de01e3b646a71b15114b7cd18209de697525800fcd1ac76b927a23b11 169184 bootstrap-base_1.110_i386.udeb
Files: 
 0e26293edbe97a98da1984ddb3c6832d 1058 debian-installer required base-installer_1.110.dsc
 03cf0f416cafaa982b7b50209b031b44 279055 debian-installer required base-installer_1.110.tar.gz
 a2486fd68e6f5b1c69a680e515dc1629 42552 debian-installer required base-installer_1.110_all.udeb
 0e255b13a2156281dff64a2f2927abd1 169184 debian-installer required bootstrap-base_1.110_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFMgdeG1OXtrMAUPS0RAhsRAJ0VmabHHvFsTUjiGHFJgLszxnm79gCgoMtz
P+G84x0A1QPwYauLAbOyGTo=
=F8Xy
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: