summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-07 16:08:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-07 16:08:41 +0000
commit0bc655c8b88c9a2c92db66dc8b259c56ec53ee49 (patch)
tree8e42cc5a29d8ffed9f62f0766cebc1fcdc97fc34
parent231ceccbb97bb1f62c223cc5bf33046f67f1021b (diff)
downloaddrakx-0bc655c8b88c9a2c92db66dc8b259c56ec53ee49.tar
drakx-0bc655c8b88c9a2c92db66dc8b259c56ec53ee49.tar.gz
drakx-0bc655c8b88c9a2c92db66dc8b259c56ec53ee49.tar.bz2
drakx-0bc655c8b88c9a2c92db66dc8b259c56ec53ee49.tar.xz
drakx-0bc655c8b88c9a2c92db66dc8b259c56ec53ee49.zip
pass --splash <resolution> to mkinitrd
(so that make-boot-splash doesn't rely on lilo.conf or menu.lst)
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm5
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/bootloader.pm13
3 files changed, 15 insertions, 5 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 5efac6ae5..8c095a64b 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -44,6 +44,11 @@ my @bios_vga_modes = (
{ bios => 794, X => 1280, Y => 1024, Depth => 16 },
);
+sub from_bios {
+ my ($bios) = @_;
+ find { $_->{bios} == $bios } @bios_vga_modes;
+}
+
sub size2default_resolution {
my ($size) = @_; #- size in inch
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 07afd58c8..8592edc43 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -361,7 +361,7 @@ if_(arch() !~ /sparc|ppc|ia64/,
$e->{label} = "$prefix-$nb";
}
$Modify->($e) or return;
- push @{$b->{entries}}, $e;
+ bootloader::add_entry($b, $e);
$e;
};
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 6e86c0bef..25c352e5f 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -52,14 +52,19 @@ sub get_label {
}
sub mkinitrd {
- my ($kernelVersion, $initrdImage) = @_;
+ my ($kernelVersion, $initrdImage, $o_vga) = @_;
$::testing || -e "$::prefix/$initrdImage" and return 1;
my $loop_boot = loopback::prepare_boot();
+ my $o_resolution = $o_vga && do {
+ require Xconfig::resolution_and_depth;
+ my $res = Xconfig::resolution_and_depth::from_bios($o_vga);
+ $res && $res->{X};
+ };
modules::load('loop');
- if (!run_program::rooted($::prefix, "mkinitrd", "-v", "-f", $initrdImage, "--ifneeded", $kernelVersion)) {
+ if (!run_program::rooted($::prefix, "mkinitrd", "-v", "-f", $initrdImage, "--ifneeded", $kernelVersion, if_($o_resolution, '--splash' => $o_resolution))) {
unlink("$::prefix/$initrdImage");
die "mkinitrd failed";
}
@@ -278,7 +283,7 @@ sub add_kernel {
symlinkf("vmlinuz-$version", "$::prefix/boot/vmlinuz$ext") ? $ext : "-$version");
my $initrd = "/boot/initrd-$version.img";
- mkinitrd($version, $initrd) or undef $initrd;
+ mkinitrd($version, $initrd, $v->{vga}) or undef $initrd;
if ($initrd && $ext ne "-$version") {
$initrd = "/boot/initrd$ext.img";
symlinkf("initrd-$version.img", "$::prefix$initrd") or cp_af("$::prefix/boot/initrd-$version.img", "$::prefix$initrd");
@@ -384,7 +389,7 @@ sub configure_entry {
if ($specific_version) {
$entry->{initrd} or $entry->{initrd} = "/boot/initrd-$specific_version.img";
- mkinitrd($specific_version, $entry->{initrd}) or undef $entry->{initrd};
+ mkinitrd($specific_version, $entry->{initrd}, $entry->{vga}) or undef $entry->{initrd};
}
}
$entry;