use File::Temp qw/ tempdir /;
@components = ( "sp8870", "sp887x", "tda10045", "tda10046",
"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
"dec3000s", "vp7041", "vp7049", "dibusb", "nxt2002", "nxt2004",
"or51211", "or51132_qam", "or51132_vsb", "bluebird",
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
"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", "si2165");
syntax() if (scalar(@ARGV) != 1);
for ($i=0; $i < scalar(@components); $i++) {
if ($cid eq $components[$i]) {
Firmware(s) $outfile extracted successfully.
Now copy it(them) to either /usr/lib/hotplug/firmware or /lib/firmware
(depending on configuration of firmware hotplug).
print STDERR "Unknown component \"$cid\"\n";
my $sourcefile = "tt_Premium_217g.zip";
my $url = "http://www.softwarepatch.pl/9999ccd06a4813cb827dbb0005071c71/$sourcefile";
my $hash = "53970ec17a538945a6d8cb608a7b3899";
my $outfile = "dvb-fe-sp8870.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
wgetfile($sourcefile, $url);
unzip($sourcefile, $tmpdir);
verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash);
copy("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $outfile);
my $sourcefile = "Dvbt1.3.57.6.zip";
my $url = "http://www.avermedia.com/software/$sourcefile";
my $cabfile = "DVBT Net Ver1.3.57.6/disk1/data1.cab";
my $hash = "237938d53a7f834c05c42b894ca68ac3";
my $outfile = "dvb-fe-sp887x.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
wgetfile($sourcefile, $url);
unzip($sourcefile, $tmpdir);
unshield("$tmpdir/$cabfile", $tmpdir);