diff options
author | Alex Woods <devnull@localhost> | 2003-06-24 00:06:18 +0000 |
---|---|---|
committer | Alex Woods <devnull@localhost> | 2003-06-24 00:06:18 +0000 |
commit | 110ae9ae8a3affd6ea21c736a367eb6d838a1bc7 (patch) | |
tree | d987943b25c3ccdf3d64f161f0334448b962dd27 /linux/drivers/media | |
parent | 79ddad482c949b53470cbe9968413602ac686d66 (diff) | |
download | mediapointer-dvb-s2-110ae9ae8a3affd6ea21c736a367eb6d838a1bc7.tar.gz mediapointer-dvb-s2-110ae9ae8a3affd6ea21c736a367eb6d838a1bc7.tar.bz2 |
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.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/Kconfig | 12 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/Makefile | 7 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/fdump.c | 36 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 2 |
4 files changed, 56 insertions, 1 deletions
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 <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> + + +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 <ucode.bin> <array_name>\n\n", + argv[0]); + return -1; + } + + fd = open (argv[1], O_RDONLY); + + printf ("\n#include <asm/types.h>\n\nu8 %s [] __initdata = {", + argv[2]); + + while ((count = read (fd, buf, 8)) > 0) { + printf ("\n\t"); + for (i=0;i<count;i++, bytes++) + printf ("0x%02x, ", buf[i]); + } + + printf ("\n};\n\n"); + close (fd); + + return 0; +} + diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 933922002..3f625e12e 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -826,7 +826,7 @@ ttusb_dec_boot_dsp(struct ttusb_dec * dec) int i, j, actual_len, result, size, trans_count; u8 b0[] = - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x59, 0x61, 0x00 }; + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xc8, 0x61, 0x00 }; u8 b1[] = { 0x61 }; u8 b[ARM_PACKET_SIZE]; u32 dsp_length = htonl(sizeof (dsp_dec2000)); |