diff options
author | Arnaud Patard <rtp@mageia.org> | 2011-03-18 21:33:11 +0000 |
---|---|---|
committer | Arnaud Patard <rtp@mageia.org> | 2011-03-18 21:33:11 +0000 |
commit | 2bfae95a970f4c7284a2484fb967bbf9174c2cc6 (patch) | |
tree | 0ee61668e342609cc56f0755d5edd2277e66aef3 /perl-install/detect_devices.pm | |
parent | eea2f8ef9ddf7e461702d8fda0b8e98e623694c2 (diff) | |
download | drakx-2bfae95a970f4c7284a2484fb967bbf9174c2cc6.tar drakx-2bfae95a970f4c7284a2484fb967bbf9174c2cc6.tar.gz drakx-2bfae95a970f4c7284a2484fb967bbf9174c2cc6.tar.bz2 drakx-2bfae95a970f4c7284a2484fb967bbf9174c2cc6.tar.xz drakx-2bfae95a970f4c7284a2484fb967bbf9174c2cc6.zip |
- import stage1/drakxtools mips support
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 40a1b8236..c8995ea82 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -54,6 +54,9 @@ sub floppies { require modules; state @fds; state $legacy_already_detected; + if (arch =~ /mips/) { + $o_not_detect_legacy_floppies = 1; + } if (!$o_not_detect_legacy_floppies && !$legacy_already_detected) { $legacy_already_detected = 1; eval { modules::load("floppy") if $::isInstall }; @@ -574,7 +577,14 @@ sub getSerialModem { my ($modules_conf, $o_mouse) = @_; my $mouse = $o_mouse || {}; $mouse->{device} = readlink "/dev/mouse"; - my $serdev = arch() =~ /ppc/ ? "macserial" : "serial"; + my $serdev; + if (arch() =~ /ppc/) { + $serdev = "macserial"; + } elsif (arch() =~ /mips/) { + $serdev = "8250"; + } else { + $serdev = "serial"; + } eval { modules::load($serdev) }; my @modems; @@ -1145,11 +1155,30 @@ sub BIGMEM() { sub is_i586() { my $cpuinfo = cat_('/proc/cpuinfo'); + if (arch() !~ /86/) { + return 0; + } $cpuinfo =~ /^cpu family\s*:\s*(\d+)/m && $1 < 6 || $cpuinfo =~ /^model name\s*:\s*Transmeta.* TM5800/m || # mdvbz#37866 !has_cpu_flag('cmov'); } +sub is_mips_lemote() { + to_bool(cat_('/proc/cpuinfo') =~ /lemote/); +} + +sub is_mips_ict() { + to_bool(cat_('/proc/cpuinfo') =~ /ict/); +} + +sub is_mips_gdium() { + to_bool(cat_('/proc/cpuinfo') =~ /gdium/); +} + +sub is_mips_st_ls2f() { + to_bool(cat_('/proc/cpuinfo') =~ /st-ls2f/); +} + sub is_xbox() { any { $_->{vendor} == 0x10de && $_->{id} == 0x02a5 } pci_probe(); } @@ -1183,6 +1212,9 @@ sub has_cpu_flag { sub matching_types() { +{ + mips_lemote => is_mips_lemote(), + mips_ict => is_mips_ict(), + mips_st_ls2f => is_mips_st_ls2f(), laptop => isLaptop(), 'touchpad' => hasTouchpad(), '64bit' => to_bool(arch() =~ /64/), |