Commit 9254078c6b453ce02dab150189ed85744f254ddb
Committed by
Mauro Carvalho Chehab
1 parent
891114a413
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 36 additions and 1 deletions Side-by-side Diff
Documentation/dvb/get_dvb_firmware
... | ... | @@ -25,7 +25,8 @@ |
25 | 25 | "tda10046lifeview", "av7110", "dec2000t", "dec2540t", |
26 | 26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", |
27 | 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 | 31 | # Check args |
31 | 32 | syntax() if (scalar(@ARGV) != 1); |
... | ... | @@ -512,6 +513,40 @@ |
512 | 513 | verify($outfile,$hash); |
513 | 514 | |
514 | 515 | $outfile; |
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; | |
515 | 550 | } |
516 | 551 | |
517 | 552 | # --------------------------------------------------------------- |