VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
cb77f0d623ff3 scripts/get_dvb_firmware           (Kamil Rytarowski       2017-05-07 23:25:26 +0200   1) #!/usr/bin/env perl
74ba9207e1adf scripts/get_dvb_firmware           (Thomas Gleixner        2019-05-20 09:19:02 +0200   2) # SPDX-License-Identifier: GPL-2.0-or-later
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   3) #     DVB firmware extractor
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   4) #
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   5) #     (c) 2004 Andrew de Quincey
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   6) #
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   7) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   8) use File::Temp qw/ tempdir /;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700   9) use IO::Handle;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  10) 
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200  11) @components = ( "sp8870", "sp887x", "tda10045", "tda10046",
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200  12) 		"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300  13) 		"dec3000s", "vp7041", "vp7049", "dibusb", "nxt2002", "nxt2004",
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300  14) 		"or51211", "or51132_qam", "or51132_vsb", "bluebird",
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300  15) 		"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300  16) 		"af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300  17) 		"lme2510c_s7395_old", "drxk", "drxk_terratec_h5",
7a016b0880ebf Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2014-02-13 18:32:19 -0300  18) 		"drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv",
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300  19) 		"drxk_terratec_htc_stick", "sms1xxx_hcw", "si2165");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  20) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  21) # Check args
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  22) syntax() if (scalar(@ARGV) != 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  23) $cid = $ARGV[0];
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  24) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  25) # Do it!
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  26) for ($i=0; $i < scalar(@components); $i++) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  27)     if ($cid eq $components[$i]) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  28) 	$outfile = eval($cid);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  29) 	die $@ if $@;
12e66f6573bed Documentation/dvb/get_dvb_firmware (Ville Skytt\ä          2006-01-09 15:25:38 -0200  30) 	print STDERR <<EOF;
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300  31) Firmware(s) $outfile extracted successfully.
87147ff03a8aa Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:57:58 -0300  32) Now copy it(them) to either /usr/lib/hotplug/firmware or /lib/firmware
12e66f6573bed Documentation/dvb/get_dvb_firmware (Ville Skytt\ä          2006-01-09 15:25:38 -0200  33) (depending on configuration of firmware hotplug).
12e66f6573bed Documentation/dvb/get_dvb_firmware (Ville Skytt\ä          2006-01-09 15:25:38 -0200  34) EOF
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  35) 	exit(0);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  36)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  37) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  38) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  39) # If we get here, it wasn't found
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  40) print STDERR "Unknown component \"$cid\"\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  41) syntax();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  42) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  43) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  44) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  45) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  46) # ---------------------------------------------------------------
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  47) # Firmware-specific extraction subroutines
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  48) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  49) sub sp8870 {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  50)     my $sourcefile = "tt_Premium_217g.zip";
302170a4b47e8 Documentation/dvb/get_dvb_firmware (Michael Krufky         2007-06-15 19:14:52 -0300  51)     my $url = "http://www.softwarepatch.pl/9999ccd06a4813cb827dbb0005071c71/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  52)     my $hash = "53970ec17a538945a6d8cb608a7b3899";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  53)     my $outfile = "dvb-fe-sp8870.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  54)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  55) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  56)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  57) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  58)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  59)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  60)     verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  61)     copy("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  62) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  63)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  64) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  65) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  66) sub sp887x {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  67)     my $sourcefile = "Dvbt1.3.57.6.zip";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  68)     my $url = "http://www.avermedia.com/software/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  69)     my $cabfile = "DVBT Net  Ver1.3.57.6/disk1/data1.cab";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  70)     my $hash = "237938d53a7f834c05c42b894ca68ac3";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  71)     my $outfile = "dvb-fe-sp887x.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  72)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  73) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  74)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  75)     checkunshield();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  76) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  77)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  78)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  79)     unshield("$tmpdir/$cabfile", $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  80)     verify("$tmpdir/ZEnglish/sc_main.mc", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  81)     copy("$tmpdir/ZEnglish/sc_main.mc", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  82) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  83)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  84) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  85) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  86) sub tda10045 {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  87)     my $sourcefile = "tt_budget_217g.zip";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  88)     my $url = "http://www.technotrend.de/new/217g/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  89)     my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  90)     my $outfile = "dvb-fe-tda10045.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  91)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  92) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  93)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  94) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  95)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  96)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  97)     extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x37ef9, 30555, "$tmpdir/fwtmp");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  98)     verify("$tmpdir/fwtmp", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700  99)     copy("$tmpdir/fwtmp", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 100) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 101)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 102) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 103) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 104) sub tda10046 {
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 105) 	my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
25ec43d3e6306 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-09-28 16:16:00 -0300 106) 	my $url = "http://technotrend.com.ua/download/software/219/$sourcefile";
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 107) 	my $hash = "6a7e1e2f2644b162ff0502367553c72d";
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 108) 	my $outfile = "dvb-fe-tda10046.fw";
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 109) 	my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 110) 
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 111) 	checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 112) 
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 113) 	wgetfile($sourcefile, $url);
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 114) 	unzip($sourcefile, $tmpdir);
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 115) 	extract("$tmpdir/TT_PCI_2.19h_28_11_2006/software/OEM/PCI/App/ttlcdacc.dll", 0x65389, 24478, "$tmpdir/fwtmp");
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 116) 	verify("$tmpdir/fwtmp", $hash);
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 117) 	copy("$tmpdir/fwtmp", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 118) 
c545d6adbcacd Documentation/dvb/get_dvb_firmware (Andreas Arens          2007-08-15 17:37:16 -0300 119) 	$outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 120) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 121) 
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 122) sub tda10046lifeview {
d852d53dcd1f4 Documentation/dvb/get_dvb_firmware (Joseba Goitia Gandiaga 2009-04-09 18:29:16 -0300 123)     my $sourcefile = "7%5Cdrv_2.11.02.zip";
d852d53dcd1f4 Documentation/dvb/get_dvb_firmware (Joseba Goitia Gandiaga 2009-04-09 18:29:16 -0300 124)     my $url = "http://www.lifeview.hk/dbimages/document/$sourcefile";
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 125)     my $hash = "1ea24dee4eea8fe971686981f34fd2e0";
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 126)     my $outfile = "dvb-fe-tda10046.fw";
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 127)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 128) 
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 129)     checkstandard();
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 130) 
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 131)     wgetfile($sourcefile, $url);
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 132)     unzip($sourcefile, $tmpdir);
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 133)     extract("$tmpdir/LVHybrid.sys", 0x8b088, 24602, "$tmpdir/fwtmp");
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 134)     verify("$tmpdir/fwtmp", $hash);
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 135)     copy("$tmpdir/fwtmp", $outfile);
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 136) 
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 137)     $outfile;
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 138) }
3d8466ece44c7 Documentation/dvb/get_dvb_firmware (Giampiero Giancipoli   2006-02-07 06:49:09 -0200 139) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 140) sub av7110 {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 141)     my $sourcefile = "dvb-ttpci-01.fw-261d";
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 142)     my $url = "https://linuxtv.org/downloads/firmware/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 143)     my $hash = "603431b6259715a8e88f376a53b64e2f";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 144)     my $outfile = "dvb-ttpci-01.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 145) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 146)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 147) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 148)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 149)     verify($sourcefile, $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 150)     copy($sourcefile, $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 151) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 152)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 153) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 154) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 155) sub dec2000t {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 156)     my $sourcefile = "dec217g.exe";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 157)     my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 158)     my $hash = "bd86f458cee4a8f0a8ce2d20c66215a9";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 159)     my $outfile = "dvb-ttusb-dec-2000t.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 160)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 161) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 162)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 163) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 164)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 165)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 166)     verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 167)     copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 168) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 169)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 170) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 171) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 172) sub dec2540t {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 173)     my $sourcefile = "dec217g.exe";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 174)     my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 175)     my $hash = "53e58f4f5b5c2930beee74a7681fed92";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 176)     my $outfile = "dvb-ttusb-dec-2540t.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 177)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 178) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 179)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 180) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 181)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 182)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 183)     verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 184)     copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 185) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 186)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 187) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 188) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 189) sub dec3000s {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 190)     my $sourcefile = "dec217g.exe";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 191)     my $url = "http://hauppauge.lightpath.net/de/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 192)     my $hash = "b013ececea83f4d6d8d2a29ac7c1b448";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 193)     my $outfile = "dvb-ttusb-dec-3000s.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 194)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 195) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 196)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 197) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 198)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 199)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 200)     verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 201)     copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 202) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 203)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 204) }
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 205) sub opera1{
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 206) 	my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 207) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 208) 	checkstandard();
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 209) 	my $fwfile1="dvb-usb-opera1-fpga-01.fw";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 210) 	my $fwfile2="dvb-usb-opera-01.fw";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 211) 	extract("2830SCap2.sys", 0x62e8, 55024, "$tmpdir/opera1-fpga.fw");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 212) 	extract("2830SLoad2.sys",0x3178,0x3685-0x3178,"$tmpdir/fw1part1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 213) 	extract("2830SLoad2.sys",0x0980,0x3150-0x0980,"$tmpdir/fw1part2");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 214) 	delzero("$tmpdir/fw1part1","$tmpdir/fw1part1-1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 215) 	delzero("$tmpdir/fw1part2","$tmpdir/fw1part2-1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 216) 	verify("$tmpdir/fw1part1-1","5e0909858fdf0b5b09ad48b9fe622e70");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 217) 	verify("$tmpdir/fw1part2-1","d6e146f321427e931df2c6fcadac37a1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 218) 	verify("$tmpdir/opera1-fpga.fw","0f8133f5e9051f5f3c1928f7e5a1b07d");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 219) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 220) 	my $RES1="\x01\x92\x7f\x00\x01\x00";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 221) 	my $RES0="\x01\x92\x7f\x00\x00\x00";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 222) 	my $DAT1="\x01\x00\xe6\x00\x01\x00";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 223) 	my $DAT0="\x01\x00\xe6\x00\x00\x00";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 224) 	open FW,">$tmpdir/opera.fw";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 225) 	print FW "$RES1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 226) 	print FW "$DAT1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 227) 	print FW "$RES1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 228) 	print FW "$DAT1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 229) 	appendfile(FW,"$tmpdir/fw1part1-1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 230) 	print FW "$RES0";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 231) 	print FW "$DAT0";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 232) 	print FW "$RES1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 233) 	print FW "$DAT1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 234) 	appendfile(FW,"$tmpdir/fw1part2-1");
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 235) 	print FW "$RES1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 236) 	print FW "$DAT1";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 237) 	print FW "$RES0";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 238) 	print FW "$DAT0";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 239) 	copy ("$tmpdir/opera1-fpga.fw",$fwfile1);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 240) 	copy ("$tmpdir/opera.fw",$fwfile2);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 241) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 242) 	$fwfile1.",".$fwfile2;
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 243) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 244) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 245) sub vp7041 {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 246)     my $sourcefile = "2.422.zip";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 247)     my $url = "http://www.twinhan.com/files/driver/USB-Ter/$sourcefile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 248)     my $hash = "e88c9372d1f66609a3e7b072c53fbcfe";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 249)     my $outfile = "dvb-vp7041-2.422.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 250)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 251) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 252)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 253) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 254)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 255)     unzip($sourcefile, $tmpdir);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 256)     extract("$tmpdir/VisionDTV/Drivers/Win2K&XP/UDTTload.sys", 12503, 3036, "$tmpdir/fwtmp1");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 257)     extract("$tmpdir/VisionDTV/Drivers/Win2K&XP/UDTTload.sys", 2207, 10274, "$tmpdir/fwtmp2");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 258) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 259)     my $CMD = "\000\001\000\222\177\000";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 260)     my $PAD = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 261)     my ($FW);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 262)     open $FW, ">$tmpdir/fwtmp3";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 263)     print $FW "$CMD\001$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 264)     print $FW "$CMD\001$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 265)     appendfile($FW, "$tmpdir/fwtmp1");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 266)     print $FW "$CMD\000$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 267)     print $FW "$CMD\001$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 268)     appendfile($FW, "$tmpdir/fwtmp2");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 269)     print $FW "$CMD\001$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 270)     print $FW "$CMD\000$PAD";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 271)     close($FW);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 272) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 273)     verify("$tmpdir/fwtmp3", $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 274)     copy("$tmpdir/fwtmp3", $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 275) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 276)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 277) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 278) 
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 279) sub vp7049 {
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 280)     my $fwfile = "dvb-usb-vp7049-0.95.fw";
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 281)     my $url = "http://ao2.it/sites/default/files/blog/2012/11/06/linux-support-digicom-digitune-s-vp7049-udtt7049/$fwfile";
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 282)     my $hash = "5609fd295168aea88b25ff43a6f79c36";
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 283) 
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 284)     checkstandard();
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 285) 
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 286)     wgetfile($fwfile, $url);
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 287)     verify($fwfile, $hash);
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 288) 
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 289)     $fwfile;
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 290) }
f6b70ec509a39 Documentation/dvb/get_dvb_firmware (Antonio Ospite         2012-12-10 17:37:16 -0300 291) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 292) sub dibusb {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 293) 	my $url = "https://linuxtv.org/downloads/firmware/dvb-usb-dibusb-5.0.0.11.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 294) 	my $outfile = "dvb-dibusb-5.0.0.11.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 295) 	my $hash = "fa490295a527360ca16dcdf3224ca243";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 296) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 297) 	checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 298) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 299) 	wgetfile($outfile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 300) 	verify($outfile,$hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 301) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 302) 	$outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 303) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 304) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 305) sub nxt2002 {
ba5f0a4e15e73 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-04-23 01:55:38 -0300 306)     my $sourcefile = "Technisat_DVB-PC_4_4_COMPACT.zip";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 307)     my $url = "http://www.bbti.us/download/windows/$sourcefile";
ba5f0a4e15e73 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-04-23 01:55:38 -0300 308)     my $hash = "476befae8c7c1bb9648954060b1eec1f";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 309)     my $outfile = "dvb-fe-nxt2002.fw";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 310)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 311) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 312)     checkstandard();
50c25fff5385c Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:25:34 -0200 313) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 314)     wgetfile($sourcefile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 315)     unzip($sourcefile, $tmpdir);
ba5f0a4e15e73 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-04-23 01:55:38 -0300 316)     verify("$tmpdir/SkyNET.sys", $hash);
ba5f0a4e15e73 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-04-23 01:55:38 -0300 317)     extract("$tmpdir/SkyNET.sys", 331624, 5908, $outfile);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 318) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 319)     $outfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 320) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 321) 
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 322) sub nxt2004 {
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 323)     my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
f6a061bb0f143 Documentation/dvb/get_dvb_firmware (Jan Ceuleers           2009-06-11 16:20:23 -0300 324)     my $url = "http://www.avermedia-usa.com/support/Drivers/$sourcefile";
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 325)     my $hash = "111cb885b1e009188346d72acfed024c";
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 326)     my $outfile = "dvb-fe-nxt2004.fw";
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 327)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 328) 
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 329)     checkstandard();
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 330) 
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 331)     wgetfile($sourcefile, $url);
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 332)     unzip($sourcefile, $tmpdir);
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 333)     verify("$tmpdir/3xHybrid.sys", $hash);
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 334)     extract("$tmpdir/3xHybrid.sys", 465304, 9584, $outfile);
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 335) 
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 336)     $outfile;
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 337) }
04a45929e7f00 Documentation/dvb/get_dvb_firmware (Kirk Lapray            2005-11-08 21:35:46 -0800 338) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 339) sub or51211 {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 340)     my $fwfile = "dvb-fe-or51211.fw";
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 341)     my $url = "https://linuxtv.org/downloads/firmware/$fwfile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 342)     my $hash = "d830949c771a289505bf9eafc225d491";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 343) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 344)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 345) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 346)     wgetfile($fwfile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 347)     verify($fwfile, $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 348) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 349)     $fwfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 350) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 351) 
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 352) sub cx231xx {
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 353)     my $fwfile = "v4l-cx231xx-avcore-01.fw";
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 354)     my $url = "https://linuxtv.org/downloads/firmware/$fwfile";
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 355)     my $hash = "7d3bb956dc9df0eafded2b56ba57cc42";
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 356) 
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 357)     checkstandard();
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 358) 
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 359)     wgetfile($fwfile, $url);
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 360)     verify($fwfile, $hash);
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 361) 
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 362)     $fwfile;
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 363) }
06e9509ff3484 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-19 12:10:00 -0300 364) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 365) sub cx18 {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 366)     my $url = "https://linuxtv.org/downloads/firmware/";
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 367) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 368)     my %files = (
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 369) 	'v4l-cx23418-apu.fw' => '588f081b562f5c653a3db1ad8f65939a',
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 370) 	'v4l-cx23418-cpu.fw' => 'b6c7ed64bc44b1a6e0840adaeac39d79',
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 371) 	'v4l-cx23418-dig.fw' => '95bc688d3e7599fd5800161e9971cc55',
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 372)     );
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 373) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 374)     checkstandard();
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 375) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 376)     my $allfiles;
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 377)     foreach my $fwfile (keys %files) {
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 378) 	wgetfile($fwfile, "$url/$fwfile");
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 379) 	verify($fwfile, $files{$fwfile});
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 380) 	$allfiles .= " $fwfile";
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 381)     }
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 382) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 383)     $allfiles =~ s/^\s//;
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 384) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 385)     $allfiles;
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 386) }
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 387) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 388) sub mpc718 {
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 389)     my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 390)     my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 391)     my $fwfile = "dvb-cx18-mpc718-mt352.fw";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 392)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 393) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 394)     checkstandard();
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 395)     wgetfile($archive, $url);
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 396)     unzip($archive, $tmpdir);
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 397) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 398)     my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 399)     my $found = 0;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 400) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 401)     open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 402)     binmode IN;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 403)     open OUT, '>', $fwfile;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 404)     binmode OUT;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 405)     {
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 406) 	# Block scope because we change the line terminator variable $/
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 407) 	my $prevlen = 0;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 408) 	my $currlen;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 409) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 410) 	# Buried in the data segment are 3 runs of almost identical
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 411) 	# register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 412) 	# command for the MT352.
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 413) 	# Pull out the middle run (because it's easy) of register-value
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 414) 	# pairs to make the "firmware" file.
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 415) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 416) 	local $/ = "\x5d\x01"; # MT352 "TUNER GO"
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 417) 
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 418) 	while (<IN>) {
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 419) 	    $currlen = length($_);
0a6843483c256 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-05 16:22:45 -0300 420) 	    if ($prevlen == $currlen && $currlen <= 64) {
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 421) 		chop; chop; # Get rid of "TUNER GO"
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 422) 		s/^\0\0//;  # get rid of leading 00 00 if it's there
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 423) 		printf OUT "$_";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 424) 		$found = 1;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 425) 		last;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 426) 	    }
0a6843483c256 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-05 16:22:45 -0300 427) 	    $prevlen = $currlen;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 428) 	}
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 429)     }
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 430)     close OUT;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 431)     close IN;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 432)     if (!$found) {
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 433) 	unlink $fwfile;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 434) 	die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 435)     }
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 436)     $fwfile;
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 437) }
9f38a920b2328 Documentation/dvb/get_dvb_firmware (Andy Walls             2009-07-03 11:33:17 -0300 438) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 439) sub cx23885 {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 440)     my $url = "https://linuxtv.org/downloads/firmware/";
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 441) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 442)     my %files = (
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 443) 	'v4l-cx23885-avcore-01.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 444) 	'v4l-cx23885-enc.fw'       => 'a9f8f5d901a7fb42f552e1ee6384f3bb',
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 445)     );
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 446) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 447)     checkstandard();
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 448) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 449)     my $allfiles;
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 450)     foreach my $fwfile (keys %files) {
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 451) 	wgetfile($fwfile, "$url/$fwfile");
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 452) 	verify($fwfile, $files{$fwfile});
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 453) 	$allfiles .= " $fwfile";
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 454)     }
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 455) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 456)     $allfiles =~ s/^\s//;
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 457) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 458)     $allfiles;
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 459) }
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 460) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 461) sub pvrusb2 {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 462)     my $url = "https://linuxtv.org/downloads/firmware/";
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 463) 
f65a95bbf4f23 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 12:35:03 -0300 464)     my %files = (
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 465) 	'v4l-cx25840.fw'           => 'dadb79e9904fc8af96e8111d9cb59320',
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 466)     );
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 467) 
5297e6f7e9818 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 11:46:19 -0300 468)     checkstandard();
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 469) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 470)     my $allfiles;
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 471)     foreach my $fwfile (keys %files) {
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 472) 	wgetfile($fwfile, "$url/$fwfile");
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 473) 	verify($fwfile, $files{$fwfile});
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 474) 	$allfiles .= " $fwfile";
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 475)     }
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 476) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 477)     $allfiles =~ s/^\s//;
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 478) 
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 479)     $allfiles;
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 480) }
b888c5dadb4ae Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2009-03-23 10:57:15 -0300 481) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 482) sub or51132_qam {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 483)     my $fwfile = "dvb-fe-or51132-qam.fw";
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 484)     my $url = "https://linuxtv.org/downloads/firmware/$fwfile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 485)     my $hash = "7702e8938612de46ccadfe9b413cb3b5";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 486) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 487)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 488) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 489)     wgetfile($fwfile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 490)     verify($fwfile, $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 491) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 492)     $fwfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 493) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 494) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 495) sub or51132_vsb {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 496)     my $fwfile = "dvb-fe-or51132-vsb.fw";
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 497)     my $url = "https://linuxtv.org/downloads/firmware/$fwfile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 498)     my $hash = "c16208e02f36fc439a557ad4c613364a";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 499) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 500)     checkstandard();
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 501) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 502)     wgetfile($fwfile, $url);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 503)     verify($fwfile, $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 504) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 505)     $fwfile;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 506) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 507) 
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 508) sub bluebird {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 509) 	my $url = "https://linuxtv.org/download/dvb/firmware/dvb-usb-bluebird-01.fw";
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 510) 	my $outfile = "dvb-usb-bluebird-01.fw";
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 511) 	my $hash = "658397cb9eba9101af9031302671f49d";
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 512) 
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 513) 	checkstandard();
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 514) 
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 515) 	wgetfile($outfile, $url);
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 516) 	verify($outfile,$hash);
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 517) 
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 518) 	$outfile;
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 519) }
d8e6acf2ec120 Documentation/dvb/get_dvb_firmware (Michael Krufky         2006-01-09 15:32:42 -0200 520) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 521) sub af9015 {
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 522) 	my $sourcefile = "download.ashx?file=57";
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 523) 	my $url = "http://www.ite.com.tw/EN/Services/$sourcefile";
4e9f5677755c8 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2010-05-14 15:24:28 -0300 524) 	my $hash = "e3f08935158038d385ad382442f4bb2d";
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 525) 	my $outfile = "dvb-usb-af9015.fw";
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 526) 	my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
4e9f5677755c8 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2010-05-14 15:24:28 -0300 527) 	my $fwoffset = 0x25690;
4e9f5677755c8 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2010-05-14 15:24:28 -0300 528) 	my $fwlength = 18725;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 529) 	my ($chunklength, $buf, $rcount);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 530) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 531) 	checkstandard();
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 532) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 533) 	wgetfile($sourcefile, $url);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 534) 	unzip($sourcefile, $tmpdir);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 535) 	verify("$tmpdir/Driver/Files/AF15BDA.sys", $hash);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 536) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 537) 	open INFILE, '<', "$tmpdir/Driver/Files/AF15BDA.sys";
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 538) 	open OUTFILE, '>', $outfile;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 539) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 540) 	sysseek(INFILE, $fwoffset, SEEK_SET);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 541) 	while($fwlength > 0) {
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 542) 		$chunklength = 55;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 543) 		$chunklength = $fwlength if ($chunklength > $fwlength);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 544) 		$rcount = sysread(INFILE, $buf, $chunklength);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 545) 		die "Ran out of data\n" if ($rcount != $chunklength);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 546) 		syswrite(OUTFILE, $buf);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 547) 		sysread(INFILE, $buf, 8);
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 548) 		$fwlength -= $rcount + 8;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 549) 	}
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 550) 
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 551) 	close OUTFILE;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 552) 	close INFILE;
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 553) }
9254078c6b453 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2009-09-12 09:43:25 -0300 554) 
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 555) sub ngene {
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 556)     my $url = "http://www.digitaldevices.de/download/";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 557)     my $file1 = "ngene_15.fw";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 558)     my $hash1 = "d798d5a757121174f0dbc5f2833c0c85";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 559)     my $file2 = "ngene_17.fw";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 560)     my $hash2 = "26b687136e127b8ac24b81e0eeafc20b";
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 561)     my $url2 = "http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/";
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 562)     my $file3 = "ngene_18.fw";
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 563)     my $hash3 = "ebce3ea769a53e3e0b0197c3b3f127e3";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 564) 
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 565)     checkstandard();
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 566) 
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 567)     wgetfile($file1, $url . $file1);
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 568)     verify($file1, $hash1);
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 569) 
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 570)     wgetfile($file2, $url . $file2);
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 571)     verify($file2, $hash2);
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 572) 
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 573)     wgetfile($file3, $url2 . $file3);
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 574)     verify($file3, $hash3);
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 575) 
f33de4aa24646 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-01-10 06:36:19 -0300 576)     "$file1, $file2, $file3";
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 577) }
e7e41d3b59877 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:52:44 -0300 578) 
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 579) sub az6027{
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 580)     my $firmware = "dvb-usb-az6027-03.fw";
873c07da6abd5 Documentation/dvb/get_dvb_firmware (Renzo Dani             2011-10-09 06:43:50 -0300 581)     my $url = "http://linux.terratec.de/files/TERRATEC_S7/$firmware";
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 582) 
873c07da6abd5 Documentation/dvb/get_dvb_firmware (Renzo Dani             2011-10-09 06:43:50 -0300 583)     wgetfile($firmware, $url);
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 584) 
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 585)     $firmware;
89d328d5782cb Documentation/dvb/get_dvb_firmware (Renzo Dani             2010-07-06 07:23:33 -0300 586) }
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 587) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 588) sub lme2510_lg {
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 589)     my $sourcefile = "LMEBDA_DVBS.sys";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 590)     my $hash = "fc6017ad01e79890a97ec53bea157ed2";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 591)     my $outfile = "dvb-usb-lme2510-lg.fw";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 592)     my $hasho = "caa065d5fdbd2c09ad57b399bbf55cad";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 593) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 594)     checkstandard();
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 595) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 596)     verify($sourcefile, $hash);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 597)     extract($sourcefile, 4168, 3841, $outfile);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 598)     verify($outfile, $hasho);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 599)     $outfile;
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 600) }
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 601) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 602) sub lme2510c_s7395 {
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 603)     my $sourcefile = "US2A0D.sys";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 604)     my $hash = "b0155a8083fb822a3bd47bc360e74601";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 605)     my $outfile = "dvb-usb-lme2510c-s7395.fw";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 606)     my $hasho = "3a3cf1aeebd17b6ddc04cebe131e94cf";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 607) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 608)     checkstandard();
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 609) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 610)     verify($sourcefile, $hash);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 611)     extract($sourcefile, 37248, 3720, $outfile);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 612)     verify($outfile, $hasho);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 613)     $outfile;
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 614) }
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 615) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 616) sub lme2510c_s7395_old {
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 617)     my $sourcefile = "LMEBDA_DVBS7395C.sys";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 618)     my $hash = "7572ae0eb9cdf91baabd7c0ba9e09b31";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 619)     my $outfile = "dvb-usb-lme2510c-s7395.fw";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 620)     my $hasho = "90430c5b435eb5c6f88fd44a9d950674";
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 621) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 622)     checkstandard();
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 623) 
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 624)     verify($sourcefile, $hash);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 625)     extract($sourcefile, 4208, 3881, $outfile);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 626)     verify($outfile, $hasho);
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 627)     $outfile;
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 628) }
d2f918bba7a48 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2010-09-02 17:29:30 -0300 629) 
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 630) sub drxk {
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 631)     my $url = "http://l4m-daten.de/files/";
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 632)     my $zipfile = "DDTuner.zip";
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 633)     my $hash = "f5a37b9a20a3534997997c0b1382a3e5";
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 634)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 635)     my $drvfile = "DDTuner.sys";
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 636)     my $fwfile = "drxk_a3.mc";
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 637) 
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 638)     checkstandard();
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 639) 
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 640)     wgetfile($zipfile, $url . $zipfile);
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 641)     verify($zipfile, $hash);
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 642)     unzip($zipfile, $tmpdir);
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 643)     extract("$tmpdir/$drvfile", 0x14dd8, 15634, "$fwfile");
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 644) 
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 645)     "$fwfile"
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 646) }
f9004df79ffd3 Documentation/dvb/get_dvb_firmware (Oliver Endriss         2011-07-03 13:53:50 -0300 647) 
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 648) sub drxk_hauppauge_hvr930c {
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 649)     my $url = "http://www.wintvcd.co.uk/drivers/";
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 650)     my $zipfile = "HVR-9x0_5_10_325_28153_SIGNED.zip";
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 651)     my $hash = "83ab82e7e9480ec8bf1ae0155ca63c88";
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 652)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 653)     my $drvfile = "HVR-900/emOEM.sys";
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 654)     my $fwfile = "dvb-usb-hauppauge-hvr930c-drxk.fw";
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 655) 
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 656)     checkstandard();
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 657) 
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 658)     wgetfile($zipfile, $url . $zipfile);
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 659)     verify($zipfile, $hash);
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 660)     unzip($zipfile, $tmpdir);
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 661)     extract("$tmpdir/$drvfile", 0x117b0, 42692, "$fwfile");
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 662) 
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 663)     "$fwfile"
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 664) }
6fd7dba026f17 Documentation/dvb/get_dvb_firmware (Eddi De Pieri          2011-11-21 06:43:52 -0300 665) 
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 666) sub drxk_terratec_h5 {
991ce92f8de24 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2015-12-04 10:38:59 -0200 667)     my $url = "https://linuxtv.org/downloads/firmware/";
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 668)     my $hash = "19000dada8e2741162ccc50cc91fa7f1";
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 669)     my $fwfile = "dvb-usb-terratec-h5-drxk.fw";
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 670) 
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 671)     checkstandard();
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 672) 
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 673)     wgetfile($fwfile, $url . $fwfile);
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 674)     verify($fwfile, $hash);
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 675) 
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 676)     "$fwfile"
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 677) }
8b9456ae04b1c Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2011-07-11 14:33:51 -0300 678) 
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 679) sub drxk_terratec_htc_stick {
8cd7085ff460e Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2013-01-01 08:54:26 -0300 680)     my $url = "http://ftp.terratec.de/Receiver/Cinergy_HTC_Stick/Updates/History/";
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 681)     my $zipfile = "Cinergy_HTC_Stick_Drv_5.09.1202.00_XP_Vista_7.exe";
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 682)     my $hash = "6722a2442a05423b781721fbc069ed5e";
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 683)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 684)     my $drvfile = "Cinergy HTC Stick/BDA Driver 5.09.1202.00/Windows 32 Bit/emOEM.sys";
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 685)     my $fwfile = "dvb-usb-terratec-htc-stick-drxk.fw";
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 686) 
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 687)     checkstandard();
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 688) 
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 689)     wgetfile($zipfile, $url . $zipfile);
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 690)     verify($zipfile, $hash);
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 691)     unzip($zipfile, $tmpdir);
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 692)     extract("$tmpdir/$drvfile", 0x4e5c0, 42692, "$fwfile");
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 693) 
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 694)     "$fwfile"
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 695) }
7bdc0fb14f106 Documentation/dvb/get_dvb_firmware (Martin Blumenstingl    2012-06-12 18:19:26 -0300 696) 
3188d5485e8a0 Documentation/dvb/get_dvb_firmware (Benjamin Larsson       2011-07-27 08:43:38 -0300 697) sub it9135 {
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 698) 	my $url = "http://www.ite.com.tw/uploads/firmware/v3.25.0.0/";
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 699) 	my $file1 = "dvb-usb-it9135-01.zip";
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 700) 	my $fwfile1 = "dvb-usb-it9135-01.fw";
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 701) 	my $hash1 = "02fcf11174eda84745dae7e61c5ff9ba";
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 702) 	my $file2 = "dvb-usb-it9135-02.zip";
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 703) 	my $fwfile2 = "dvb-usb-it9135-02.fw";
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 704) 	my $hash2 = "d5e1437dc24358578e07999475d4cac9";
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 705) 
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 706) 	checkstandard();
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 707) 
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 708) 	wgetfile($file1, $url . $file1);
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 709) 	unzip($file1, "");
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 710) 	verify("$fwfile1", $hash1);
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 711) 
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 712) 	wgetfile($file2, $url . $file2);
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 713) 	unzip($file2, "");
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 714) 	verify("$fwfile2", $hash2);
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 715) 
7c5e3e5f017d3 Documentation/dvb/get_dvb_firmware (Bimow Chen             2014-08-01 06:19:58 -0300 716) 	"$file1 $file2"
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 717) }
7330f7c157308 Documentation/dvb/get_dvb_firmware (Malcolm Priestley      2011-11-30 17:17:43 -0300 718) 
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 719) sub tda10071 {
ead20951fbf3e Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-02 11:35:06 -0300 720)     my $sourcefile = "PCTV_460e_reference.zip";
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 721)     my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/";
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 722)     my $hash = "4403de903bf2593464c8d74bbc200a57";
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 723)     my $fwfile = "dvb-fe-tda10071.fw";
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 724)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 725) 
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 726)     checkstandard();
3188d5485e8a0 Documentation/dvb/get_dvb_firmware (Benjamin Larsson       2011-07-27 08:43:38 -0300 727) 
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 728)     wgetfile($sourcefile, $url . $sourcefile);
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 729)     verify($sourcefile, $hash);
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 730)     unzip($sourcefile, $tmpdir);
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 731)     extract("$tmpdir/PCTV\ 70e\ 80e\ 100e\ 320e\ 330e\ 800e/32\ bit/emOEM.sys", 0x67d38, 40504, $fwfile);
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 732) 
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 733)     "$fwfile";
465301b10f592 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2011-08-01 23:34:58 -0300 734) }
3188d5485e8a0 Documentation/dvb/get_dvb_firmware (Benjamin Larsson       2011-07-27 08:43:38 -0300 735) 
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 736) sub drxk_pctv {
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 737)     my $sourcefile = "PCTV_460e_reference.zip";
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 738)     my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/";
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 739)     my $hash = "4403de903bf2593464c8d74bbc200a57";
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 740)     my $fwfile = "dvb-demod-drxk-pctv.fw";
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 741)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 742) 
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 743)     checkstandard();
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 744) 
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 745)     wgetfile($sourcefile, $url . $sourcefile);
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 746)     verify($sourcefile, $hash);
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 747)     unzip($sourcefile, $tmpdir);
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 748)     extract("$tmpdir/PCTV\ 70e\ 80e\ 100e\ 320e\ 330e\ 800e/32\ bit/emOEM.sys", 0x72b80, 42692, $fwfile);
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 749) 
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 750)     "$fwfile";
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 751) }
662f9602bdea1 Documentation/dvb/get_dvb_firmware (Antti Palosaari        2012-03-19 11:48:18 -0300 752) 
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 753) sub sms1xxx_hcw {
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 754)     my $url = "http://steventoth.net/linux/sms1xxx/";
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 755)     my %files = (
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 756) 	'sms1xxx-hcw-55xxx-dvbt-01.fw'  => "afb6f9fb9a71d64392e8564ef9577e5a",
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 757) 	'sms1xxx-hcw-55xxx-dvbt-02.fw'  => "b44807098ba26e52cbedeadc052ba58f",
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 758) 	'sms1xxx-hcw-55xxx-isdbt-02.fw' => "dae934eeea85225acbd63ce6cfe1c9e4",
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 759)     );
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 760) 
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 761)     checkstandard();
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 762) 
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 763)     my $allfiles;
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 764)     foreach my $fwfile (keys %files) {
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 765) 	wgetfile($fwfile, "$url/$fwfile");
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 766) 	verify($fwfile, $files{$fwfile});
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 767) 	$allfiles .= " $fwfile";
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 768)     }
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 769) 
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 770)     $allfiles =~ s/^\s//;
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 771) 
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 772)     $allfiles;
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 773) }
f244e6c308be3 Documentation/dvb/get_dvb_firmware (Mauro Carvalho Chehab  2012-07-05 22:35:55 -0300 774) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 775) sub si2165 {
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 776)     my $sourcefile = "model_111xxx_122xxx_driver_6_0_119_31191_WHQL.zip";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 777)     my $url = "http://www.hauppauge.de/files/drivers/";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 778)     my $hash = "76633e7c76b0edee47c3ba18ded99336";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 779)     my $fwfile = "dvb-demod-si2165.fw";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 780)     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 781) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 782)     checkstandard();
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 783) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 784)     wgetfile($sourcefile, $url . $sourcefile);
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 785)     verify($sourcefile, $hash);
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 786)     unzip($sourcefile, $tmpdir);
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 787)     extract("$tmpdir/Driver10/Hcw10bda.sys", 0x80788, 0x81E08-0x80788, "$tmpdir/fw1");
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 788) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 789)     delzero("$tmpdir/fw1","$tmpdir/fw1-1");
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 790)     #verify("$tmpdir/fw1","5e0909858fdf0b5b09ad48b9fe622e70");
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 791) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 792)     my $CRC="\x0A\xCC";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 793)     my $BLOCKS_MAIN="\x27";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 794)     open FW,">$fwfile";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 795)     print FW "\x01\x00"; # just a version id for the driver itself
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 796)     print FW "\x9A"; # fw version
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 797)     print FW "\x00"; # padding
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 798)     print FW "$BLOCKS_MAIN"; # number of blocks of main part
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 799)     print FW "\x00"; # padding
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 800)     print FW "$CRC"; # 16bit crc value of main part
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 801)     appendfile(FW,"$tmpdir/fw1");
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 802) 
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 803)     "$fwfile";
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 804) }
9ca72fa1f854a Documentation/dvb/get_dvb_firmware (Matthias Schwarzott    2014-07-22 17:12:11 -0300 805) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 806) # ---------------------------------------------------------------
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 807) # Utilities
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 808) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 809) sub checkstandard {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 810)     if (system("which unzip > /dev/null 2>&1")) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 811) 	die "This firmware requires the unzip command - see ftp://ftp.info-zip.org/pub/infozip/UnZip.html\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 812)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 813)     if (system("which md5sum > /dev/null 2>&1")) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 814) 	die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 815)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 816)     if (system("which wget > /dev/null 2>&1")) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 817) 	die "This firmware requires the wget command - see http://wget.sunsite.dk/\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 818)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 819) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 820) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 821) sub checkunshield {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 822)     if (system("which unshield > /dev/null 2>&1")) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 823) 	die "This firmware requires the unshield command - see http://sourceforge.net/projects/synce/\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 824)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 825) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 826) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 827) sub wgetfile {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 828)     my ($sourcefile, $url) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 829) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 830)     if (! -f $sourcefile) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 831) 	system("wget -O \"$sourcefile\" \"$url\"") and die "wget failed - unable to download firmware";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 832)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 833) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 834) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 835) sub unzip {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 836)     my ($sourcefile, $todir) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 837) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 838)     $status = system("unzip -q -o -d \"$todir\" \"$sourcefile\" 2>/dev/null" );
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 839)     if ((($status >> 8) > 2) || (($status & 0xff) != 0)) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 840) 	die ("unzip failed - unable to extract firmware");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 841)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 842) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 843) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 844) sub unshield {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 845)     my ($sourcefile, $todir) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 846) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 847)     system("unshield x -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 848) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 849) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 850) sub verify {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 851)     my ($filename, $hash) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 852)     my ($testhash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 853) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 854)     open(CMD, "md5sum \"$filename\"|");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 855)     $testhash = <CMD>;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 856)     $testhash =~ /([a-zA-Z0-9]*)/;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 857)     $testhash = $1;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 858)     close CMD;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 859)     die "Hash of extracted file does not match!\n" if ($testhash ne $hash);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 860) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 861) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 862) sub copy {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 863)     my ($from, $to) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 864) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 865)     system("cp -f \"$from\" \"$to\"") and die ("cp failed");
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 866) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 867) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 868) sub extract {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 869)     my ($infile, $offset, $length, $outfile) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 870)     my ($chunklength, $buf, $rcount);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 871) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 872)     open INFILE, "<$infile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 873)     open OUTFILE, ">$outfile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 874)     sysseek(INFILE, $offset, SEEK_SET);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 875)     while($length > 0) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 876) 	# Calc chunk size
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 877) 	$chunklength = 2048;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 878) 	$chunklength = $length if ($chunklength > $length);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 879) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 880) 	$rcount = sysread(INFILE, $buf, $chunklength);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 881) 	die "Ran out of data\n" if ($rcount != $chunklength);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 882) 	syswrite(OUTFILE, $buf);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 883) 	$length -= $rcount;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 884)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 885)     close INFILE;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 886)     close OUTFILE;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 887) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 888) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 889) sub appendfile {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 890)     my ($FH, $infile) = @_;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 891)     my ($buf);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 892) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 893)     open INFILE, "<$infile";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 894)     while(1) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 895) 	$rcount = sysread(INFILE, $buf, 2048);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 896) 	last if ($rcount == 0);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 897) 	print $FH $buf;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 898)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 899)     close(INFILE);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 900) }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 901) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 902) sub delzero{
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 903) 	my ($infile,$outfile) =@_;
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 904) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 905) 	open INFILE,"<$infile";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 906) 	open OUTFILE,">$outfile";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 907) 	while (1){
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 908) 		$rcount=sysread(INFILE,$buf,22);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 909) 		$len=ord(substr($buf,0,1));
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 910) 		print OUTFILE substr($buf,0,1);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 911) 		print OUTFILE substr($buf,2,$len+3);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 912) 	last if ($rcount<1);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 913) 	printf OUTFILE "%c",0;
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 914) #print $len." ".length($buf)."\n";
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 915) 
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 916) 	}
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 917) 	close(INFILE);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 918) 	close(OUTFILE);
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 919) }
59800555f79a5 Documentation/dvb/get_dvb_firmware (Marco Gittler          2007-07-04 19:18:34 -0300 920) 
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 921) sub syntax() {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 922)     print STDERR "syntax: get_dvb_firmware <component>\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 923)     print STDERR "Supported components:\n";
87147ff03a8aa Documentation/dvb/get_dvb_firmware (Oliver Endriss         2010-02-05 07:57:58 -0300 924)     @components = sort @components;
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 925)     for($i=0; $i < scalar(@components); $i++) {
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 926) 	print STDERR "\t" . $components[$i] . "\n";
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 927)     }
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 928)     exit(1);
^1da177e4c3f4 Documentation/dvb/get_dvb_firmware (Linus Torvalds         2005-04-16 15:20:36 -0700 929) }