summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-04-01 08:14:18 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-04-01 08:14:18 +0000
commit5f4eca604ff6397dd4144748a9b85d81ad6cf0b5 (patch)
tree0c3033d882bc1cf2524e45926289fd30c86062ce
parent7b9dfa87e19b41ff77f58b5a8f21dd8d6f21649f (diff)
downloaddrakx-5f4eca604ff6397dd4144748a9b85d81ad6cf0b5.tar
drakx-5f4eca604ff6397dd4144748a9b85d81ad6cf0b5.tar.gz
drakx-5f4eca604ff6397dd4144748a9b85d81ad6cf0b5.tar.bz2
drakx-5f4eca604ff6397dd4144748a9b85d81ad6cf0b5.tar.xz
drakx-5f4eca604ff6397dd4144748a9b85d81ad6cf0b5.zip
Backport from 9.1 xf4 fallbacking to fbdev driver
-rw-r--r--perl-install/install_gtk.pm12
-rw-r--r--perl-install/install_steps_gtk.pm16
2 files changed, 14 insertions, 14 deletions
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index 0bd4afcba..fe8ae2fe9 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -189,22 +189,18 @@ sub init_sizes() {
#------------------------------------------------------------------------------
sub createXconf {
- my ($file, $mouse_type, $mouse_dev, $wacom_dev) = @_;
+ my ($file, $mouse_type, $mouse_dev, $wacom_dev, $Driver) = @_;
$mouse_type = 'IMPS/2' if $mouse_type eq 'ExplorerPS/2';
- devices::make("/dev/kbd") if arch() =~ /^sparc/; #- used by Xsun style server.
symlinkf(devices::make($mouse_dev), "/dev/mouse");
#- needed for imlib to start on 8-bit depth visual.
symlink("/tmp/stage2/etc/imrc", "/etc/imrc");
symlink("/tmp/stage2/etc/im_palette.pal", "etc/im_palette.pal");
-if (arch() =~ /^ia64|x86_64/) {
- require Xconfig::card;
- my ($card) = Xconfig::card::probe();
- Xconfig::card::add_to_card__using_Cards($card, $card->{BoardName}) if $card && $card->{BoardName};
- log::l("Mouse type is $mouse_type and Card driver is " . $card->{Driver});
- output($file, sprintf(<<'END', $mouse_type, $card->{Driver}));
+if ($Driver) {
+ log::l("Mouse type is $mouse_type and Card driver is " . $card->{Driver});
+ output($file, sprintf(<<'END', $mouse_type, $Driver));
Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts:unscaled"
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 554675cfc..02e950443 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -36,7 +36,6 @@ sub new($$) {
unless ($::testing) {
if ($ENV{DISPLAY} eq ":0" && !$::live) {
my $f = "/tmp/Xconf";
- install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0]);
devices::make("/dev/kbd");
local (*T1, *T2);
@@ -44,14 +43,16 @@ sub new($$) {
open T2, ">/dev/tty6";
my $launchX = sub {
+ my ($server, $Driver) = @_;
my $ok = 1;
my $xpmac_opts = cat_("/proc/cmdline");
+ install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0], $Driver);
unless (-d "/var/log") { mkdir("/var/log") }
local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 };
unless (fork) {
- exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240",
- ($_[0] =~ /Xpmac/ ? $xpmac_opts !~ /ofonly/ ? ("-mode", "17", "-depth", "32") : ("-mach64"):()),
- ($_[0] =~ /Xsun/ || $_[0] =~ /Xpmac/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") :
+ exec $server, (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240",
+ ($server =~ /Xpmac/ ? $xpmac_opts !~ /ofonly/ ? ("-mode", "17", "-depth", "32") : ("-mach64"):()),
+ ($server =~ /Xsun/ || $server =~ /Xpmac/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") :
("-allowMouseOpenFail", "-xf86config", $f)) or exit 1;
}
foreach (1..60) {
@@ -78,7 +79,9 @@ sub new($$) {
elsif (/Permedia2/) { @servers = qw(3DLabs) }
else { @servers = qw(Xsun24) }
} elsif (arch() =~ /ia64|x86_64/) {
- @servers = 'XFree86';
+ require Xconfig::card;
+ my ($card) = Xconfig::card::probe();
+ @servers = map { if_($_, "Driver:$_") } $card && $card->{Driver}, 'fbdev';
} elsif (arch() eq "ppc") {
@servers = qw(Xpmac);
}
@@ -87,6 +90,7 @@ sub new($$) {
log::l("Trying with server $_");
my $dir = "/usr/X11R6/bin";
my $prog = /Xsun|Xpmac|XFree86/ ? $_ : "XF86_$_";
+ my ($prog, $Driver) = /Driver:(.*)/ ? ('XFree86', $1) : /Xsun|Xpmac|Xnest/ ? $_ : "XF86_$_";
unless (-x "$dir/$prog") {
unlink $_ foreach glob_("$dir/X*");
install_any::getAndSaveFile("Mandrake/mdkinst$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!";
@@ -95,7 +99,7 @@ sub new($$) {
if (/FB/) {
!$o->{vga16} && $o->{allowFB} or next;
- $o->{allowFB} = &$launchX($prog) #- keep in mind FB is used.
+ $o->{allowFB} = &$launchX($prog, $Driver) #- keep in mind FB is used.
and goto OK;
} else {
$o->{vga16} = 1 if /VGA16/;