[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: srm upgrade 6.7 -> 7.0



Waibel Niki wrote:
> 
> 
> 1) get the latest firmware from
> ftp://ftp.digital.com/pub/DEC/Alpha/firmware/index.html
> (choose your machine on the left)
.....
> 
> the next step is somehow a hack.

If you already booted Linux then you have various tools in stock.
For example you can use the following Perl program:

#!/usr/bin/perl

$bootfile = shift || die "A name of a boot file is required\n";

print chr(0) x (512-32); # fill most of a bootblock with nulls
# how many 512-bytes blocks;
$blocks = int (((stat $bootfile)[7] + 511) / 512);
$start_offset = 1;       # block from which to load our file
$flag = 0;               # always zero - so far
$mark = pack "Lx4Lx4Lx4Lx4", $blocks, $start_offset, $flag, 
  $blocks + $start_offset + $flag;
print $mark;             # last 32 bytes of a bootblock
open BF, $bootfile || die "cannot read $bootfile: $!\n";
# dump all contents of a $bootfile on stdout
print @_ = <BF>;
exit 0;

The above is assuming that you are running this on a little-endian
machine (Alpha or x86) so values are "pack"'ed in the order we expect.
Otherwise adjust as needed.  The program above can be made shorter,
but I wanted to keep it readable. :-)

I also assumed that by "determine the size of the firmware file,
divide by 512" you really wanted to know how many 512 byte blocks
you really want to load later; with the last one not necessary full.

Say you called it 'write_boot'; then you are using it like this

   write_boot as255_v8_1.exe > /dev/fd0

and, accordingly to the posted recipe, you are done.

> maybe there is a better way to do it - pls inform me!

See above. :-)

  Michal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []