aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/detect-resolution50
-rwxr-xr-xscripts/make-boot-splash24
2 files changed, 38 insertions, 36 deletions
diff --git a/scripts/detect-resolution b/scripts/detect-resolution
index 9e30a40..6b26e89 100755
--- a/scripts/detect-resolution
+++ b/scripts/detect-resolution
@@ -81,30 +81,30 @@ sub convert_vgamode {
my $v;
#From drakx Xconfigurator_consts.pm
my %vgamodes = (
- '640xx8' => 769,
- '640x480x8' => 769,
- '800xx8' => 771,
- '800x600x8' => 771,
- '1024xx8' => 773,
- '1024x768x8' => 773,
- '1280xx8' => 775,
- '1280x1024x8' => 775,
- '640xx15' => 784,
- '640x480x15' => 784,
- '800xx15' => 787,
- '800x600x15' => 787,
- '1024xx15' => 790,
- '1024x768x15' => 790,
- '1280xx15' => 793,
- '1280x1024x15' => 793,
- '640xx16' => 785,
- '640x480x16' => 785,
- '800xx16' => 788,
- '800x600x16' => 788,
- '1024xx16' => 791,
- '1024x768x16' => 791,
- '1280xx16' => 794,
- '1280x1024x16' => 794,
+ '640xx8' => [ '769', '0x301' ],
+ '640x480x8' => [ '769', '0x301' ],
+ '800xx8' => [ '771', '0x303' ],
+ '800x600x8' => [ '771', '0x303' ],
+ '1024xx8' => [ '773', '0x305' ],
+ '1024x768x8' => [ '773', '0x305' ],
+ '1280xx8' => [ '775', '0x307' ],
+ '1280x1024x8' => [ '775', '0x307' ],
+ '640xx15' => [ '784', '0x310' ],
+ '640x480x15' => [ '784', '0x310' ],
+ '800xx15' => [ '787', '0x313' ],
+ '800x600x15' => [ '787', '0x313' ],
+ '1024xx15' => [ '790', '0x316' ],
+ '1024x768x15' => [ '790', '0x316' ],
+ '1280xx15' => [ '793', '0x319' ],
+ '1280x1024x15' => [ '793', '0x319' ],
+ '640xx16' => [ '785', '0x311' ],
+ '640x480x16' => [ '785', '0x311' ],
+ '800xx16' => [ '788', '0x314' ],
+ '800x600x16' => [ '788', '0x314' ],
+ '1024xx16' => [ '791', '0x317' ],
+ '1024x768x16' => [ '791', '0x317' ],
+ '1280xx16' => [ '794', '0x31A' ],
+ '1280x1024x16' => [ '794', '0x31A' ],
#- '640xx24' => 786, #- there is a problem with these resolutions since the BIOS may take 24 or 32 planes.
#- '640x480x24' => 786,
#- '800xx24' => 789,
@@ -114,7 +114,7 @@ sub convert_vgamode {
#- '1280xx24' => 795,
#- '1280x1024x24' => 795,
);
- foreach my $k (keys %vgamodes) { $v = $k if $vgamodes{$k} == $vga }
+ foreach my $k (keys %vgamodes) { $v = $k if grep { $_ eq $vga } @{$vgamodes{$k}} }
undef $vga if not $v;return $v;
}
sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l }
diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash
index f31047e..0690c41 100755
--- a/scripts/make-boot-splash
+++ b/scripts/make-boot-splash
@@ -43,11 +43,12 @@ fi
if [[ -n $image ]];then
if [[ -z $config ]];then
- echo "Can't find a config files for $resolution";
+ echo "Can't find a config files for resolution $resolution";
exit 1;
fi
else #no image
- echo "Can't find images for $resolution";
+ echo "Can't find images for resolution $resolution";
+ exit 1
fi
# From SuSe mk_initrd script
@@ -56,15 +57,16 @@ function out_byte()
let x=$1
echo -en "`printf \\\\%o $x`"
}
+
function write_int()
{
- let tmp1=($1 & 255)
- let tmp2=($1>>8)
- let tmp2=($tmp2&255)
- let tmp3=($1>>16)
- let tmp3=($tmp3&255)
- let tmp4=($1>>24)
- let tmp4=($tmp4&255)
+ let tmp1=$[$1 & 255]
+ let tmp2=$[$1>>8]
+ let tmp2=$[$tmp2&255]
+ let tmp3=$[$1>>16]
+ let tmp3=$[$tmp3&255]
+ let tmp4=$[$1>>24]
+ let tmp4=$[$tmp4&255]
out_byte $tmp1
out_byte $tmp2
out_byte $tmp3
@@ -72,8 +74,8 @@ function write_int()
}
function write_short()
{
- let tmp1=($1>>8)
- let tmp2=($1&0xff)
+ let tmp1=$[$1>>8]
+ let tmp2=$[$1&0xff]
out_byte $tmp2
out_byte $tmp1
}