1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-02-23 09:03:23 -05:00

* Updated kernel_version because version is now found at Start Text (0x202)

not Start of Heading (0x201) for the 2.4.0 kernels.
This commit is contained in:
freesource 2001-01-10 05:24:54 +00:00
parent c552aa2674
commit f019263a25

12
Yard.pm
View File

@ -1457,8 +1457,14 @@ sub kernel_version {
# setup header version should be 0x201 # setup header version should be 0x201
read(DATA, $str, 2); read(DATA, $str, 2);
$str = unpack("S",$str); $str = unpack("S",$str);
info 0, "Kernel setup header version is 0x". #info (0, "Kernel setup header version is 0x");
sprintf("%04x",$str)." (expected 0x0201).\n" unless $str == 0x201;
# 2.4.0 kernels are now 0x202
sprintf("%04x",$str)." (expected 0x201 or 0x202).\n"
unless ($str == 0x201
|| $str == 0x0202);
# get ofset of version string (indirect) and read version string # get ofset of version string (indirect) and read version string
seek(DATA, 526, 0); seek(DATA, 526, 0);
read(DATA, $version_start, 2) or ($error = error( read(DATA, $version_start, 2) or ($error = error(
@ -1475,7 +1481,7 @@ sub kernel_version {
# it can also be something like 2.2.15-27mdk. Don't make any assumptions # it can also be something like 2.2.15-27mdk. Don't make any assumptions
# except that beginning must be dotted triple and it's space delimited. # except that beginning must be dotted triple and it's space delimited.
my($version) = $str =~ /^(\d+\.\d+\.\d+\S*)\s/; my($version) = $str =~ /^(\d+\.\d+\.\d+\S*)\s/;
return $version return $version
} }