Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Remove fdump tool for av7110 firmware

There's no point in this, since the user can use the BUILTIN_FIRMWARE
option to include arbitrary firmware files directly in the kernel image.

Thanks to David Woodhouse for help.

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by

Jaswinder Singh and committed by
David Woodhouse
4f8d1825 9137f05f

+5 -87
+5 -18
drivers/media/dvb/ttpci/Kconfig
··· 28 28 download/extract it, and then copy it to /usr/lib/hotplug/firmware 29 29 or /lib/firmware (depending on configuration of firmware hotplug). 30 30 31 + Alternatively, you can download the file and use the kernel's 32 + EXTRA_FIRMWARE configuration option to build it into your 33 + kernel image by adding the filename to the EXTRA_FIRMWARE 34 + configuration option string. 35 + 31 36 Say Y if you own such a card and want to use it. 32 - 33 - config DVB_AV7110_FIRMWARE 34 - bool "Compile AV7110 firmware into the driver" 35 - depends on DVB_AV7110 && !STANDALONE 36 - default y if DVB_AV7110=y 37 - help 38 - The AV7110 firmware is normally loaded by the firmware hotplug manager. 39 - If you want to compile the firmware into the driver you need to say 40 - Y here and provide the correct path of the firmware. You need this 41 - option if you want to compile the whole driver statically into the 42 - kernel. 43 - 44 - All other people say N. 45 - 46 - config DVB_AV7110_FIRMWARE_FILE 47 - string "Full pathname of av7110 firmware file" 48 - depends on DVB_AV7110_FIRMWARE 49 - default "/usr/lib/hotplug/firmware/dvb-ttpci-01.fw" 50 37 51 38 config DVB_AV7110_OSD 52 39 bool "AV7110 OSD support"
-9
drivers/media/dvb/ttpci/Makefile
··· 19 19 20 20 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ 21 21 EXTRA_CFLAGS += -Idrivers/media/common/tuners 22 - 23 - hostprogs-y := fdump 24 - 25 - ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y) 26 - $(obj)/av7110.o: $(obj)/av7110_firm.h 27 - 28 - $(obj)/av7110_firm.h: $(obj)/fdump 29 - $(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@ 30 - endif
-16
drivers/media/dvb/ttpci/av7110.c
··· 1518 1518 return 0; 1519 1519 } 1520 1520 1521 - #ifdef CONFIG_DVB_AV7110_FIRMWARE_FILE 1522 - #include "av7110_firm.h" 1523 - static void put_firmware(struct av7110* av7110) 1524 - { 1525 - av7110->bin_fw = NULL; 1526 - } 1527 - 1528 - static inline int get_firmware(struct av7110* av7110) 1529 - { 1530 - av7110->bin_fw = dvb_ttpci_fw; 1531 - av7110->size_fw = sizeof(dvb_ttpci_fw); 1532 - return check_firmware(av7110); 1533 - } 1534 - #else 1535 1521 static void put_firmware(struct av7110* av7110) 1536 1522 { 1537 1523 vfree(av7110->bin_fw); ··· 1566 1580 release_firmware(fw); 1567 1581 return ret; 1568 1582 } 1569 - #endif 1570 - 1571 1583 1572 1584 static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) 1573 1585 {
-44
drivers/media/dvb/ttpci/fdump.c
··· 1 - #include <stdio.h> 2 - #include <sys/types.h> 3 - #include <sys/stat.h> 4 - #include <fcntl.h> 5 - #include <unistd.h> 6 - 7 - int main(int argc, char **argv) 8 - { 9 - unsigned char buf[8]; 10 - unsigned int i, count, bytes = 0; 11 - FILE *fd_in, *fd_out; 12 - 13 - if (argc != 4) { 14 - fprintf(stderr, "\n\tusage: %s <ucode.bin> <array_name> <output_name>\n\n", argv[0]); 15 - return -1; 16 - } 17 - 18 - fd_in = fopen(argv[1], "rb"); 19 - if (fd_in == NULL) { 20 - fprintf(stderr, "firmware file '%s' not found\n", argv[1]); 21 - return -1; 22 - } 23 - 24 - fd_out = fopen(argv[3], "w+"); 25 - if (fd_out == NULL) { 26 - fprintf(stderr, "cannot create output file '%s'\n", argv[3]); 27 - return -1; 28 - } 29 - 30 - fprintf(fd_out, "\n#include <asm/types.h>\n\nu8 %s [] = {", argv[2]); 31 - 32 - while ((count = fread(buf, 1, 8, fd_in)) > 0) { 33 - fprintf(fd_out, "\n\t"); 34 - for (i = 0; i < count; i++, bytes++) 35 - fprintf(fd_out, "0x%02x, ", buf[i]); 36 - } 37 - 38 - fprintf(fd_out, "\n};\n\n"); 39 - 40 - fclose(fd_in); 41 - fclose(fd_out); 42 - 43 - return 0; 44 - }