-
Mauro Carvalho Chehab authored
From now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Brian Warner <brian.warner@samsung.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab authoredFrom now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Brian Warner <brian.warner@samsung.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
extract_xc3028.pl 44.60 KiB
#!/usr/bin/env perl
# Copyright (c) Mauro Carvalho Chehab <mchehab@kernel.org>
# Released under GPLv2
#
# In order to use, you need to:
# 1) Download the windows driver with something like:
# Version 2.4
# wget http://www.twinhan.com/files/AW/BDA T/20080303_V1.0.6.7.zip
# or wget http://www.stefanringel.de/pub/20080303_V1.0.6.7.zip
# Version 2.7
# wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
# 2) Extract the files from the zip into the current dir:
# unzip -j 20080303_V1.0.6.7.zip 20080303_v1.0.6.7/UDXTTM6000.sys
# unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
# 3) run the script:
# ./extract_xc3028.pl
# 4) copy the generated files:
# cp xc3028-v24.fw /lib/firmware
# cp xc3028-v27.fw /lib/firmware
#use strict;
use IO::Handle;
my $debug=0;
sub verify ($$)
{
my ($filename, $hash) = @_;
my ($testhash);
if (system("which md5sum > /dev/null 2>&1")) {
die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n";
}
open(CMD, "md5sum ".$filename."|");
$testhash = <CMD>;
$testhash =~ /([a-zA-Z0-9]*)/;
$testhash = $1;
close CMD;
die "Hash of extracted file does not match (found $testhash, expected $hash!\n" if ($testhash ne $hash);
}
sub get_hunk ($$)
{
my ($offset, $length) = @_;
my ($chunklength, $buf, $rcount, $out);
sysseek(INFILE, $offset, SEEK_SET);
while ($length > 0) {
# Calc chunk size
$chunklength = 2048;
$chunklength = $length if ($chunklength > $length);
$rcount = sysread(INFILE, $buf, $chunklength);
die "Ran out of data\n" if ($rcount != $chunklength);
$out .= $buf;
$length -= $rcount;
}
return $out;
}
sub write_le16($)
{
my $val = shift;
my $msb = ($val >> 8) &0xff;
my $lsb = $val & 0xff;
syswrite(OUTFILE, chr($lsb).chr($msb));
}