From 94b3d991f8bdadf1519c556e3b8e02a0f1816b8a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 16 Nov 2004 14:23:46 +0000 Subject: update ppc kernel modules detection & loading --- perl-install/detect_devices.pm | 2 ++ perl-install/modules.pm | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index f0456bdc7..e1f585a0d 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -831,6 +831,8 @@ sub usbMice() { grep { $_->{media_type} =~ /\|Mouse/ && $_->{driver} !~ /wa sub usbWacom() { grep { $_->{driver} =~ /wacom/ } usb_probe() } sub usbKeyboards() { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() } sub usbStorage() { grep { $_->{media_type} =~ /Mass Storage\|/ } usb_probe() } +sub has_mesh() { find { /mesh/ } all_files_rec("/proc/device-tree") } +sub has_53c94() { find { /53c94/ } all_files_rec("/proc/device-tree") } sub usbKeyboard2country_code { my ($usb_kbd) = @_; diff --git a/perl-install/modules.pm b/perl-install/modules.pm index e2b2e363c..bacc9a955 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -125,11 +125,13 @@ sub load_category { if_(arch() !~ /ppc/, 'parport_pc', 'imm', 'ppa'), if_(detect_devices::usbStorage(), 'usb-storage'), ), - if_(arch() =~ /ppc/, - if_($category =~ /scsi/, 'mesh', 'mac53c94'), + arch() =~ /ppc/ ? ( + if_($category =~ /scsi/, + if_(detect_devices::has_mesh(), 'mesh'), + if_(detect_devices::has_53c94(), 'mac53c94'), + ), if_($category =~ /net/, 'bmac', 'gmac', 'mace', 'airport'), - if_($category =~ /sound/, 'dmasound_pmac'), - ), + ) : (), ); grep { $o_wait_message->($_->{description}, $_->{driver}) if $o_wait_message; @@ -148,6 +150,9 @@ sub probe_category { my @modules = category2modules($category); + if_($category =~ /sound/ && arch() =~ /ppc/ && detect_devices::get_mac_model() !~ /IBM/, + { driver => 'snd-powermac', description => 'Macintosh built-in' }, + ), grep { if ($category eq 'network/isdn') { my $b = $_->{driver} =~ /ISDN:([^,]*),?([^,]*)(?:,firmware=(.*))?/; -- cgit v1.2.1