All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/2] get_dvb_firmware: si2165: drop the extra header from the firmware
@ 2014-10-01  5:58 Matthias Schwarzott
  2014-10-01  5:58 ` [PATCH V2 2/2] si2165: do load firmware without extra header Matthias Schwarzott
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Schwarzott @ 2014-10-01  5:58 UTC (permalink / raw)
  To: linux-media, mchehab, crope; +Cc: Matthias Schwarzott

Store it with a different name based on hardware revision.

V2: change firmware filename to lower case.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
---
 Documentation/dvb/get_dvb_firmware | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index 91b43d2..c3e758b 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -789,7 +789,8 @@ sub si2165 {
     my $sourcefile = "model_111xxx_122xxx_driver_6_0_119_31191_WHQL.zip";
     my $url = "http://www.hauppauge.de/files/drivers/";
     my $hash = "76633e7c76b0edee47c3ba18ded99336";
-    my $fwfile = "dvb-demod-si2165.fw";
+    my $fwfile = "dvb-demod-si2165-d.fw";
+    my $fwhash = "1255c70a53fe562a89d5ff08d7461e2c";
     my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
 
     checkstandard();
@@ -797,21 +798,8 @@ sub si2165 {
     wgetfile($sourcefile, $url . $sourcefile);
     verify($sourcefile, $hash);
     unzip($sourcefile, $tmpdir);
-    extract("$tmpdir/Driver10/Hcw10bda.sys", 0x80788, 0x81E08-0x80788, "$tmpdir/fw1");
-
-    delzero("$tmpdir/fw1","$tmpdir/fw1-1");
-    #verify("$tmpdir/fw1","5e0909858fdf0b5b09ad48b9fe622e70");
-
-    my $CRC="\x0A\xCC";
-    my $BLOCKS_MAIN="\x27";
-    open FW,">$fwfile";
-    print FW "\x01\x00"; # just a version id for the driver itself
-    print FW "\x9A"; # fw version
-    print FW "\x00"; # padding
-    print FW "$BLOCKS_MAIN"; # number of blocks of main part
-    print FW "\x00"; # padding
-    print FW "$CRC"; # 16bit crc value of main part
-    appendfile(FW,"$tmpdir/fw1");
+    extract("$tmpdir/Driver10/Hcw10bda.sys", 0x80788, 0x81E08-0x80788, "$fwfile");
+    verify($fwfile, $fwhash);
 
     "$fwfile";
 }
-- 
2.1.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-01  6:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01  5:58 [PATCH V2 1/2] get_dvb_firmware: si2165: drop the extra header from the firmware Matthias Schwarzott
2014-10-01  5:58 ` [PATCH V2 2/2] si2165: do load firmware without extra header Matthias Schwarzott
2014-10-01  6:01   ` Matthias Schwarzott

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.