From 110ae9ae8a3affd6ea21c736a367eb6d838a1bc7 Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Tue, 24 Jun 2003 00:06:18 +0000 Subject: Remove firmware header from cvs :) Include fdump and modify build system to create firmware header from firmware binary file. Twiddle checksum value for firmware upload to current firmware's value. --- linux/drivers/media/dvb/ttusb-dec/Kconfig | 12 +++++++++ linux/drivers/media/dvb/ttusb-dec/Makefile | 7 ++++++ linux/drivers/media/dvb/ttusb-dec/fdump.c | 36 +++++++++++++++++++++++++++ linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 2 +- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 linux/drivers/media/dvb/ttusb-dec/fdump.c (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/dvb/ttusb-dec/Kconfig b/linux/drivers/media/dvb/ttusb-dec/Kconfig index 23d066092..5eb25efbd 100644 --- a/linux/drivers/media/dvb/ttusb-dec/Kconfig +++ b/linux/drivers/media/dvb/ttusb-dec/Kconfig @@ -10,3 +10,15 @@ config DVB_TTUSB_DEC an external software decoder to watch TV on your computer. Say Y if you own such a device and want to use it. + +config DVB_TTUSB_DEC_FIRMWARE_FILE + string "Full pathname of dec2000t.bin firmware file" + depends on DVB_TTUSB_DEC + default "/etc/dvb/dec2000t.bin" + help + The DEC2000-T requires a firmware in order to boot into a mode in + which it is a slave to the PC. The firmware file can obtained as + follows: + wget http://hauppauge.lightpath.net/de/dec215a.exe + unzip -j dec215a.exe Software/Oem/STB/App/Boot/STB_PC_T.bin + mv STB_PC_T.bin /etc/dvb/dec2000t.bin diff --git a/linux/drivers/media/dvb/ttusb-dec/Makefile b/linux/drivers/media/dvb/ttusb-dec/Makefile index 39364517f..daefade04 100644 --- a/linux/drivers/media/dvb/ttusb-dec/Makefile +++ b/linux/drivers/media/dvb/ttusb-dec/Makefile @@ -2,3 +2,10 @@ obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o dec2000_frontend.o EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ + +host-progs := fdump + +$(obj)/ttusb_dec.o: $(obj)/dsp_dec2000.h + +$(obj)/dsp_dec2000.h: $(patsubst "%", %, $(CONFIG_DVB_TTUSB_DEC_FIRMWARE_FILE)) $(obj)/fdump + $(obj)/fdump $< dsp_dec2000 > $@ diff --git a/linux/drivers/media/dvb/ttusb-dec/fdump.c b/linux/drivers/media/dvb/ttusb-dec/fdump.c new file mode 100644 index 000000000..834314a45 --- /dev/null +++ b/linux/drivers/media/dvb/ttusb-dec/fdump.c @@ -0,0 +1,36 @@ +#include +#include +#include +#include +#include + + +int main (int argc, char **argv) +{ + unsigned char buf[8]; + unsigned int i, count, bytes = 0; + int fd; + + if (argc != 3) { + fprintf (stderr, "\n\tusage: %s \n\n", + argv[0]); + return -1; + } + + fd = open (argv[1], O_RDONLY); + + printf ("\n#include \n\nu8 %s [] __initdata = {", + argv[2]); + + while ((count = read (fd, buf, 8)) > 0) { + printf ("\n\t"); + for (i=0;i