diff options
| author | Matthias Schwarzott <zzam@gentoo.org> | 2014-07-22 16:12:11 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-27 16:01:12 -0400 |
| commit | 9ca72fa1f854a596092901f3e0ee90bb3d459ed5 (patch) | |
| tree | 113ffe0b7535fd7f66d68359a23364d1678ed4f3 | |
| parent | 52841e5e145afdf5cc070863c383f41db8472575 (diff) | |
[media] get_dvb_firmware: Add firmware extractor for si2165
We don't have license to redistribute this firmware, so extract
it from the driver, and add the needed headers.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| -rwxr-xr-x | Documentation/dvb/get_dvb_firmware | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index d91b8be80b66..26c623dd3aa3 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
| @@ -29,7 +29,7 @@ use IO::Handle; | |||
| 29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", | 29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", |
| 30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", | 30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", |
| 31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv", | 31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv", |
| 32 | "drxk_terratec_htc_stick", "sms1xxx_hcw"); | 32 | "drxk_terratec_htc_stick", "sms1xxx_hcw", "si2165"); |
| 33 | 33 | ||
| 34 | # Check args | 34 | # Check args |
| 35 | syntax() if (scalar(@ARGV) != 1); | 35 | syntax() if (scalar(@ARGV) != 1); |
| @@ -783,6 +783,37 @@ sub sms1xxx_hcw { | |||
| 783 | $allfiles; | 783 | $allfiles; |
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | sub si2165 { | ||
| 787 | my $sourcefile = "model_111xxx_122xxx_driver_6_0_119_31191_WHQL.zip"; | ||
| 788 | my $url = "http://www.hauppauge.de/files/drivers/"; | ||
| 789 | my $hash = "76633e7c76b0edee47c3ba18ded99336"; | ||
| 790 | my $fwfile = "dvb-demod-si2165.fw"; | ||
| 791 | my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); | ||
| 792 | |||
| 793 | checkstandard(); | ||
| 794 | |||
| 795 | wgetfile($sourcefile, $url . $sourcefile); | ||
| 796 | verify($sourcefile, $hash); | ||
| 797 | unzip($sourcefile, $tmpdir); | ||
| 798 | extract("$tmpdir/Driver10/Hcw10bda.sys", 0x80788, 0x81E08-0x80788, "$tmpdir/fw1"); | ||
| 799 | |||
| 800 | delzero("$tmpdir/fw1","$tmpdir/fw1-1"); | ||
| 801 | #verify("$tmpdir/fw1","5e0909858fdf0b5b09ad48b9fe622e70"); | ||
| 802 | |||
| 803 | my $CRC="\x0A\xCC"; | ||
| 804 | my $BLOCKS_MAIN="\x27"; | ||
| 805 | open FW,">$fwfile"; | ||
| 806 | print FW "\x01\x00"; # just a version id for the driver itself | ||
| 807 | print FW "\x9A"; # fw version | ||
| 808 | print FW "\x00"; # padding | ||
| 809 | print FW "$BLOCKS_MAIN"; # number of blocks of main part | ||
| 810 | print FW "\x00"; # padding | ||
| 811 | print FW "$CRC"; # 16bit crc value of main part | ||
| 812 | appendfile(FW,"$tmpdir/fw1"); | ||
| 813 | |||
| 814 | "$fwfile"; | ||
| 815 | } | ||
| 816 | |||
| 786 | # --------------------------------------------------------------- | 817 | # --------------------------------------------------------------- |
| 787 | # Utilities | 818 | # Utilities |
| 788 | 819 | ||
