Re: Extract tool for xc3028 firmware

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

 




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.

Hi,

It looks like you're right about it only working on 64 bit systems. I tried running it on my 32 bit system and a lot of the firmware IDs incorrectly ended up as 0xffffffffffffffff. Since it's just a bitfield, Math::BigInt seems like overkill - surely it can just be done as two 32-bit writes?

Aidan

_______________________________________________
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