diff options
author | Marco Gittler <g.marco@freenet.de> | 2007-07-04 18:18:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:41 -0400 |
commit | 59800555f79a52394c3c29e19e448b4635daf14c (patch) | |
tree | a6540f53684f2939bc89b26f2d72770a09d5c53e /Documentation | |
parent | b31c33bd8b339e426138dd267ec969291f802a0d (diff) |
V4L/DVB (5829): Firmware extract and loading for opera dvb-usb update
Better way of creating and loading the firmware used.
Update for get_dvb_firmware script to extract the files for opera usb-box
Help file for creating the firmware added
Signed-off-by: Marco Gittler <g.marco@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/dvb/get_dvb_firmware | 61 | ||||
-rw-r--r-- | Documentation/dvb/opera-firmware.txt | 27 |
2 files changed, 87 insertions, 1 deletions
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index e32f79e05c85..b4d306ae9234 100644 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -24,7 +24,8 @@ use IO::Handle; | |||
24 | @components = ( "sp8870", "sp887x", "tda10045", "tda10046", | 24 | @components = ( "sp8870", "sp887x", "tda10045", "tda10046", |
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"); | ||
28 | 29 | ||
29 | # Check args | 30 | # Check args |
30 | syntax() if (scalar(@ARGV) != 1); | 31 | syntax() if (scalar(@ARGV) != 1); |
@@ -210,6 +211,45 @@ sub dec3000s { | |||
210 | 211 | ||
211 | $outfile; | 212 | $outfile; |
212 | } | 213 | } |
214 | sub opera1{ | ||
215 | my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0); | ||
216 | |||
217 | checkstandard(); | ||
218 | my $fwfile1="dvb-usb-opera1-fpga-01.fw"; | ||
219 | my $fwfile2="dvb-usb-opera-01.fw"; | ||
220 | extract("2830SCap2.sys", 0x62e8, 55024, "$tmpdir/opera1-fpga.fw"); | ||
221 | extract("2830SLoad2.sys",0x3178,0x3685-0x3178,"$tmpdir/fw1part1"); | ||
222 | extract("2830SLoad2.sys",0x0980,0x3150-0x0980,"$tmpdir/fw1part2"); | ||
223 | delzero("$tmpdir/fw1part1","$tmpdir/fw1part1-1"); | ||
224 | delzero("$tmpdir/fw1part2","$tmpdir/fw1part2-1"); | ||
225 | verify("$tmpdir/fw1part1-1","5e0909858fdf0b5b09ad48b9fe622e70"); | ||
226 | verify("$tmpdir/fw1part2-1","d6e146f321427e931df2c6fcadac37a1"); | ||
227 | verify("$tmpdir/opera1-fpga.fw","0f8133f5e9051f5f3c1928f7e5a1b07d"); | ||
228 | |||
229 | my $RES1="\x01\x92\x7f\x00\x01\x00"; | ||
230 | my $RES0="\x01\x92\x7f\x00\x00\x00"; | ||
231 | my $DAT1="\x01\x00\xe6\x00\x01\x00"; | ||
232 | my $DAT0="\x01\x00\xe6\x00\x00\x00"; | ||
233 | open FW,">$tmpdir/opera.fw"; | ||
234 | print FW "$RES1"; | ||
235 | print FW "$DAT1"; | ||
236 | print FW "$RES1"; | ||
237 | print FW "$DAT1"; | ||
238 | appendfile(FW,"$tmpdir/fw1part1-1"); | ||
239 | print FW "$RES0"; | ||
240 | print FW "$DAT0"; | ||
241 | print FW "$RES1"; | ||
242 | print FW "$DAT1"; | ||
243 | appendfile(FW,"$tmpdir/fw1part2-1"); | ||
244 | print FW "$RES1"; | ||
245 | print FW "$DAT1"; | ||
246 | print FW "$RES0"; | ||
247 | print FW "$DAT0"; | ||
248 | copy ("$tmpdir/opera1-fpga.fw",$fwfile1); | ||
249 | copy ("$tmpdir/opera.fw",$fwfile2); | ||
250 | |||
251 | $fwfile1.",".$fwfile2; | ||
252 | } | ||
213 | 253 | ||
214 | sub vp7041 { | 254 | sub vp7041 { |
215 | my $sourcefile = "2.422.zip"; | 255 | my $sourcefile = "2.422.zip"; |
@@ -440,6 +480,25 @@ sub appendfile { | |||
440 | close(INFILE); | 480 | close(INFILE); |
441 | } | 481 | } |
442 | 482 | ||
483 | sub delzero{ | ||
484 | my ($infile,$outfile) =@_; | ||
485 | |||
486 | open INFILE,"<$infile"; | ||
487 | open OUTFILE,">$outfile"; | ||
488 | while (1){ | ||
489 | $rcount=sysread(INFILE,$buf,22); | ||
490 | $len=ord(substr($buf,0,1)); | ||
491 | print OUTFILE substr($buf,0,1); | ||
492 | print OUTFILE substr($buf,2,$len+3); | ||
493 | last if ($rcount<1); | ||
494 | printf OUTFILE "%c",0; | ||
495 | #print $len." ".length($buf)."\n"; | ||
496 | |||
497 | } | ||
498 | close(INFILE); | ||
499 | close(OUTFILE); | ||
500 | } | ||
501 | |||
443 | sub syntax() { | 502 | sub syntax() { |
444 | print STDERR "syntax: get_dvb_firmware <component>\n"; | 503 | print STDERR "syntax: get_dvb_firmware <component>\n"; |
445 | print STDERR "Supported components:\n"; | 504 | print STDERR "Supported components:\n"; |
diff --git a/Documentation/dvb/opera-firmware.txt b/Documentation/dvb/opera-firmware.txt new file mode 100644 index 000000000000..93e784c2607b --- /dev/null +++ b/Documentation/dvb/opera-firmware.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | To extract the firmware for the Opera DVB-S1 USB-Box | ||
2 | you need to copy the files: | ||
3 | |||
4 | 2830SCap2.sys | ||
5 | 2830SLoad2.sys | ||
6 | |||
7 | from the windriver disk into this directory. | ||
8 | |||
9 | Then run | ||
10 | |||
11 | ./get_dvb_firware opera1 | ||
12 | |||
13 | and after that you have 2 files: | ||
14 | |||
15 | dvb-usb-opera-01.fw | ||
16 | dvb-usb-opera1-fpga-01.fw | ||
17 | |||
18 | in here. | ||
19 | |||
20 | Copy them into /lib/firmware/ . | ||
21 | |||
22 | After that the driver can load the firmware | ||
23 | (if you have enabled firmware loading | ||
24 | in kernel config and have hotplug running). | ||
25 | |||
26 | |||
27 | Marco Gittler <g.marco@freenet.de> \ No newline at end of file | ||