From patchwork Sun Aug 31 11:35:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 25657 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1XO3QC-0003qd-Ri; Sun, 31 Aug 2014 13:35:48 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtp id 1XO3QB-0007eh-jR; Sun, 31 Aug 2014 13:35:48 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751173AbaHaLfl (ORCPT + 1 other); Sun, 31 Aug 2014 07:35:41 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:45373 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbaHaLfh (ORCPT ); Sun, 31 Aug 2014 07:35:37 -0400 Received: from gauss.fritz.box (aftr-88-217-181-174.dynamic.mnet-online.de [88.217.181.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zzam) by smtp.gentoo.org (Postfix) with ESMTPSA id 4618433F7E9; Sun, 31 Aug 2014 11:35:36 +0000 (UTC) From: Matthias Schwarzott To: linux-media@vger.kernel.org, m.chehab@samsung.com, crope@iki.fi, zzam@gentoo.org Subject: [PATCH 6/7] get_dvb_firmware: si2165: drop the extra header from the firmware Date: Sun, 31 Aug 2014 13:35:11 +0200 Message-Id: <1409484912-19300-7-git-send-email-zzam@gentoo.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409484912-19300-1-git-send-email-zzam@gentoo.org> References: <1409484912-19300-1-git-send-email-zzam@gentoo.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.8.31.112421 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1900_1999 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NS ' Store it with a different name based on hardware revision. Signed-off-by: Matthias Schwarzott --- 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 26c623d..a0971fa 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware @@ -787,7 +787,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(); @@ -795,21 +796,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"; }