Re: Extract tool for xc3028 firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 Dec 2007 14:57:18 +0000
"Aidan Thornton" <makosoft@xxxxxxxxxxxxxx> wrote:

> 
> 
> On 12/31/07, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote:
> > On Mon, 31 Dec 2007 03:34:56 -0200
> > Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote:
> > 
> > > I've just added an extraction tool to allow retrieving xc2028/3028
> > firmwares
> > > from HVR-12x0 windows file.
> > > 
> > > In order to use, you need to:
> > >       1) Download the windows driver with something like:
> > >               wget
> > http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
> > >       2) Extract the file hcw85bda.sys from the zip into the current dir:
> > >               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 file:
> > >               cp xc3028-v27.fw /lib/firmware
> > > 
> > > I've also added the tool at linux/Documentation/video4linux.
> > > 
> > > This firmware is known to work with most xc2028/xc3028 devices. Please
> > test.
> > 
> > Sorry for a big message like this. Only after sending, I realized that the
> > extracting tool were so badly optimized.
> > 
> > Anyway, I've optimized the script. It has now only 14Kb. It basically writes
> > the header for each firmware, with the firmware type, supported standard IDs
> > and its size. Then, it copies the entire firmwares from HVR driver.
> > Something
> > like this:
> >         #
> >         # Firmware 9, type: STD FW    MTS (0x00000004), id: PAL/BG A2/B
> > (0000000200000007), size: 169
> >         #
> > 
> >         write_le32(4);				# Type: MTS (0x00000004)
> >         write_le64(8589934599);			# Id: PAL/BG A2/B (0000000200000007)
> >         write_le32(169);			# Size: 169
> >         write_hunk_fix_endian(865592, 169);	# Get the firmware from position
> > 865592
> > 
> > Since ID has 64 bits, I suspect that this perl script works fine only on 64
> > bit kernels. Probably, we need to use Math::BigInt for this to work on 32
> > bit
> > kernels.

OK, I've replaced the 64 bit integer by two 32 bit ints:

        # Firmware 77, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.68 MHz id: PAL/DK A2 (00000003000000e0), size: 192
        #

        write_le32(0x60008000);                 # Type
        write_le64(0x00000003, 0x000000e0);     # ID
        write_le16(6680);                       # IF
        write_le32(192);                        # Size
        write_hunk(810936, 192);

This should work fine also on 32 bit machines. Tested here.

Cheers,
Mauro

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux