Frans Pop <[EMAIL PROTECTED]> writes:

> On Monday 18 February 2008, Grant Grundler wrote:
>> Runtime test for the hppa installer might be to scrounge in
>> /sys/bus/parisc/devices for "hw_type" contains "0x00".
>>
>> e.g.:
>> j6k:~# fgrep 0x00 /sys/bus/parisc/devices/*/hw_type
>> /sys/bus/parisc/devices/32/hw_type:0x00
>> /sys/bus/parisc/devices/34/hw_type:0x00
>
> Yes, that seems like it could be a reliable test. At least it works on my 
> PARISC box too. I'll implement something in base-installer.

I did it just after answer his mail and was going to ask someone to
test. Could you see the attached patch?

diff --git a/packages/base-installer/debian/changelog 
b/packages/base-installer/debian/changelog
index f1ee8d4..8ddfa62 100644
--- a/packages/base-installer/debian/changelog
+++ b/packages/base-installer/debian/changelog
@@ -1,10 +1,15 @@
 base-installer (1.88) UNRELEASED; urgency=low
 
+  [ Joey Hess ]
   * Demote Transmeta Crusoe systems to use the 486 kernel.
     Based on #464962, Crusoe lacks support for a long NOP instruction,
     which gcc has begun using when optimising for the 686.
 
- -- Joey Hess <[EMAIL PROTECTED]>  Tue, 12 Feb 2008 18:04:46 -0500
+  [ Otavio Salvador ]
+  * Improve hppa SMP kernel test. Thanks to Grant Grundler for his
+    suggestions.
+
+ -- Otavio Salvador <[EMAIL PROTECTED]>  Mon, 18 Feb 2008 09:58:00 -0300
 
 base-installer (1.87) unstable; urgency=low
 
diff --git a/packages/base-installer/kernel/hppa.sh 
b/packages/base-installer/kernel/hppa.sh
index 476b7a6..ac8265c 100644
--- a/packages/base-installer/kernel/hppa.sh
+++ b/packages/base-installer/kernel/hppa.sh
@@ -14,8 +14,7 @@ arch_check_usable_kernel () {
 }
 
 arch_get_kernel () {
-       CPUS="$(grep ^processor "$CPUINFO" | tail -n 1 | cut -d: -f2)"
-       if [ -z "$CPUS" ] || [ "$CPUS" -ne 0 ]; then
+       if grep -q 0x00 /sys/bus/parisc/devices/*/hw_type; then
                echo "linux-image-$KERNEL_MAJOR-$1-smp"
        fi
        echo "linux-image-$KERNEL_MAJOR-$1"


-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [EMAIL PROTECTED]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to