diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/monitor.pm | 1 | ||||
-rw-r--r-- | perl-install/Xconfig/xfree.pm | 11 | ||||
-rw-r--r-- | perl-install/common.pm | 6 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 4 | ||||
-rw-r--r-- | perl-install/keyboard.pm | 2 |
5 files changed, 18 insertions, 6 deletions
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm index 76fc6e13e..ccd9b4c50 100644 --- a/perl-install/Xconfig/monitor.pm +++ b/perl-install/Xconfig/monitor.pm @@ -10,6 +10,7 @@ use log; sub good_default_monitor() { + is_xbox() ? 'Generic|640x480 @ 60 Hz' : arch() =~ /ppc/ ? (detect_devices::get_mac_model() =~ /^iBook/ ? 'Apple|iBook 800x600' : 'Apple|iMac/PowerBook 1024x768') : (detect_devices::isLaptop() ? 'Generic|Flat Panel 1024x768' : 'Generic|1024x768 @ 70 Hz'); diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm index 09f70dedf..d66c6634d 100644 --- a/perl-install/Xconfig/xfree.pm +++ b/perl-install/Xconfig/xfree.pm @@ -509,6 +509,17 @@ Section "ServerFlags" #DontZap # disable <Crtl><Alt><BS> (server abort) #DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching) AllowMouseOpenFail # allows the server to start up even if the mouse does not work +END + +$default_header .= <<'END_XBOX' if is_xbox(); + Option "PciProbe1" "false" + Option "PciProbe2" "false" + Option "PciForceConfig1" "false" + Option "PciForceConfig2" "false" + Option "PciOsConfig" "true" +END_XBOX + +$default_header .= <<'END'; EndSection END diff --git a/perl-install/common.pm b/perl-install/common.pm index f6ff2b64e..6a1f48675 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -9,7 +9,7 @@ use vars qw(@ISA @EXPORT $SECTORSIZE); @ISA = qw(Exporter); # no need to export ``_'' -@EXPORT = qw($SECTORSIZE N N_ check_for_xserver files_exist formatTime formatXiB makedev mandrake_release removeXiBSuffix require_root_capability salt setVirtual set_alternative set_permissions translate unmakedev untranslate); +@EXPORT = qw($SECTORSIZE N N_ check_for_xserver files_exist formatTime formatXiB is_xbox makedev mandrake_release removeXiBSuffix require_root_capability salt setVirtual set_alternative set_permissions translate unmakedev untranslate); # perl_checker: RE-EXPORT-ALL push @EXPORT, @MDK::Common::EXPORT; @@ -257,6 +257,10 @@ sub check_for_xserver() { return $::xtest; } +sub is_xbox() { + return any { $_->{vendor} . $_->{id} == hex('10de') . hex('02a5') } detect_devices::pci_probe(); +} + #- special unpack #- - returning an array refs for each element like "s10" #- - handling things like s10* at the end of the format diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index dd5d4a798..2528256b4 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -784,10 +784,6 @@ sub get_mac_generation() { cat_('/proc/cpuinfo') =~ /^pmac-generation\s*:\s*(.*)/m ? $1 : "Unknown Generation"; } -sub is_xbox() { - any { $_->{vendor} == 0x10de && $_->{id} == 0x02a5 } detect_devices::pci_probe(); -} - sub hasSMP() { return if $::testing; c::detectSMP() || any { /\bProcessor #(\d+)\s+(\S*)/ && $1 > 0 && $2 ne 'invalid' } syslog(); diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 6791d5e36..f1374b2bb 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -360,7 +360,7 @@ sub KEYBOARD2text { $keyboards{$_[0]} && $keyboards{$_[0]}[0] } sub keyboards() { map { { KEYBOARD => $_ } } keys %keyboards } sub keyboard2one { my ($keyboard, $nb) = @_; - ref $keyboard or internal_error(); + ref $keyboard or is_xbox() ? return undef : internal_error(); my $l = $keyboards{$keyboard->{KEYBOARD}} or return; $l->[$nb]; } |