diff options
author | Antti Palosaari <crope@iki.fi> | 2009-09-12 08:43:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 22:47:50 -0400 |
commit | 9254078c6b453ce02dab150189ed85744f254ddb (patch) | |
tree | a77ee2c0b0c6d229c717a2ff5189d7232d3c66e3 /Documentation/dvb/get_dvb_firmware | |
parent | 891114a413f2ff8722ef4397bb6a902aab006414 (diff) |
V4L/DVB (12752): get_dvb_firmware: add af9015 firmware
Add af9015 firmware to get_dvb_firmware script.
Firmware version is 4.95.0.0.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/dvb/get_dvb_firmware')
-rw-r--r-- | Documentation/dvb/get_dvb_firmware | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index 3d1b0ab70c8e..14b7b5a3bcb9 100644 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -25,7 +25,8 @@ use IO::Handle; | |||
25 | "tda10046lifeview", "av7110", "dec2000t", "dec2540t", | 25 | "tda10046lifeview", "av7110", "dec2000t", "dec2540t", |
26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", | 26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", |
27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", | 27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", |
28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" ); | 28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", |
29 | "af9015"); | ||
29 | 30 | ||
30 | # Check args | 31 | # Check args |
31 | syntax() if (scalar(@ARGV) != 1); | 32 | syntax() if (scalar(@ARGV) != 1); |
@@ -514,6 +515,40 @@ sub bluebird { | |||
514 | $outfile; | 515 | $outfile; |
515 | } | 516 | } |
516 | 517 | ||
518 | sub af9015 { | ||
519 | my $sourcefile = "download.ashx?file=57"; | ||
520 | my $url = "http://www.ite.com.tw/EN/Services/$sourcefile"; | ||
521 | my $hash = "ff5b096ed47c080870eacdab2de33ad6"; | ||
522 | my $outfile = "dvb-usb-af9015.fw"; | ||
523 | my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); | ||
524 | my $fwoffset = 0x22708; | ||
525 | my $fwlength = 18225; | ||
526 | my ($chunklength, $buf, $rcount); | ||
527 | |||
528 | checkstandard(); | ||
529 | |||
530 | wgetfile($sourcefile, $url); | ||
531 | unzip($sourcefile, $tmpdir); | ||
532 | verify("$tmpdir/Driver/Files/AF15BDA.sys", $hash); | ||
533 | |||
534 | open INFILE, '<', "$tmpdir/Driver/Files/AF15BDA.sys"; | ||
535 | open OUTFILE, '>', $outfile; | ||
536 | |||
537 | sysseek(INFILE, $fwoffset, SEEK_SET); | ||
538 | while($fwlength > 0) { | ||
539 | $chunklength = 55; | ||
540 | $chunklength = $fwlength if ($chunklength > $fwlength); | ||
541 | $rcount = sysread(INFILE, $buf, $chunklength); | ||
542 | die "Ran out of data\n" if ($rcount != $chunklength); | ||
543 | syswrite(OUTFILE, $buf); | ||
544 | sysread(INFILE, $buf, 8); | ||
545 | $fwlength -= $rcount + 8; | ||
546 | } | ||
547 | |||
548 | close OUTFILE; | ||
549 | close INFILE; | ||
550 | } | ||
551 | |||
517 | # --------------------------------------------------------------- | 552 | # --------------------------------------------------------------- |
518 | # Utilities | 553 | # Utilities |
519 | 554 | ||