summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Makefile164
-rw-r--r--v4l/compat.h13
-rwxr-xr-xv4l/scripts/make_kconfig.pl9
-rwxr-xr-xv4l/scripts/make_makefile.pl9
-rwxr-xr-xv4l/scripts/make_noconfig.pl3
-rw-r--r--v4l/versions.txt3
6 files changed, 107 insertions, 94 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 9acafb007..58b160397 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -3,9 +3,30 @@ obj = .
endif
#################################################
+# Version Check
+
+ifneq ($(KERNELRELEASE),)
+
+-include $(TOPDIR)/Rules.make
+
+else
+
+# take version info from last module build if available
+-include $(obj)/.version
+
+ifneq ($(SRCDIR),)
+KDIR := $(SRCDIR)
+else
+KDIR := /lib/modules/$(KERNELRELEASE)/build
+endif
+
+endif
+
+#################################################
# default compilation rule
default:: Makefile.media links .version
+ echo srcdir $(SRCDIR)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
#################################################
@@ -18,15 +39,6 @@ default:: Makefile.media links .version
#################################################
# CFLAGS configuration
-# for DVB
-EXTRA_CFLAGS += -DDVB_CVS=1
-EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/
-EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends/
-
-ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y)
- EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1
-endif
-
ifeq ($(CONFIG_XC3028),m)
EXTRA_CFLAGS += -DCONFIG_XC3028=1
endif
@@ -35,28 +47,6 @@ ifeq ($(CONFIG_DVB_FIRESAT),m)
EXTRA_CFLAGS += -I$(srctree)/drivers/ieee1394/
endif
-ifeq ($(CONFIG_VIDEO_CX88_DVB),m)
- EXTRA_CFLAGS += -DCONFIG_VIDEO_CX88_DVB_MODULE=1
- EXTRA_CFLAGS += -DHAVE_CX22702=1
- EXTRA_CFLAGS += -DHAVE_OR51132=1
- EXTRA_CFLAGS += -DHAVE_LGDT330X=1
- EXTRA_CFLAGS += -DHAVE_MT352=1
- EXTRA_CFLAGS += -DHAVE_ZL10353=1
- EXTRA_CFLAGS += -DHAVE_NXT200X=1
- EXTRA_CFLAGS += -DHAVE_CX24123=1
- EXTRA_CFLAGS += -DHAVE_VP3054_I2C=1
-endif
-
-ifeq ($(CONFIG_VIDEO_SAA7134_DVB),m)
- EXTRA_CFLAGS += -DHAVE_MT352=1
- EXTRA_CFLAGS += -DHAVE_TDA1004X=1
- EXTRA_CFLAGS += -DHAVE_NXT200X=1
-endif
-
-ifeq ($(CONFIG_VIDEO_BUF_DVB),m)
- EXTRA_CFLAGS += -DHAVE_VIDEO_BUF_DVB=1
-endif
-
ifeq ($(CONFIG_DVB_AV7110_OSD),y)
EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_OSD=1
endif
@@ -65,17 +55,6 @@ ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)
EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_FIRMWARE_FILE
endif
-# for pvrusb2
-ifeq ($(CONFIG_VIDEO_PVRUSB2_SYSFS),y)
- EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_SYSFS
-endif
-ifeq ($(CONFIG_VIDEO_PVRUSB2_DEBUGIFC),y)
- EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_DEBUGIFC
-endif
-ifeq ($(CONFIG_VIDEO_PVRUSB2_24XXX),y)
- EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_24XXX
-endif
-
EXTRA_CFLAGS += -g
EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL)
@@ -84,20 +63,18 @@ EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL)
# Kernel 2.4/2.6 specific rules
ifneq ($(KERNELRELEASE),)
+
ifeq ($(VERSION).$(PATCHLEVEL),2.6)
export-objs :=
list-multi :=
else
+include $(obj)/Makefile.kern24
+
multi-m := $(filter $(list-multi), $(obj-m))
int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
export-objs := $(filter $(int-m) $(obj-m),$(export-objs))
endif
-include $(obj)/Makefile.kern24
--include $(TOPDIR)/Rules.make
-else
-# take version info from last module build if available
--include $(obj)/.version
endif
#################################################
@@ -109,15 +86,14 @@ SNAPSHOT_CFLAGS := -DSNAPSHOT='$(shell cat $(snapshot))'
EXTRA_CFLAGS += $(SNAPSHOT_CFLAGS)
endif
-KDIR := /lib/modules/$(KERNELRELEASE)/build
PWD := $(shell pwd)
-DEST := /lib/modules/$(KERNELRELEASE)/$(MDIR)
+DEST := /lib/modules/$(KERNELRELEASE)/v4l2
KDIR26 := /lib/modules/$(KERNELRELEASE)/kernel/drivers/media
-KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media
#################################################
# Compiler fixup rules
+HOSTCC:=$(CC)
CC += -I$(obj)
ifeq ($(VERSION).$(PATCHLEVEL),2.6)
@@ -156,17 +132,55 @@ export LC_ALL
all:: allmodconfig default
#################################################
+# installation invocation rules
+
+install:: media-install ivtv-install
+
+remove rminstall:: media-rminstall ivtv-rminstall
+
+#################################################
# Compiling preparation rules
-Makefile.media::
+Makefile.media:: .version
scripts/make_makefile.pl
-.version:
+.version::
ifneq ($(KERNELRELEASE),)
- echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version
+ @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version
+ifneq ($(SRCDIR),)
+ @echo -e SRCDIR=$(SRCDIR)\\n >> $(obj)/.version
+endif
else
- echo "No version yet."
- uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version
+ @echo "No version yet."
+ @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version
+endif
+
+release::
+ifneq ($(VER),)
+ @echo "Forcing compiling to version $(VER)."
+ @echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version
+else
+ifneq ($(DIR),)
+ @perl -e 'open IN,"<$(DIR)/Makefile"; \
+ while (<IN>) { \
+ if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; next; }\
+ if (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; next; }\
+ if (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; next; }\
+ if (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; next; }\
+ }; \
+ printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n", \
+ $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra); \
+ printf ("SRCDIR:=$(DIR)\n");' > $(obj)/.version
+ @cat .version|grep KERNELRELEASE:|sed s,'KERNELRELEASE:=','Forcing compiling to version ',
+
+ @if [ ! -f $(DIR)/scripts/kallsyms ]; then \
+ echo "*** Warning: You should configure and build kernel before compiling V4L"; \
+ fi
+
+else
+ @echo "No version specified. Using `uname -r`."
+ @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version
+endif
endif
links::
@@ -180,7 +194,7 @@ kernel-links makelinks::
#################################################
# Cardlist updating rule
-card cardlist cardlists:
+card cardlist cardlists::
scripts/cardlist
#################################################
@@ -202,9 +216,6 @@ distclean:: clean
#################################################
# Kernel module insert/removal rules
-rmmodules::
- rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d)
-
insmod load::
scripts/insmod.sh load
@@ -222,22 +233,28 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-build := srctree=$(KDIR) HOSTCXX=$(CXX) HOSTCC=$(CC) CONFIG_SHELL=$(CONFIG_SHELL) -f $(KDIR)/scripts/Makefile.build obj
+build := srctree=$(KDIR) HOSTCXX="$(CXX)" HOSTCC="$(HOSTCC)" CONFIG_SHELL="$(CONFIG_SHELL)" -f $(KDIR)/scripts/Makefile.build obj
xconfig:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf
+ -if [ ! -f $(KDIR)/scripts/kconfig/qconf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/qconf Kconfig
./scripts/make_noconfig.pl
gconfig:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf
+ -if [ ! -f $(KDIR)/scripts/kconfig/gconf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/gconf Kconfig
./scripts/make_noconfig.pl
config:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf
+ -if [ ! -f $(KDIR)/scripts/kconfig/conf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/conf Kconfig
./scripts/make_noconfig.pl
@@ -246,14 +263,19 @@ menuconfig:: links .version
./scripts/make_kconfig.pl
-rm scripts/lxdialog scripts/kconfig
-if [ -d $(KDIR)/scripts/lxdialog ]; then \
- $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \
+ if [ ! -f $(KDIR)/scripts/lxdialog/lxdialog ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \
+ fi; \
ln -s $(KDIR)/scripts/lxdialog scripts/lxdialog; \
fi
-if [ -d $(KDIR)/scripts/kconfig ]; then \
if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then \
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \
- else \
+ if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \
+ fi; \
+ fi; \
+ if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \
$(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \
fi; \
ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \
@@ -310,9 +332,6 @@ old-install:: rminstall
#################################################
# Tree management rules
-change changes changelog::
- make -C .. changelog
-
update::
make -C .. update
@@ -323,6 +342,11 @@ push::
make -C .. push
#################################################
+# Help
+help::
+ @cat ../INSTALL
+
+#################################################
# build tarballs rules
RPWD := $(shell cd .. && pwd)
@@ -334,7 +358,7 @@ tardest ?= .
snapdir := $(HOME)/snapshot
snap := $(name)
-snapshot snap tarball: update distclean
+snapshot snap tarball:: update distclean
echo $(thisdir)
echo $(name)
echo $(date) > .snapshot
diff --git a/v4l/compat.h b/v4l/compat.h
index 9efcfebd1..0bcb238fb 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -131,19 +131,6 @@ static inline unsigned long msleep_interruptible(unsigned int msecs)
}
#endif
-#ifndef DVB_CVS
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
-#undef HAVE_LGDT330X
-#undef HAVE_TDA1004X
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
-#undef HAVE_NXT200X
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
-#undef HAVE_CX24123
-#endif
-#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
/* some keys from 2.6.x which are not (yet?) in 2.4.x */
# define KEY_PLAY 207
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 11392c32d..aebf2a950 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -14,7 +14,7 @@ sub add_bool($)
my $arg=shift;
$tristate{$arg}="bool";
- printf "Boolean:%s\n",$arg;
+# printf "Boolean:%s\n",$arg;
}
sub add_tristate($)
@@ -22,7 +22,7 @@ sub add_tristate($)
my $arg=shift;
$tristate{$arg}="tristate";
- printf "Tristate:%s\n",$arg;
+# printf "Tristate:%s\n",$arg;
}
sub add_config($)
@@ -154,7 +154,6 @@ print OUT "mainmenu \"V4L/DVB menu\"\n";
print OUT "source Kconfig.kern\n";
open_kconfig ("../linux","../linux/drivers/media/Kconfig");
-
close OUT;
while ( my ($key, $value) = each(%config) ) {
@@ -173,6 +172,10 @@ close OUT;
if (($force_kconfig eq 1) || !open IN,".config") {
open OUT,">.config";
+ while ( my ($key, $value) = each(%depend) ) {
+ printf "CONFIG_%s=m\n",$key;
+ printf OUT "CONFIG_%s=m\n",$key;
+ }
while ( my ($key,$value) = each(%tristate) ) {
if ($key eq "DVB_AV7110_FIRMWARE") {
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index 8371f6a4a..238c5082f 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -113,8 +113,9 @@ open OUT,">Makefile.media";
open_makefile ("../linux/drivers/media/Makefile");
# Creating Install rule
-printf OUT "install::\n";
-#printf OUT "\t@strip --strip-debug \$(inst-m)\n\n";
+printf OUT "media-install::\n";
+printf OUT "\t\@echo \"Stripping debug info from files:\"\n";
+printf OUT "\t\@strip --strip-debug \$(inst-m)\n\n";
while ( my ($key, $value) = each(%instdir) ) {
printf OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$key files:\"\n";
@@ -127,7 +128,7 @@ while ( my ($key, $value) = each(%instdir) ) {
printf OUT "\t/sbin/depmod -a \${KERNELRELEASE}\n\n";
# Creating Remove rule
-printf OUT "remove rminstall::\n";
+printf OUT "media-rminstall::\n";
printf OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n";
while ( my ($key, $value) = each(%instdir) ) {
@@ -160,5 +161,3 @@ if (open OUT,".myconfig") {
} else {
system "make allmodconfig";
}
-
-
diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl
index 503653a4f..a81e157e2 100755
--- a/v4l/scripts/make_noconfig.pl
+++ b/v4l/scripts/make_noconfig.pl
@@ -31,9 +31,6 @@ while (<IN>) {
}
s/\n//;
- if (m/DVB_AV7110_FIRMWARE/) {
- next;
- }
if (m/DVB_AV7110_FIRMWARE_FILE/) {
next;
}
diff --git a/v4l/versions.txt b/v4l/versions.txt
index 1d4209680..b642f60da 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -19,6 +19,7 @@ USB_ET61X251
USB_PWC
USB_PWC_DEBUG
USB_ZC0301
+VIDEO_ZORAN_AVS6EYES
[2.6.14]
VIDEO_ZORAN
@@ -191,6 +192,8 @@ DVB_OR51211
DVB_OR51132
DVB_BCM3510
DVB_LGDT330X
+DVB_LNBP21
+DVB_ISL6421
VIDEO_SAA7146
VIDEO_SAA7146_VV
VIDEO_VIDEOBUF