Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164079
b: refs/heads/master
c: 9254078
h: refs/heads/master
i:
  164077: 384b226
  164075: e221c04
  164071: 34b7db2
  164063: 5fe971a
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 0b054ef commit ff440d7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 891114a413f2ff8722ef4397bb6a902aab006414
refs/heads/master: 9254078c6b453ce02dab150189ed85744f254ddb
37 changes: 36 additions & 1 deletion trunk/Documentation/dvb/get_dvb_firmware
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use IO::Handle;
"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
"dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
"or51211", "or51132_qam", "or51132_vsb", "bluebird",
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" );
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
"af9015");

# Check args
syntax() if (scalar(@ARGV) != 1);
Expand Down Expand Up @@ -514,6 +515,40 @@ sub bluebird {
$outfile;
}

sub af9015 {
my $sourcefile = "download.ashx?file=57";
my $url = "http://www.ite.com.tw/EN/Services/$sourcefile";
my $hash = "ff5b096ed47c080870eacdab2de33ad6";
my $outfile = "dvb-usb-af9015.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
my $fwoffset = 0x22708;
my $fwlength = 18225;
my ($chunklength, $buf, $rcount);

checkstandard();

wgetfile($sourcefile, $url);
unzip($sourcefile, $tmpdir);
verify("$tmpdir/Driver/Files/AF15BDA.sys", $hash);

open INFILE, '<', "$tmpdir/Driver/Files/AF15BDA.sys";
open OUTFILE, '>', $outfile;

sysseek(INFILE, $fwoffset, SEEK_SET);
while($fwlength > 0) {
$chunklength = 55;
$chunklength = $fwlength if ($chunklength > $fwlength);
$rcount = sysread(INFILE, $buf, $chunklength);
die "Ran out of data\n" if ($rcount != $chunklength);
syswrite(OUTFILE, $buf);
sysread(INFILE, $buf, 8);
$fwlength -= $rcount + 8;
}

close OUTFILE;
close INFILE;
}

# ---------------------------------------------------------------
# Utilities

Expand Down

0 comments on commit ff440d7

Please sign in to comment.