From: Antti Palosaari <crope@iki.fi>
To: Matthias Schwarzott <zzam@gentoo.org>,
m.chehab@samsung.com, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/8] get_dvb_firmware: Add firmware extractor for si2165
Date: Wed, 23 Jul 2014 12:20:45 +0300 [thread overview]
Message-ID: <53CF7E6D.20406@iki.fi> (raw)
In-Reply-To: <1406059938-21141-2-git-send-email-zzam@gentoo.org>
Moikka Matthias
On 07/22/2014 11:12 PM, Matthias Schwarzott wrote:
> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
> ---
> Documentation/dvb/get_dvb_firmware | 33 ++++++++++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
> index d91b8be..26c623d 100755
> --- a/Documentation/dvb/get_dvb_firmware
> +++ b/Documentation/dvb/get_dvb_firmware
> @@ -29,7 +29,7 @@ use IO::Handle;
> "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
> "lme2510c_s7395_old", "drxk", "drxk_terratec_h5",
> "drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv",
> - "drxk_terratec_htc_stick", "sms1xxx_hcw");
> + "drxk_terratec_htc_stick", "sms1xxx_hcw", "si2165");
>
> # Check args
> syntax() if (scalar(@ARGV) != 1);
> @@ -783,6 +783,37 @@ sub sms1xxx_hcw {
> $allfiles;
> }
>
> +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 $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
> +
> + checkstandard();
> +
> + 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");
I have to say I little bit dislike that kind of own headers. There is no
way to read firmware version from binary itself (very often there is)?
Whats is benefit of telling how many blocks there is? Isn't it possible
to detect somehow by examining firmware image itself runtime?
Anyhow, you are the author of that driver and even I don't personally
like those, I think it is up to your decision as a author.
regards
Antti
> +
> + "$fwfile";
> +}
> +
> # ---------------------------------------------------------------
> # Utilities
>
>
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-07-23 9:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 20:12 [PATCH 0/8] add si2165 demod driver Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 1/8] get_dvb_firmware: Add firmware extractor for si2165 Matthias Schwarzott
2014-07-23 9:20 ` Antti Palosaari [this message]
2014-07-23 19:03 ` Matthias Schwarzott
2014-07-23 20:10 ` Antonio Ospite
2014-07-29 5:37 ` Matthias Schwarzott
2014-07-29 8:53 ` Antonio Ospite
2014-07-29 11:34 ` Antti Palosaari
2014-07-29 19:22 ` Matthias Schwarzott
2014-07-29 19:45 ` Antti Palosaari
2014-07-30 18:50 ` Matthias Schwarzott
2014-07-30 19:29 ` Antti Palosaari
2014-07-22 20:12 ` [PATCH 2/8] si2165: Add demod driver for DVB-T only Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 3/8] cx23885: Add si2165 support for HVR-5500 Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 4/8] cx231xx: prepare for i2c_client attachment Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 5/8] cx231xx: Add digital support for [2040:b130] Hauppauge WinTV 930C-HD (model 1113xx) Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 6/8] cx231xx: Add digital support for [2040:b131] Hauppauge WinTV 930C-HD (model 1114xx) Matthias Schwarzott
2014-07-26 19:27 ` Mauro Carvalho Chehab
2014-07-27 9:32 ` Matthias Schwarzott
2014-07-27 13:44 ` Mauro Carvalho Chehab
2014-07-27 14:32 ` Mauro Carvalho Chehab
2014-07-27 14:59 ` Mauro Carvalho Chehab
2014-07-27 19:42 ` Mauro Carvalho Chehab
2014-07-29 5:39 ` Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 7/8] cx231xx: Add [2013:0259] PCTV QuatroStick 521e Matthias Schwarzott
2014-07-22 20:12 ` [PATCH 8/8] cx231xx: Add [2013:025e] PCTV QuatroStick 522e Matthias Schwarzott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CF7E6D.20406@iki.fi \
--to=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=zzam@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).