[PATCH] Problems with AV7110 firmware

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

 



There are several problems with the way building av7110 firmware is
handled.

=====================
First, with the Hg version, it doesn't even work!  Try turning av7110
firmware on; av7110.c will fail to compile because av7110_firm.h is never
made.

This is just a silly bug in the ttpci/Makefile, easy to miss but trivial
once it's pointed out:
-ifeq (CONFIG_DVB_AV7110_FIRMWARE,y)
+ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)

This doesn't effect the kernel, because it uses ifdef instead of ifeq.  That
won't work for Hg, because CONFIG_DVB_AV7110_FIRMWARE is off it won't be
undefined, but will be defined as 'n'.

====================
Secondly, v4l/Makefile includes some code to add extra -DCONFIG_XX stuff
to the cflags.  This isn't necessary anymore, since config-compat.h will
have all the (non-disabled) config options as #define statements.

Try turning on AV7110_FIRMWARE in your kernel *and* in v4l-dvb Hg.  The
kernel's autoconf.h file will define CONFIG_DVB_AV7110_FIRMWARE_FILE to
the name of the firmware file.  Then v4l/Makefile will define it to blank
on the command line with CFLAGS.  Every file will produce this warning
when it's compiled:

include/linux/autoconf.h:1121:1: warning: "CONFIG_DVB_AV7110_FIRMWARE_FILE" redefined
<command line>:1:1: warning: this is the location of the previous definition

The solution is just to delete the offending bits from v4l/Makefile.
This doesn't effect the kernel because it's a bug in the Hg specific part
of the build system.

====================
Third, the dependencies for the firmware include file are wrong.  It will
break during parallel builds.

Try turning on AV7110_FIRMWARE in the kernel (or fix problem 1&2 so Hg
will work) and then build the modules and let make finish.

Delete fdump and av7110_firm.h from drivers/media/dvb/ttpci (for Hg, the
files are in v4l).  Now try a parallel build with "make -j".  Make will
try to build fdump and use fdump to make av7110_firm.h in parallel, which
doesn't work.  av7110_firm.h needs to depend on fdump, since it can't be
made until fdump exists.

This bug does effect the current kernel, since this part of the ttpci
Makefile is the same as Hg's.

Patch attached to fix all these problems.
# HG changeset patch
# User Trent Piepho <xyzzy@xxxxxxxxxxxxx>
# Node ID 0e15ecc89ff28aabde9075c963b235f5a7ecf7e7
# Parent  01b23734d78903f03dd502d8882f90fb84fa95ef
Fix problems with AV7110 firmware building

From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

Fix missing $() on variable name in dvb/ttpci/Makefile, prevented AV7110
firmware from building.

Remove unnecessary and problematic defines in cflags from v4l/Makefile,
they conflict with the kernel's autoconf.h and are are overridden by
v4l/config-compat.h anyway.

Fix AV7110 firmware dependencies so that parallel builds work correctly.

Signed-off-by: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

diff -r 01b23734d789 -r 0e15ecc89ff2 linux/drivers/media/dvb/ttpci/Makefile
--- a/linux/drivers/media/dvb/ttpci/Makefile	Thu Jun 15 03:25:51 2006 -0700
+++ b/linux/drivers/media/dvb/ttpci/Makefile	Thu Jun 15 13:47:37 2006 -0700
@@ -15,9 +15,9 @@ EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-c
 
 hostprogs-y	:= fdump
 
-ifeq (CONFIG_DVB_AV7110_FIRMWARE,y)
-$(obj)/av7110.o: $(obj)/fdump $(obj)/av7110_firm.h
+ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)
+$(obj)/av7110.o: $(obj)/av7110_firm.h
 
-$(obj)/av7110_firm.h:
+$(obj)/av7110_firm.h: $(obj)/fdump
 	$(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@
 endif
diff -r 01b23734d789 -r 0e15ecc89ff2 v4l/Makefile
--- a/v4l/Makefile	Thu Jun 15 03:25:51 2006 -0700
+++ b/v4l/Makefile	Thu Jun 15 13:47:37 2006 -0700
@@ -45,14 +45,6 @@ endif
 
 ifeq ($(CONFIG_DVB_FIRESAT),m)
   EXTRA_CFLAGS += -I$(srctree)/drivers/ieee1394/
-endif
-
-ifeq ($(CONFIG_DVB_AV7110_OSD),y)
- EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_OSD=1
-endif
-
-ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)
-  EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_FIRMWARE_FILE
 endif
 
 EXTRA_CFLAGS += -g
_______________________________________________

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