From 7fcf69dab28d0e73c9c2bb5744b884001faddb09 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Sat, 15 Apr 2006 16:26:44 +0200 Subject: make_noconfig.pl fixed for CONFIG_DVB_AV7110_OSD and CONFIG_DVB_AV7110_FIRMWARE From: Oliver Endriss Without this fix, CONFIG_DVB_AV7110_OSD=y and CONFIG_DVB_AV7110_FIRMWARE=y were ignored in v4l/Makefile because make_noconfig.pl set them to "CONFIG_DVB_AV7110_... = m". Signed-off-by: Oliver Endriss --- v4l/scripts/make_noconfig.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl index a47ca4acf..94f80a954 100755 --- a/v4l/scripts/make_noconfig.pl +++ b/v4l/scripts/make_noconfig.pl @@ -55,7 +55,9 @@ close IN; open OUT,">.myconfig"; while ( my ($key, $value) = each(%config) ) { - if ($value eq "y") { + if ($key ne CONFIG_DVB_AV7110_OSD && + $key ne CONFIG_DVB_AV7110_FIRMWARE && + $value eq "y") { $value="m"; } printf OUT "%-44s := %s\n",$key,$value; -- cgit v1.2.3 From c9eef42f5449ab1894a458988661f433624ccb81 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 22 Apr 2006 09:42:38 -0300 Subject: Adds capability to build conf/mconf/qconf/lxdialog at kernel tree From: Mauro Carvalho Chehab This patch adds v4l makefile capabilities to build kernel config required files to allow make menuconfig/xconfig/gconfig to work. After this patch, menu support is more smooth. Of course, root privileges are required to build those stuff. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index e932eeb65..c74019f45 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -217,17 +217,27 @@ reload:: ################################################# # Configuration rules +# SHELL used by kbuild +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 + xconfig:: links .version + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf ./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 ./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 ./scripts/make_kconfig.pl $(KDIR)/scripts/kconfig/conf Kconfig ./scripts/make_noconfig.pl @@ -236,17 +246,24 @@ menuconfig:: links .version ./scripts/make_kconfig.pl -rm scripts/lxdialog scripts/kconfig -if [ -d $(KDIR)/scripts/lxdialog ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \ 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 \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ + fi; \ ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \ fi $(KDIR)/scripts/kconfig/mconf Kconfig ./scripts/make_noconfig.pl -allmodconfig:: links .version +allyesconfig allmodconfig:: links .version + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf ./scripts/make_kconfig.pl $(KDIR)/scripts/kconfig/conf -m Kconfig cat .config|grep -v CONFIG_DVB_AV7110_FIRMWARE >.config.new -- cgit v1.2.3 From 6f290f63b3a7cd010a4bedcd36932b18617b34bb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Apr 2006 10:29:46 -0300 Subject: [PATCH] update pwc driver From: Luc Saillard Add v4l2 compatibility Include the decompressor (legal problem has been resolv by Alan Cox) Faster decoder and easier to maintain, optimize, ... Can export to userland compressed stream Support more cameras, lot of bugs are fixed. Signed-off-by: Luc Saillard Signed-off-by: Mauro Carvalho Chehab --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 255a31b17..07b983037 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -17,6 +17,7 @@ USB_IBMCAM USB_KONICAWC USB_ET61X251 USB_PWC +USB_PWC_DEBUG USB_SN9C102 USB_ZC0301 -- cgit v1.2.3 From 00ae040d86fe4250f09667bacd62bad2bd970090 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Apr 2006 11:09:17 -0300 Subject: Fix compilation for sn9c102 on older kernels From: reinhard schwab Signed-off-by: Reinhard Schwab Signed-off-by: Mauro Carvalho Chehab --- v4l/versions.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 07b983037..1d4209680 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -18,7 +18,6 @@ USB_KONICAWC USB_ET61X251 USB_PWC USB_PWC_DEBUG -USB_SN9C102 USB_ZC0301 [2.6.14] @@ -76,6 +75,9 @@ RADIO_TYPHOON_MUTEFREQ RADIO_ZOLTRIX RADIO_ZOLTRIX_PORT +[2.6.13] +USB_SN9C102 + [2.6.12] VIDEO_VIVI VIDEO_DEV -- cgit v1.2.3 From c0321d8d13c5ba11219c7db09f0ad3e3baf194f3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 10:55:03 -0400 Subject: remove forced dvb frontend module dependencies left around from old build method From: Michael Krufky Signed-off-by: Michael Krufky --- v4l/Makefile | 27 --------------------------- v4l/compat.h | 13 ------------- 2 files changed, 40 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index c74019f45..864ae6732 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -18,11 +18,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 @@ -35,28 +30,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 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 -- cgit v1.2.3 From b3517807572461268b800009d1148d4e81e79ad9 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 11:23:00 -0400 Subject: remove redundant EXTRA_CFLAGS from local Makefile for pvrusb2 From: Michael Krufky The EXTRA_CFLAGS complile-time options for pvrusb2 are determined by kbuild, and are set in drivers/media/video/pvrusb2/[Makefile|Kconfig]. Setting these flags in the local Makefile is redundant. Signed-off-by: Michael Krufky --- v4l/Makefile | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 864ae6732..a96571f1c 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -38,17 +38,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) -- cgit v1.2.3 From ad0f358703b8e45db5d9645b69503d2b99ae1e50 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 11:32:05 -0400 Subject: remove redundant EXTRA_CFLAGS setting in Makefile for CONFIG_VIDEO_ADV_DEBUG From: Michael Krufky The EXTRA_CFLAGS complile-time options are determined by kbuild. CONFIG_VIDEO_ADV_DEBUG is set in drivers/media/video/[Makefile|Kconfig]. Setting this flag in the local Makefile is redundant. Signed-off-by: Michael Krufky --- v4l/Makefile | 4 ---- 1 file changed, 4 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index a96571f1c..4c11902b5 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -18,10 +18,6 @@ default:: Makefile.media links .version ################################################# # CFLAGS configuration -ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y) - EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1 -endif - ifeq ($(CONFIG_XC3028),m) EXTRA_CFLAGS += -DCONFIG_XC3028=1 endif -- cgit v1.2.3 From 6a6a2d0070d94c04bdb2961a143fd516753464f0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 25 Apr 2006 18:20:44 -0300 Subject: Improves V4L/DVB in-tree building From: Mauro Carvalho Chehab Now, make_kconfig.sh will check for boolean/tristate config vars and handle it properly. Also, make allyesconfig/allmodconfig will use make_kconfig.sh to generate .myconfig instead of conf -m. This way, make all will not require priviledges at kernel tree. write access to kernel tree is still required for make menuconfig/ make xconfig/make qconfig. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 6 +----- v4l/scripts/make_kconfig.pl | 46 ++++++++++++++++++++++++++++++++++++++++++-- v4l/scripts/make_noconfig.pl | 5 ----- 3 files changed, 45 insertions(+), 12 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index c74019f45..9acafb007 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -263,11 +263,7 @@ menuconfig:: links .version ./scripts/make_noconfig.pl allyesconfig allmodconfig:: links .version - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf - ./scripts/make_kconfig.pl - $(KDIR)/scripts/kconfig/conf -m Kconfig - cat .config|grep -v CONFIG_DVB_AV7110_FIRMWARE >.config.new - mv .config.new .config + ./scripts/make_kconfig.pl 1 ./scripts/make_noconfig.pl ################################################# diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index b1d6f5d53..11392c32d 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -4,8 +4,27 @@ use FileHandle; my %depend = (); my %minver = (); my %config = (); +my %tristate = (); my $version, $level, $sublevel; +my $force_kconfig=shift; + +sub add_bool($) +{ + my $arg=shift; + + $tristate{$arg}="bool"; + printf "Boolean:%s\n",$arg; +} + +sub add_tristate($) +{ + my $arg=shift; + + $tristate{$arg}="tristate"; + printf "Tristate:%s\n",$arg; +} + sub add_config($) { my $arg=shift; @@ -34,6 +53,7 @@ sub open_kconfig($$) { my ($dir,$file)=@_; my $in = new FileHandle; my $skip=0; + my $key; #print "opening $file\n"; open $in,"$file"; @@ -51,9 +71,14 @@ sub open_kconfig($$) { if (m|^\s+select (.*)\n|) { check_deps ($1); } + if (m|^\s*bool\s+|) { + add_bool($key); + } + if (m|^\s*tristate\s+|) { + add_tristate($key); + } if (m|^\s*config (.*)\n|) { - my $key=$1; - + $key=$1; add_config ($1); my $min=$minver { $key }; @@ -139,9 +164,26 @@ while ( my ($key, $value) = each(%config) ) { open OUT,">Kconfig.kern"; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; +$tristate{"MODULES"}="bool"; while ( my ($key, $value) = each(%depend) ) { print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n"; } close OUT; +if (($force_kconfig eq 1) || !open IN,".config") { + open OUT,">.config"; + while ( my ($key,$value) = each(%tristate) ) { + + if ($key eq "DVB_AV7110_FIRMWARE") { + printf OUT "CONFIG_%s=n\n",$key; + } else { + if ($value eq "tristate") { + printf OUT "CONFIG_%s=m\n",$key; + } else { + printf OUT "CONFIG_%s=y\n",$key; + } + } + } + close OUT; +} diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl index 94f80a954..503653a4f 100755 --- a/v4l/scripts/make_noconfig.pl +++ b/v4l/scripts/make_noconfig.pl @@ -55,11 +55,6 @@ close IN; open OUT,">.myconfig"; while ( my ($key, $value) = each(%config) ) { - if ($key ne CONFIG_DVB_AV7110_OSD && - $key ne CONFIG_DVB_AV7110_FIRMWARE && - $value eq "y") { - $value="m"; - } printf OUT "%-44s := %s\n",$key,$value; } close OUT; -- cgit v1.2.3 From ecf096774ea92402d1ebea9d8fac8ac12316d766 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 10:13:07 -0300 Subject: Added some tests at build system to avoid rebuilding kernel stuff From: Mauro Carvalho Chehab Now, make will first check for the presense of *conf and lxconfig. if already found at kernel tree, it will use without recompiling. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index dc7836557..3afe20e8b 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -76,6 +76,7 @@ KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media ################################################# # Compiler fixup rules +HOSTCC:=$(CC) CC += -I$(obj) ifeq ($(VERSION).$(PATCHLEVEL),2.6) @@ -180,22 +181,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 @@ -204,15 +211,21 @@ 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; \ + if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \ + fi; \ else \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ + if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ + fi; \ fi; \ ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \ fi -- cgit v1.2.3 From e1526ffa31150849a329a3974cceb151193a1364 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 15:35:10 -0300 Subject: Some improvements at Makefile From: Mauro Carvalho Chehab Included a INSTALL file make help shows the INSTALL file added make release to force compiling against a specified version Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 3afe20e8b..bf4aa56f2 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -120,12 +120,21 @@ all:: allmodconfig default Makefile.media:: 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 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 + @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 links:: @@ -139,7 +148,7 @@ kernel-links makelinks:: ################################################# # Cardlist updating rule -card cardlist cardlists: +card cardlist cardlists:: scripts/cardlist ################################################# @@ -281,9 +290,6 @@ old-install:: rminstall ################################################# # Tree management rules -change changes changelog:: - make -C .. changelog - update:: make -C .. update @@ -293,6 +299,11 @@ commit cvscommit hgcommit:: push:: make -C .. push +################################################# +# Help +help:: + @cat ../INSTALL + ################################################# # build tarballs rules @@ -305,7 +316,7 @@ tardest ?= . snapdir := $(HOME)/snapshot snap := $(name) -snapshot snap tarball: update distclean +snapshot snap tarball:: update distclean echo $(thisdir) echo $(name) echo $(date) > .snapshot -- cgit v1.2.3 From 6c57a552152a8a96e51cf0d327d482e774f10eb7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 15:45:52 -0300 Subject: Cleaned an obsoleted rule From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index bf4aa56f2..289183f56 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -122,19 +122,19 @@ Makefile.media:: .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 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 + 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 - @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 + 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 links:: @@ -170,9 +170,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 @@ -299,11 +296,6 @@ commit cvscommit hgcommit:: push:: make -C .. push -################################################# -# Help -help:: - @cat ../INSTALL - ################################################# # build tarballs rules -- cgit v1.2.3 From 0ec86f485a5553976721525a52d4b85642e6de1c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 18:00:35 -0300 Subject: The latest patch partially reverted some changes. fixing it. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 289183f56..7814c6799 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -122,19 +122,19 @@ Makefile.media:: .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 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 + @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 - 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 + @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 links:: @@ -296,6 +296,11 @@ commit cvscommit hgcommit:: push:: make -C .. push +################################################# +# Help +help:: + @cat ../INSTALL + ################################################# # build tarballs rules -- cgit v1.2.3 From 50833699bf64e0d5966fb7fa4142fe7ee189fe8f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 18:08:40 -0300 Subject: Re-inserting strip at install rule From: Mauro Carvalho Chehab strip is responsible to remove all debug info from kernel object files. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_makefile.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 8371f6a4a..6b8076a4d 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -114,7 +114,8 @@ 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 "\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"; @@ -160,5 +161,3 @@ if (open OUT,".myconfig") { } else { system "make allmodconfig"; } - - -- cgit v1.2.3 From 1c45b6c1b050a3aa3207fb61e6b7628db01e8b7c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 19:27:34 -0300 Subject: Some vars were not initializated by the script. fixed. From: Mauro Carvalho Chehab This avoids warnings when running make *config Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 11392c32d..1d1155af4 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,10 +172,14 @@ 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") { - printf OUT "CONFIG_%s=n\n",$key; +# printf OUT "CONFIG_%s=n\n",$key; } else { if ($value eq "tristate") { printf OUT "CONFIG_%s=m\n",$key; -- cgit v1.2.3 From 9a2bbcda776b51c070c6859a114fb00b06f1e392 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 10:29:01 -0300 Subject: Make bt866 and ks0127 work at V4L/DVB tree From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 1d4209680..886f76fde 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 -- cgit v1.2.3 From 366fa98a817c19558aaa09755a2ce12931a35f3d Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 27 Apr 2006 09:30:20 -0400 Subject: move install / rminstall invocation rules to v4l/Makefile From: Michael Krufky This patch moves the 'make install' and 'make rminstall' rules into the central Makefile. This allows for us to assign dependencies to these rules, so that modules built as a reult of a tree-merge don't have to be installed separately. Now, instead of doing 'make install && make ivtv-install', the simple command, 'make install' will call the sub-install rules and take care of the entire task. Signed-off-by: Michael Krufky --- v4l/Makefile | 7 +++++++ v4l/scripts/make_makefile.pl | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 7814c6799..c57767940 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -114,6 +114,13 @@ export LC_ALL all:: allmodconfig default +################################################# +# installation invocation rules + +install:: media-install ivtv-install + +remove rminstall:: media-rminstall ivtv-rminstall + ################################################# # Compiling preparation rules diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 6b8076a4d..238c5082f 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -113,7 +113,7 @@ open OUT,">Makefile.media"; open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule -printf OUT "install::\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"; @@ -128,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) ) { -- cgit v1.2.3 From 1d85ad1382917c9c7823fc420a48e1f9052287e5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 17:31:16 -0300 Subject: Fix building when no .version is found From: Mauro Carvalho Chehab Makefile.media requires first .version. Fixed. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index c57767940..e786dee21 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -124,7 +124,7 @@ remove rminstall:: media-rminstall ivtv-rminstall ################################################# # Compiling preparation rules -Makefile.media:: +Makefile.media:: .version scripts/make_makefile.pl .version:: -- cgit v1.2.3 From dc9f8439dc12eaa1f581a7908ea154dffb7c1e29 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 18:34:03 -0300 Subject: Compilation for DVB_AV7110_FIRMWARE seems to be weird From: Mauro Carvalho Chehab Some systems use a previous config information to generate a default config. This seems to cause troubles on some systems. This patch fixes compilation for AV7110 firmware inside V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 2 +- v4l/scripts/make_noconfig.pl | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 1d1155af4..aebf2a950 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -179,7 +179,7 @@ if (($force_kconfig eq 1) || !open IN,".config") { while ( my ($key,$value) = each(%tristate) ) { if ($key eq "DVB_AV7110_FIRMWARE") { -# printf OUT "CONFIG_%s=n\n",$key; + printf OUT "CONFIG_%s=n\n",$key; } else { if ($value eq "tristate") { printf OUT "CONFIG_%s=m\n",$key; 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 () { } s/\n//; - if (m/DVB_AV7110_FIRMWARE/) { - next; - } if (m/DVB_AV7110_FIRMWARE_FILE/) { next; } -- cgit v1.2.3 From 7381f005d9aca7e01befb8b00597396d03e337dd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 19:01:14 -0300 Subject: Fixed a bug at make menuconfig From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index e786dee21..318d7f753 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -235,10 +235,9 @@ menuconfig:: links .version if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \ fi; \ - else \ - if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ - 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; \ fi -- cgit v1.2.3 From 761ff2c05b56e086da5a180666c4d9160155c4ec Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Fri, 28 Apr 2006 01:45:01 +0100 Subject: Convert lnbp21 to a module From: Andrew de Quincey Convert lnbp21.h into a linux kernel module. Fix up previous users to use it. Convert dvb-ttusb-budget to use it. Signed-off-by: Andrew de Quincey --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 886f76fde..0ebc1dce1 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -192,6 +192,7 @@ DVB_OR51211 DVB_OR51132 DVB_BCM3510 DVB_LGDT330X +DVB_LNBP21 VIDEO_SAA7146 VIDEO_SAA7146_VV VIDEO_VIDEOBUF -- cgit v1.2.3 From b5fe0362594b93998d9ab6c01554cc2b9dd95951 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Fri, 28 Apr 2006 01:45:09 +0100 Subject: Add isl6421 module From: Andrew de Quincey Driver for the ISL6421 LNB chip Signed-off-by: Andrew de Quincey --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 0ebc1dce1..b642f60da 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -193,6 +193,7 @@ DVB_OR51132 DVB_BCM3510 DVB_LGDT330X DVB_LNBP21 +DVB_ISL6421 VIDEO_SAA7146 VIDEO_SAA7146_VV VIDEO_VIDEOBUF -- cgit v1.2.3 From c460d095132c434e7c9b7e6c07ac34fef2c71557 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 28 Apr 2006 09:34:06 -0300 Subject: Improved make release method to allow compiling against an arbitrary dir From: Mauro Carvalho Chehab Now, with make DIR=, it is possible to compile V4L/DVB with a non-installed dir. This will allow better checking on compatibility issues (especially for -git tree) Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 55 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 318d7f753..58b160397 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -2,10 +2,31 @@ ifeq ($(obj),) 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 ################################################# @@ -42,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 ################################################# @@ -67,11 +86,9 @@ 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 @@ -130,6 +147,9 @@ Makefile.media:: .version .version:: ifneq ($(KERNELRELEASE),) @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 @@ -139,10 +159,29 @@ 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 () { \ + 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:: @echo creating symbolic links... -- cgit v1.2.3 From 91a3da5165321c89bb4a35937d47f19ac53f8899 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 2 May 2006 09:29:34 -0300 Subject: Fix checking logic for a broken xawtv version From: Mauro Carvalho Chehab moved from if to ifndef. Also added such tests at gentree script. Gentree updated to its latest version. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/gentree.pl | 77 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 27 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl index 0ae296b93..de91722a7 100755 --- a/v4l/scripts/gentree.pl +++ b/v4l/scripts/gentree.pl @@ -2,12 +2,10 @@ use strict; use File::Find; use Fcntl ':mode'; -use Cwd; my $VER = shift; my $SRC = shift; my $DESTDIR = shift; -my $cwd; my $extra; @@ -70,9 +68,9 @@ sub filter_source ($$) { if ($line =~ m/^#include \"compat.h\"/) { next; } - if ($line =~ m/[\$]Id:/) { - next; - } +# if ($line =~ m/[\$]Id:/) { +# next; +# } if ($line =~ /^#ifdef MM_KERNEL/) { chomp($line); $state{$level} = "if"; @@ -81,8 +79,12 @@ sub filter_source ($$) { $level++; next; } - if ($line =~ /^\s*#if 0\s.*[Kk][Ee][Ee][Pp].*/) { - print OUT "#if 0\n"; + if ($line =~ m|^\s*\#if\s+0\s*\/[\*]\s*[Kk][Ee].[Pp]\s*[\*]\/(.*)|) { + if ($1 eq ";") { + print OUT "#if 0\n"; + } else { + print OUT "#if 0$1\n"; + } chomp($line); $state{$level} = "ifother"; $if{$level} = 0; @@ -90,6 +92,30 @@ sub filter_source ($$) { $level++; next; } + if ($line =~ /^#ifdef\sSTV0297_CS2/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 0; + print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } + if ($line =~ /^#ifndef\sBROKEN_XAWTV/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 1; + print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } + if ($line =~ /^#ifndef\sSTV0297_CS2/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 1; + print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } if ($line =~ /^#if 0/) { chomp($line); $state{$level} = "if"; @@ -98,8 +124,8 @@ sub filter_source ($$) { $level++; next; } - if ($line =~ /^#if 1\s.*[Kk][Ee][Ee][Pp].*/) { - print OUT "#if 1\n"; + if ($line =~ m|^\s*\#if\s+1\s*\/[\*]\s*[Kk][Ee].[Pp]\s*[\*]\/(.*)|) { + print OUT "#if 1$1\n"; $state{$level} = "ifother"; $if{$level} = 1; print STDERR "/* BP #if 1 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; @@ -122,15 +148,15 @@ sub filter_source ($$) { $level++; next; } - if ($line =~ /^#if.*I2C_CLASS_TV_ANALOG/) { + if ($line =~ /^#if.*CONFIG_XC3028/) { chomp($line); $state{$level} = "if"; - $if{$level} = 1; + $if{$level} = 0; print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; $level++; next; } - if ($line =~ /^#ifndef.\s*I2C_DF_DUMMY/) { + if ($line =~ /^#if.*I2C_CLASS_TV_ANALOG/) { chomp($line); $state{$level} = "if"; $if{$level} = 1; @@ -138,22 +164,22 @@ sub filter_source ($$) { $level++; next; } - if ($line =~ /^#if.*I2C_CLASS_TV_DIGITAL/) { + if ($line =~ /^#ifndef.\s*I2C_PEC/) { chomp($line); $state{$level} = "if"; - $if{$level} = 1; + $if{$level} = 0; print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; $level++; next; } - if ($line =~ /^#if.*CONFIG_XC3028/) { + if ($line =~ /^#if.*I2C_CLASS_TV_DIGITAL/) { chomp($line); $state{$level} = "if"; - $if{$level} = 0; - print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level$ + $if{$level} = 1; + print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; $level++; next; - } + } if ($line =~ /^#if.*BTTV_VERSION_CODE/) { chomp($line); $line =~ s@^#if\s*@@; @@ -280,9 +306,7 @@ sub parse_dir { return; } - my $mode = (lstat("$cwd/$file"))[2]; - -# printf "Permissions of %s/%s are %04o (dir=%s\n", $cwd,$file, $mode, cwd; + my $mode = (lstat("$file"))[2]; if ($mode & S_IFDIR) { return; @@ -291,14 +315,14 @@ sub parse_dir { $srcdir =~ s/(.)/\[$1\]/g; my $f2 = $file; - $f2 =~ s,^$srcdir,$cwd/$DESTDIR/,; + $f2 =~ s,^$srcdir,$DESTDIR/,; print "from $file to $f2\n"; my $tmp = "/tmp/src.$$"; if ($file =~ m/.*\.[ch]$/) { - filter_source("$cwd/$file","$tmp"); + filter_source("$file","$tmp"); } else { - system("cp $cwd/$file $tmp"); + system("cp $file $tmp"); } my $dir = $f2; @@ -315,12 +339,11 @@ sub parse_dir { my $patchtmploc = "/tmp/temp.patch"; -printf STDERR < Date: Tue, 2 May 2006 15:44:02 -0300 Subject: Removed obsoleted CVS files From: Mauro Carvalho Chehab Those files were used on cvs tree. they make no sense for hg. kenel-sync: Signed-off-by: Mauro Carvalho Chehab --- v4l/.cvsignore | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 v4l/.cvsignore (limited to 'v4l') diff --git a/v4l/.cvsignore b/v4l/.cvsignore deleted file mode 100644 index 88be5bcbc..000000000 --- a/v4l/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.ko -*.o.flags -*.mod.c -.*.cmd -.version -.snapshot -.tmp_versions -- cgit v1.2.3 From 27e0a2e8659f2e3e37b7781c322647040d3566c3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 7 May 2006 18:29:49 -0400 Subject: fix ability to pass compile-time build options when building from the hg repo From: Michael Krufky When building in-kernel, compile-time build options are passed into the compiler using '#include ' . This file #include's , which is created on the fly by the kbuild system. However, this does not work correctly when building from the mercurial repository, since the kernel is built indepentently of v4l/.myconfig This creates a "config-compat.h", which will be #include'd by compat.h and will emulate for the local build. Signed-off-by: Michael Krufky --- v4l/Makefile | 20 ++++++++++++++++++-- v4l/compat.h | 1 + v4l/scripts/makelinks.sh | 2 ++ 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 58b160397..3ba4603f3 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -25,7 +25,7 @@ endif ################################################# # default compilation rule -default:: Makefile.media links .version +default:: config-compat.h Makefile.media links .version echo srcdir $(SRCDIR) $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules @@ -188,6 +188,22 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; +config-compat.h:: .myconfig + @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h + @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h + @echo >> config-compat.h + @echo \#include \ >> config-compat.h + @echo >> config-compat.h + @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ + sed s/"CONFIG\_"/"\#undef CONFIG\_"/1 | \ + sed s/"\:\= ."/""/1 >> config-compat.h >> config-compat.h + @echo >> config-compat.h + @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ + sed s/"CONFIG\_"/"\#define CONFIG\_"/1 | \ + sed s/"\:\="/""/1 >> config-compat.h >> config-compat.h + @echo >> config-compat.h + @echo \#endif >> config-compat.h + kernel-links makelinks:: cd ..; v4l/scripts/makelinks.sh $(KDIR) @@ -204,7 +220,7 @@ clean:: @find . -name '*.c' -type l -exec rm '{}' \; @find . -name '*.h' -type l -exec rm '{}' \; -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \ - ivtv-svnversion.h + ivtv-svnversion.h config-compat.h distclean:: clean -rm -f .version .*.o.flags .*.o.d Makefile.media \ diff --git a/v4l/compat.h b/v4l/compat.h index 0bcb238fb..b9138c7be 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -10,6 +10,7 @@ #include #include #include +#include "config-compat.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) # define minor(x) MINOR(x) diff --git a/v4l/scripts/makelinks.sh b/v4l/scripts/makelinks.sh index a66989771..03fd48849 100755 --- a/v4l/scripts/makelinks.sh +++ b/v4l/scripts/makelinks.sh @@ -39,10 +39,12 @@ done for x in `find include -type d | grep -v CVS` ; do ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h + touch $1/$x/config-compat.h done for x in `find drivers/media -type d | grep -v CVS` ; do ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h + touch $1/$x/config-compat.h done cd .. -- cgit v1.2.3 From a538afc7e66765d307ffd0e6d15eace695f69188 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 8 May 2006 17:50:08 -0400 Subject: fix warning: extra tokens at end of #undef directive From: Michael Krufky Signed-off-by: Michael Krufky --- v4l/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 3ba4603f3..b8eba1a44 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -196,7 +196,7 @@ config-compat.h:: .myconfig @echo >> config-compat.h @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ sed s/"CONFIG\_"/"\#undef CONFIG\_"/1 | \ - sed s/"\:\= ."/""/1 >> config-compat.h >> config-compat.h + sed s/"\:\= .*"/""/1 >> config-compat.h >> config-compat.h @echo >> config-compat.h @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ sed s/"CONFIG\_"/"\#define CONFIG\_"/1 | \ -- cgit v1.2.3 From 8a6284b4819ca82de31709838a3a83f2b4e2288b Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Sun, 14 May 2006 18:23:56 +0200 Subject: [PATCH] Genpix 8PSK->USB driver (Take 2) From: Alan Nisota This is a patch which includes support for the GENPIX 8PSK->USB module. The board supports QPSK, BPSK and 8PSK decoding (though I don't think it will be DVB-S2 compliant) With the following patch, the boad is equivalent to a budget card (no CA Module) The patch which adds 8psk suppot will follow, but is seperate, as it requires DVB-S2 support More info on the board can be found at www.genpix-electronics.com (and they host the requisite firmwares there as well) Signed off by: Alan Nisota Signed-off-by: Patrick Boettcher --- v4l/scripts/insmod.sh | 4 +++- v4l/versions.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/scripts/insmod.sh b/v4l/scripts/insmod.sh index 6efab6a82..91b4558e3 100755 --- a/v4l/scripts/insmod.sh +++ b/v4l/scripts/insmod.sh @@ -97,6 +97,7 @@ case "$1" in insmod ./cinergyT2.ko insmod ./dvb-usb.ko + insmod ./dvb-usb-gp8psk.ko insmod ./dvb-usb-vp7045.ko insmod ./dvb-usb-dtt200u.ko @@ -221,6 +222,7 @@ case "$1" in insmod ./cinergyT2.ko insmod ./dvb-usb.ko debug=0x33 + insmod ./dvb-usb-gp8psk.ko debug=0x03 insmod ./dvb-usb-vp7045.ko debug=0x03 insmod ./dvb-usb-dtt200u.ko debug=0x03 @@ -268,7 +270,7 @@ case "$1" in budget-av budget-ci budget-core ttusb_dec dvb-ttusb-budget \ ttpci-eeprom dvb-usb-nova-t-usb2.ko dvb-usb-a800.ko \ dvb-usb-umt-010.ko dvb-usb-dibusb-mc.ko dvb-usb-dibusb-mb.ko\ - dvb-usb-dibusb-common.ko dvb-usb-vp7045.ko \ + dvb-usb-dibusb-common.ko dvb-usb-gp8psk.ko dvb-usb-vp7045.ko \ dvb-usb-dtt200u.ko dvb-usb-digitv.ko dvb-usb-cxusb.ko \ dvb-usb.ko # video4linux cards diff --git a/v4l/versions.txt b/v4l/versions.txt index b642f60da..e422dcb5a 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -151,6 +151,7 @@ DVB_USB_VP7045 DVB_USB_VP702X DVB_USB_NOVA_T_USB2 DVB_USB_DTT200U +DVB_USB_GP8PSK DVB_TTUSB_BUDGET DVB_TTUSB_DEC DVB_CINERGYT2 -- cgit v1.2.3 From acbc613601ba93f26adb3ba1d91aabeff718298b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 17 May 2006 15:43:51 -0300 Subject: Fix compilation for Miropcm20 and Cinergy From: Mauro Carvalho Chehab Miropcm compilation were assuming to compile under linux/drivers/media/video, but this is not true when compiling in-tree. Also, make allyesconfig were making "y" to an advanced configuration for Cinergy. gentree.pl also updated. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/gentree.pl | 24 ++++++++++++++++++++++++ v4l/scripts/make_kconfig.pl | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl index de91722a7..e58d410c2 100755 --- a/v4l/scripts/gentree.pl +++ b/v4l/scripts/gentree.pl @@ -79,6 +79,14 @@ sub filter_source ($$) { $level++; next; } + if ($line =~ /^#ifdef _COMPAT_H/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 0; + print STDERR "/* BP #if MM_KERNEL state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } if ($line =~ m|^\s*\#if\s+0\s*\/[\*]\s*[Kk][Ee].[Pp]\s*[\*]\/(.*)|) { if ($1 eq ";") { print OUT "#if 0\n"; @@ -164,6 +172,14 @@ sub filter_source ($$) { $level++; next; } + if ($line =~ /^#ifndef.\s*I2C_DF_DUMMY/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 1; + print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } if ($line =~ /^#ifndef.\s*I2C_PEC/) { chomp($line); $state{$level} = "if"; @@ -172,6 +188,14 @@ sub filter_source ($$) { $level++; next; } + if ($line =~ /^#ifdef.\s*I2C_PEC/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 1; + print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG; + $level++; + next; + } if ($line =~ /^#if.*I2C_CLASS_TV_DIGITAL/) { chomp($line); $state{$level} = "if"; diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index aebf2a950..c4212d427 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -178,7 +178,8 @@ if (($force_kconfig eq 1) || !open IN,".config") { } while ( my ($key,$value) = each(%tristate) ) { - if ($key eq "DVB_AV7110_FIRMWARE") { + if ( ($key eq "DVB_AV7110_FIRMWARE") || + ($key eq "DVB_CINERGYT2_TUNING") ) { printf OUT "CONFIG_%s=n\n",$key; } else { if ($value eq "tristate") { -- cgit v1.2.3 From 476643d84ea8e669f1e1709af2040f2a25f75dd4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 17 May 2006 15:58:05 -0300 Subject: Added Logitech Quickcam USB support to versions.txt From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index b642f60da..1e71513fa 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -15,6 +15,7 @@ VIDEO_USBVIDEO USB_VICAM USB_IBMCAM USB_KONICAWC +USB_QUICKCAM_MESSENGER USB_ET61X251 USB_PWC USB_PWC_DEBUG -- cgit v1.2.3 From 122bd90fa6f72e1366146662e7fb9a6581aab68e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 17 May 2006 17:58:50 -0300 Subject: Removed a broken code inside make_kconfig From: Mauro Carvalho Chehab This code were not working, and were obsoleted by the while just bellow, that checks only for tristate and boolean parameters. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 4 ---- 1 file changed, 4 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index c4212d427..04430ccf2 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -172,10 +172,6 @@ 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") || -- cgit v1.2.3 From a9f25b4215fa710a1e0074888d2aab5a168d4d78 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 19 May 2006 12:11:42 -0300 Subject: Have make_kconfig.pl output int config vars with their default value From: Trent Piepho A few drivers have integer config variables defined in their Kconfig file which must be set for them to compile. make_kconfig.pl would just ignore int variables and not put them into .config at all. This change will put them into .config set to their default values. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 04430ccf2..a95e4512a 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -4,6 +4,7 @@ use FileHandle; my %depend = (); my %minver = (); my %config = (); +my %intopt = (); my %tristate = (); my $version, $level, $sublevel; @@ -25,6 +26,19 @@ sub add_tristate($) # printf "Tristate:%s\n",$arg; } +sub add_int($) +{ + $intopt{$_[0]} = '0'; +} + +sub set_int_value($$) +{ + my $key = shift; + my $val = shift; + + $intopt{$key} = $val; +} + sub add_config($) { my $arg=shift; @@ -77,6 +91,12 @@ sub open_kconfig($$) { if (m|^\s*tristate\s+|) { add_tristate($key); } + if (m|^\s*int\s|) { + add_int($key); + } + if (m|^\s*default "(\d+)"| && exists $intopt{$key}) { + set_int_value($key, $1); + } if (m|^\s*config (.*)\n|) { $key=$1; add_config ($1); @@ -185,5 +205,8 @@ if (($force_kconfig eq 1) || !open IN,".config") { } } } + while ( my ($key,$value) = each(%intopt) ) { + print OUT "CONFIG_$key=$value\n"; + } close OUT; } -- cgit v1.2.3 From 3806358efcb85863e495093fa74fb649167785b5 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 20 May 2006 21:04:31 +0200 Subject: Add support for the Texas Instruments TLV320AIC23B audio codec From: Scott Alfter Signed-off-by: Scott Alfter Signed-off-by: Hans Verkuil --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 89ceb1d5a..35cb44fc6 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -21,6 +21,7 @@ USB_PWC USB_PWC_DEBUG USB_ZC0301 VIDEO_ZORAN_AVS6EYES +VIDEO_TLV320AIC23B [2.6.14] VIDEO_ZORAN -- cgit v1.2.3 From 3ed3172e98e1adcfc81460d3bb64d1653a5adb6a Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 29 May 2006 12:42:23 -0400 Subject: compat: handle input key definitions added in 2.6.14 From: Michael Krufky Signed-off-by: Michael Krufky --- v4l/compat.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'v4l') diff --git a/v4l/compat.h b/v4l/compat.h index b9138c7be..ca0a4b886 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -178,6 +178,13 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) # define KEY_OK 0x160 # define KEY_DIGITS 0x19d #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) +# define KEY_SEND 231 +# define KEY_REPLY 232 +# define KEY_FORWARDMAIL 233 +# define KEY_SAVE 234 +# define KEY_DOCUMENTS 235 +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #define container_of(ptr, type, member) ({ \ -- cgit v1.2.3 From 60f499c58b5e9b8f97444123f1860f727a72cee4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 4 Jun 2006 05:17:58 -0300 Subject: New system for building kernel's config programs From: Trent Piepho Since v4l-dvb now uses the kernel's config system, it needs certain kernel binaries like qconf, mconf, and lxdialog to run the config targets. The kernel's Makefile is not kind enough to give us a target to just build these programs. What this patch does is introduce a new makefile, Makefile.kernel, which includes the kernel's top-level Makefile. Then adds some new "v4l-*" targets which just build the kernel config programs. The main v4l Makefile is patched to add the necessary kernel conf programs as dependencies to their respective config targets. Rules to build the kernel conf programs are added which invoke a sub-make with the new Makefile.kernel. These rules are only invoked when the kernel conf programs needed don't yet exist. If they already exist, no write access to the kernel source tree is needed. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 78 +++++++++++++++++++++++------------------------------ v4l/Makefile.kernel | 46 +++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 44 deletions(-) create mode 100644 v4l/Makefile.kernel (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index b8eba1a44..6f86925a6 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -244,66 +244,56 @@ reload:: ################################################# # Configuration rules -# SHELL used by kbuild -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="$(HOSTCC)" CONFIG_SHELL="$(CONFIG_SHELL)" -f $(KDIR)/scripts/Makefile.build obj - -xconfig:: links .version - -if [ ! -f $(KDIR)/scripts/kconfig/qconf ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf; \ - fi +# Kernel config programs +QCONF := $(KDIR)/scripts/kconfig/qconf +GCONF := $(KDIR)/scripts/kconfig/gconf +MCONF := $(KDIR)/scripts/kconfig/mconf +CONF := $(KDIR)/scripts/kconfig/conf + +# lxdialog can be in either scripts/lxdialog or scripts/kconfig/lxdialog +LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kconfig/ ; fi) +LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) +LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog + +xconfig:: links .version $(QCONF) ./scripts/make_kconfig.pl - $(KDIR)/scripts/kconfig/qconf Kconfig + $(QCONF) Kconfig ./scripts/make_noconfig.pl -gconfig:: links .version - -if [ ! -f $(KDIR)/scripts/kconfig/gconf ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf; \ - fi +gconfig:: links .version $(GCONF) ./scripts/make_kconfig.pl - $(KDIR)/scripts/kconfig/gconf Kconfig + $(QCONF) Kconfig ./scripts/make_noconfig.pl -config:: links .version - -if [ ! -f $(KDIR)/scripts/kconfig/conf ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf; \ - fi +config:: links .version $(CONF) ./scripts/make_kconfig.pl - $(KDIR)/scripts/kconfig/conf Kconfig + $(CONF) Kconfig ./scripts/make_noconfig.pl -menuconfig:: links .version +menuconfig:: links .version $(MCONF) lxdialog ./scripts/make_kconfig.pl - -rm scripts/lxdialog scripts/kconfig - -if [ -d $(KDIR)/scripts/lxdialog ]; then \ - 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 \ - 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; \ - fi - - $(KDIR)/scripts/kconfig/mconf Kconfig + $(MCONF) Kconfig ./scripts/make_noconfig.pl allyesconfig allmodconfig:: links .version ./scripts/make_kconfig.pl 1 ./scripts/make_noconfig.pl +# rule to build kernel conf programs +KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0 +$(QCONF) $(GCONF) $(MCONF) $(CONF): + $(MAKE) -C $(KDIR) -f $(PWD)/Makefile.kernel $(KMAKEVARS) v4l-$(notdir $@) + +# lxdialog has two parts, a symlink and the actual binary +.PHONY: lxdialog +lxdialog: $(LXDIALOG) $(LXDIALOG_LNK) + +$(LXDIALOG_LNK): + ln -snf $(KDIR)/$(LXDIALOG_LNK) $(LXDIALOG_LNK) + +$(LXDIALOG): + $(MAKE) -C $(KDIR) -f $(PWD)/Makefile.kernel $(KMAKEVARS) v4l-$(LXDIALOG) + ################################################# # IVTV link rules diff --git a/v4l/Makefile.kernel b/v4l/Makefile.kernel new file mode 100644 index 000000000..b01c17f55 --- /dev/null +++ b/v4l/Makefile.kernel @@ -0,0 +1,46 @@ +# This Makefile is used to build sources that are part of the kernel tree. +# What we want are the various programs used by the kconfig system. We can't +# just directly call the top-level kernel Makefile, as it doesn't provide +# targets to only build the kconfig system. It provides targets to build +# the kconfig system *and then configure the kernel*. + +# What we do is include the top-level kernel Makefile here, to get all the +# variables and rules it defines, and then add our own targets to just build +# the kconfig system. You can think of this file as a modified version of the +# top-level kernel Makefile that has "kconfig build only" targets added to it. +# Each of these new targets has the prefix v4l- so it doesn't conflict with +# any targets in the kernel Makefile. + +# Like the kernel Makefile, this Makefile should have the cwd be the root +# of the kernel source. + +# These should be defined on the command line, to override the kernel Makefile +# config-targets := 1 +# mixed-targets := 0 +# dot-config := 0 + +include Makefile + +# Used by the config target +v4l-conf: scripts_basic + $(MAKE) $(build)=scripts/kconfig scripts/kconfig/conf + +# Used by the xconfig target +v4l-qconf: scripts_basic + $(MAKE) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf + +# Used by the qconfig target +v4l-gconf: scripts_basic + $(MAKE) $(build)=scripts/kconfig gconf-target=1 scripts/kconfig/gconf + +# Used by the menuconfig target, also needs lxdialog +v4l-mconf: scripts_basic + $(MAKE) $(build)=scripts/kconfig scripts/kconfig/mconf + +# Rule used for kernel where lxdialog is in directory scripts/lxdialog +v4l-%/scripts/lxdialog/lxdialog: scripts_basic + $(MAKE) $(build)=scripts/lxdialog + +# Rule used for kernel where lxdialog is in directory scripts/kconfig/lxdialog +v4l-%/scripts/kconfig/lxdialog/lxdialog: scripts_basic + $(MAKE) $(build)=scripts/kconfig/lxdialog -- cgit v1.2.3 From ea9723bc221278765e75d0362ce36881285ee241 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 8 Jun 2006 12:12:07 -0300 Subject: Improve v4l configuration scripts, handle versions.txt differently From: Trent Piepho This mainly changes the way make_kconfig.pl handles config options that require a newer kernel, as defined by versions.txt. Currently it outputs a blank config stanza defining the variable and setting it to 'n'. These show up as mysterious un-named grayed out options in xconfig, or just don't appear at all in menuconfig. The new method outputs an extra config stanza to the top of v4l/Kconfig, VIDEO_KERNEL_VERSION. This boolean variable defaults to 'n', and if enabled, allows selecting drivers that are listed as needing a newer kernel. Config options that need a newer kernel still apear in v4l/Kconfig with their names and help text, but they now have an additional dependency on VIDEO_KERNEL_VERSION, and an extra bit in the help text warning that they need a newer kernel. They will appear greyed out in xconfig, but will still have their proper names and help text. If the user turns VIDEO_KERNEL_VERSION on, then they can be enabled. The kernel version in versions.txt tends to be somewhat conservative. The default v4l/.config file generated by make_kconfig.pl will have these options set to no, instead of yes/module as it did before. make_noconfig.pl will no longer look at versions.txt, or deal with kernel version detection. It will get a list of all config options by reading v4l/Kconfig, and produce .myconfig by setting all bool/tristate options to their value from v4l/.config, or 'n' if not listed. A few bugs have been fixed, and the regexs adjusted. They were making a few mistakes before, or were otherwise flawed. The scripts do more error checking that the files they parse conform to the expected syntax. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvaho Chehab --- v4l/scripts/make_kconfig.pl | 146 +++++++++++++++++++++++++++++++------------ v4l/scripts/make_noconfig.pl | 57 ++++++----------- 2 files changed, 127 insertions(+), 76 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index a95e4512a..16135c034 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -14,6 +14,7 @@ sub add_bool($) { my $arg=shift; + exists $config{$arg} or die "Adding unknown boolean '$arg'"; $tristate{$arg}="bool"; # printf "Boolean:%s\n",$arg; } @@ -22,13 +23,17 @@ sub add_tristate($) { my $arg=shift; + exists $config{$arg} or die "Adding unknown tristate '$arg'"; $tristate{$arg}="tristate"; # printf "Tristate:%s\n",$arg; } sub add_int($) { - $intopt{$_[0]} = '0'; + my $arg=shift; + + exists $config{$arg} or die "Adding unknown int '$arg'"; + $intopt{$arg} = 0; } sub set_int_value($$) @@ -36,6 +41,7 @@ sub set_int_value($$) my $key = shift; my $val = shift; + exists $intopt{$key} or die "Default for unknown int option '$key'"; $intopt{$key} = $val; } @@ -43,11 +49,22 @@ sub add_config($) { my $arg=shift; - if ($arg =~ m/^([A-Z0-9_]+)/) { + if ($arg =~ m/^(\w+)/) { + # Have option default to 'on' $config{$1} = 1; + } else { + die "Do not understand config variable '$arg'"; } } +# Turn option off, iff it already exists +sub disable_config($) +{ + my $key = shift; + + $config{$key} = 0 if (exists $config{$key}); +} + sub check_deps($) { my $arg=shift; @@ -66,7 +83,7 @@ sub check_deps($) sub open_kconfig($$) { my ($dir,$file)=@_; my $in = new FileHandle; - my $skip=0; + my $disabled=0; my $key; #print "opening $file\n"; @@ -75,29 +92,61 @@ sub open_kconfig($$) { # if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) { # next; # } - if (m|^\s*source[\s\"]+([^\n\s\"]+)[\n\s\"]|) { + + # start of a new stanza, reset + if (m/^\w/) { + $disabled = 0; + $default_seen = 0; + $key = undef; + } + + if (m|^\s*source\s+"([^"]+)"\s*$| || + m|^\s*source\s+(\S+)\s*$|) { open_kconfig($dir,"$dir/$1"); next; } - if (m|^\s+depends on (.*)\n|) { + if (m|^\s+depends on\s+(.*)\n|) { check_deps ($1); } - if (m|^\s+select (.*)\n|) { + if (m|^\s+select\s+(.*)\n|) { check_deps ($1); } - if (m|^\s*bool\s+|) { + if (m|^\s+bool(ean)?\s|) { add_bool($key); } - if (m|^\s*tristate\s+|) { + if (m|^\s+tristate\s|) { add_tristate($key); } - if (m|^\s*int\s|) { + if (m|^\s+int\s|) { add_int($key); } - if (m|^\s*default "(\d+)"| && exists $intopt{$key}) { + # Get default for int options + if (m|^\s+default "(\d+)"| && exists $intopt{$key}) { set_int_value($key, $1); } - if (m|^\s*config (.*)\n|) { + # Override default for disabled tri/bool options + if (m/^\s+default (y|n|m|"yes"|"no")\s+(if .*)?$/ && + exists $tristate{$key} && $disabled) { + $default_seen = 1; + $_ = "\tdefault n\n"; + } + + # check for end of config definition for disabled drivers + # we need to make sure we've disabled it, and add a bit + # to the help text + if (m|^\s*(---)?help(---)?\s*$| && $disabled) { + print OUT "\tdefault n\n" unless($default_seen); + print OUT <<"EOF"; + depends on VIDEO_KERNEL_VERSION + help + WARNING! This driver needs at least kernel $minver{$key}! It may not + compile or work correctly on your kernel, which is too old. + +EOF + next; + } + + if (m|^\s*config (\w+)\s*$|) { $key=$1; add_config ($1); @@ -110,27 +159,22 @@ sub open_kconfig($$) { } else { die "Minimum version for $key not found at versions.txt"; } - if ( ($version < $minversion) | - ($level < $minlevel) | + if ( ($version < $minversion) || + ($level < $minlevel) || ($sublevel < $minsublevel) ) { - $skip=1; - printf "$key requires version $minversion.$minlevel.$minsublevel\n"; - - print OUT "# $key disabled due to incorrect version\nconfig $key\n\ttristate\n\tdefault n\n\n"; - next; + $disabled=1; + disable_config ($key); + print "$key requires version $minversion.$minlevel.$minsublevel\n"; + print OUT "# $key disabled for insufficient kernel version\n"; } else { -# printf "OK: $key requires version $minversion.$minlevel.$minsublevel\n"; - $skip=0; +# print "OK: $key requires version $minversion.$minlevel.$minsublevel\n"; + $disabled=0; } } s/^main(menu\s\"[^\"]+)/\1 - DON'T CHANGE IT!/; - if (m/^[\w]/) { - $skip=0; - } - if (!$skip) { - print OUT $_; - } + + print OUT $_; } close $in; } @@ -170,9 +214,31 @@ close IN; printf "Preparing to compile for kernel version %d.%d.%d\n",$version,$level,$sublevel; open OUT,">Kconfig"; -print OUT "mainmenu \"V4L/DVB menu\"\n"; -print OUT "source Kconfig.kern\n"; +print OUT <<"EOF"; +mainmenu "V4L/DVB menu" +source Kconfig.kern +config VIDEO_KERNEL_VERSION + bool "Enable drivers not supported by this kernel" + default n + ---help--- + Normally drivers that require a kernel newer $version.$level.$sublevel, + the kernel you are compiling for now, will be disabled. + + Turning this switch on will let you enabled them, but be warned + they may not work properly or even compile. + + They may also work fine, and the only reason they are listed as + requiring a newer kernel is that no one has tested them with an + older one yet. + + If the driver works, please post a report at V4L mailing list: + video4linux-list\@redhat.com. + + Unless you know what you are doing, you should answer N. + +EOF + open_kconfig ("../linux","../linux/drivers/media/Kconfig"); close OUT; @@ -183,26 +249,28 @@ while ( my ($key, $value) = each(%config) ) { open OUT,">Kconfig.kern"; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; -$tristate{"MODULES"}="bool"; +add_config('MODULES'); +add_bool('MODULES'); while ( my ($key, $value) = each(%depend) ) { print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n"; } close OUT; +# These options should default to off +disable_config('DVB_AV7110_FIRMWARE'); +disable_config('DVB_CINERGYT2_TUNING'); + +# Produce a .config file if it's forced or one doesn't already exist if (($force_kconfig eq 1) || !open IN,".config") { open OUT,">.config"; while ( my ($key,$value) = each(%tristate) ) { - - if ( ($key eq "DVB_AV7110_FIRMWARE") || - ($key eq "DVB_CINERGYT2_TUNING") ) { - printf OUT "CONFIG_%s=n\n",$key; - } else { - if ($value eq "tristate") { - printf OUT "CONFIG_%s=m\n",$key; - } else { - printf OUT "CONFIG_%s=y\n",$key; - } + if (!$config{$key}) { + print OUT "CONFIG_$key=n\n"; + } elsif ($value eq 'tristate') { + print OUT "CONFIG_$key=m\n"; + } else { # must be 'bool' + print OUT "CONFIG_$key=y\n"; } } while ( my ($key,$value) = each(%intopt) ) { diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl index a81e157e2..cb3ea9627 100755 --- a/v4l/scripts/make_noconfig.pl +++ b/v4l/scripts/make_noconfig.pl @@ -1,57 +1,40 @@ #!/usr/bin/perl -my $config = (); +my %config = (); +my %allconfig = (); open IN,".config"; while () { - if (m/\s*([\d\w_]+)[=](.*)\n/) { + if (m/\s*(\w+)=\s*(\S*)/) { #printf "%s=%s\n",$1,$2; $config { $1 } = $2; } } close IN; -open IN,".version"; +# Build table of _all_ bool and tristate config variables +open IN,"Kconfig"; while () { - if (m/KERNELRELEASE\s*[:]*[=]+\s*(\d+)\.(\d+)\.(\d+)/) { - $version=$1; - $level=$2; - $sublevel=$3; - } -} -close IN; - -open IN,"versions.txt"; -while () { - if (m/\[(\d+)\.(\d+)\.(\d+)\]/) { - $minversion=$1; - $minlevel=$2; - $minsublevel=$3; - next; - } - s/\n//; - - if (m/DVB_AV7110_FIRMWARE_FILE/) { - next; - } - if (m/^\s*([\w\d_]+)/) { - if ( ($version < $minversion) | - ($level < $minlevel) | - ($sublevel < $minsublevel) ) { - $config { "CONFIG_$1" } = 'n'; -#print "CONFIG_$1 version is not supported\n"; - next; - } - if (!($config { "CONFIG_$1" } ) ) { -print "CONFIG_$1 is unset\n"; - $config { "CONFIG_$1" } = 'n'; - } + if (/^config\s+(\w+)\s*$/) { + $key = "CONFIG_$1"; + } elsif (/^\s+bool(ean)?\s/) { + $allconfig{$key} = 'bool'; + $key = 0; + } elsif (/^\s+tristate\s/) { + $allconfig{$key} = 'tristate'; + $key = 0; } + # else, must be int or string, ignore } close IN; +exists $allconfig{0} and die "Unable to correctly parse Kconfig file"; + +# Produce output for including in a Makefile +# Explicitly set options that didn't appear in .config to n open OUT,">.myconfig"; -while ( my ($key, $value) = each(%config) ) { +while ( my ($key, $value) = each(%allconfig) ) { + $value = exists $config{$key} ? $config{$key} : 'n'; printf OUT "%-44s := %s\n",$key,$value; } close OUT; -- cgit v1.2.3 From 6b9db488d186cc23b3ab9a64fc2ad687c07407bf Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 8 Jun 2006 15:07:18 -0300 Subject: insmod.sh were replaced by a perl script (rmmod.pl) From: Mauro Carvalho Chehab insmod.sh were a hack, were somebody should check all dependencies for each module. Several dependencies were mising, and, to keep it updated for 178 modules is really hard. rmmod.pl is a "smart" script: it does: 1) Check, for each found module on v4l, the correct order for each module; 2) Check any dependencies for out-of-tree modules; 3) rmmod/insmod at the correct order; 4) It have a table with the suggested debug parameter for each module. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 13 ++- v4l/scripts/insmod.sh | 307 -------------------------------------------------- v4l/scripts/rmmod.pl | 193 +++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 312 deletions(-) delete mode 100755 v4l/scripts/insmod.sh create mode 100644 v4l/scripts/rmmod.pl (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 6f86925a6..87fdc5270 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -232,14 +232,17 @@ distclean:: clean ################################################# # Kernel module insert/removal rules -insmod load:: - scripts/insmod.sh load +start insmod load:: + scripts/rmmod.pl load -rmmod unload:: - scripts/insmod.sh unload +stop rmmod unload:: + scripts/rmmod.pl unload reload:: - scripts/insmod.sh reload + scripts/rmmod.pl reload + +debug:: + scripts/rmmod.pl debug ################################################# # Configuration rules diff --git a/v4l/scripts/insmod.sh b/v4l/scripts/insmod.sh deleted file mode 100755 index 91b4558e3..000000000 --- a/v4l/scripts/insmod.sh +++ /dev/null @@ -1,307 +0,0 @@ -#!/bin/sh -# insmod modules from current directory without having to install them first - -sync - -case "$1" in - load) - echo "Inserting V4L/DVB modules into kernel" - modprobe i2c-core - modprobe crc32 - modprobe firmware_class - # make sure input stuff is there for IR remote controls - modprobe evdev - # video4linux - insmod ./compat_ioctl32.ko - insmod ./videodev.ko - insmod ./v4l1-compat.ko - insmod ./v4l2-common.ko - insmod ./video-buf.ko - insmod ./ir-common.ko - insmod ./ir-kbd-i2c.ko - insmod ./tuner.ko - insmod ./tda9887.ko - insmod ./tvaudio.ko - insmod ./tveeprom.ko - insmod ./tvmixer.ko - insmod ./cs53l32a.ko - insmod ./wm8775.ko - insmod ./cx25840.ko - insmod ./saa7115.ko - insmod ./btcx-risc.ko - insmod ./saa7127.ko - insmod ./msp3400.ko - insmod ./tvp5150.ko - insmod ./tda7432.ko - insmod ./tda9840.ko - insmod ./tda9875.ko - insmod ./tea6415c.ko - insmod ./tea6420.ko - # DVB core - insmod ./dvb-core.ko # dvb_net_debug=1 - # for hybrid cx88 and saa7134 cards - insmod ./video-buf-dvb.ko - # frontend drivers - insmod ./dvb-pll.ko - insmod ./ves1x93.ko - insmod ./sp8870.ko - insmod ./cx22700.ko - insmod ./stv0299.ko - insmod ./ves1820.ko - insmod ./tda1004x.ko - insmod ./tda10021.ko - insmod ./dib3000-common.ko - insmod ./dib3000mb.ko - insmod ./dib3000mc.ko - insmod ./l64781.ko - insmod ./tda8083.ko - insmod ./cx24110.ko - insmod ./cx24123.ko - insmod ./cx22702.ko - insmod ./mt312.ko - insmod ./mt352.ko - insmod ./stv0297.ko - insmod ./nxt200x.ko - insmod ./lgdt330x.ko - insmod ./nxt6000.ko - insmod ./bcm3510.ko - insmod ./s5h1420.ko - insmod ./sp887x.ko - insmod ./or51211.ko - insmod ./or51132.ko - insmod ./zl10353.ko - insmod ./ttusbdecfe.ko - - # saa7146 based siemens/technotrend/hauppauge cards - insmod ./saa7146.ko - insmod ./saa7146_vv.ko - insmod ./ttpci-eeprom.ko - insmod ./dvb-ttpci.ko - insmod ./budget-core.ko - insmod ./budget.ko - insmod ./budget-ci.ko - insmod ./budget-av.ko - insmod ./mxb.ko - insmod ./hexium_gemini.ko - insmod ./hexium_orion.ko - # technotrend/hauppauge USB things - insmod ./dvb-ttusb-budget.ko - insmod ./ttusb_dec.ko - - # technisat skystar2 - insmod ./stv0297_cs2.ko - insmod ./b2c2-flexcop.ko - insmod ./b2c2-flexcop-usb.ko - insmod ./b2c2-flexcop-pci.ko - # terratec CinergyT2 - insmod ./cinergyT2.ko - - insmod ./dvb-usb.ko - insmod ./dvb-usb-gp8psk.ko - insmod ./dvb-usb-vp7045.ko - insmod ./dvb-usb-dtt200u.ko - - insmod ./dvb-usb-dibusb-common.ko - insmod ./dvb-usb-dibusb-mb.ko - insmod ./dvb-usb-dibusb-mc.ko - insmod ./dvb-usb-a800.ko - insmod ./dvb-usb-nova-t-usb2.ko - insmod ./dvb-usb-umt-010.ko - insmod ./dvb-usb-digitv.ko - insmod ./dvb-usb-cxusb.ko - # bt8xx - insmod ./bt832.ko - insmod ./bttv.ko - insmod ./bt878.ko - insmod ./dst.ko - insmod ./dst_ca.ko - insmod ./dvb-bt8xx.ko - insmod ./saa6588.ko - # conexant cx2388x - insmod ./cx88xx.ko - insmod ./cx8800.ko - insmod ./cx8802.ko - insmod ./cx88-vp3054-i2c.ko - insmod ./cx88-dvb.ko - insmod ./cx88-blackbird.ko - insmod ./cx88-alsa.ko - # phillips saa713x - insmod ./saa7134.ko - insmod ./saa7134-alsa.ko -# insmod ./saa7134-oss.ko - insmod ./saa7134-dvb.ko - insmod ./saa7134-empress.ko - insmod ./saa6752hs.ko - - insmod ./em28xx.ko - insmod ./pvrusb2.ko - insmod ./cpia2.ko - insmod ./vivi.ko - - echo - ;; - debug) - echo "Inserting V4L/DVB modules (debug) into kernel" - modprobe i2c-core - modprobe crc32 - modprobe firmware_class - modprobe evdev - insmod ./compat_ioctl32.ko - insmod ./videodev.ko - insmod ./v4l1-compat.ko - insmod ./v4l2-common.ko - insmod ./video-buf.ko - insmod ./ir-common.ko - insmod ./ir-kbd-i2c.ko - insmod ./tuner.ko tuner_debug=1 - insmod ./tda9887.ko - insmod ./tvaudio.ko - insmod ./tveeprom.ko - insmod ./tvmixer.ko - insmod ./cs53l32a.ko - insmod ./wm8775.ko - insmod ./cx25840.ko - insmod ./saa7115.ko - insmod ./btcx-risc.ko - insmod ./saa7127.ko - insmod ./msp3400.ko - insmod ./tvp5150.ko - insmod ./tda7432.ko - insmod ./tda9840.ko - insmod ./tda9875.ko - insmod ./tea6415c.ko - insmod ./tea6420.ko - insmod ./dvb-core.ko cam_debug=1 - insmod ./video-buf-dvb.ko - insmod ./dvb-pll.ko - insmod ./ves1x93.ko - insmod ./sp8870.ko - insmod ./cx22700.ko - insmod ./stv0299.ko - insmod ./ves1820.ko - insmod ./tda1004x.ko - insmod ./tda10021.ko - insmod ./dib3000-common.ko - insmod ./dib3000mb.ko - insmod ./dib3000mc.ko - insmod ./l64781.ko - insmod ./stv0297.ko - insmod ./tda8083.ko - insmod ./cx24110.ko - insmod ./cx24123.ko - insmod ./mt312.ko - insmod ./mt352.ko - insmod ./cx22702.ko - insmod ./nxt200x.ko - insmod ./lgdt330x.ko - insmod ./nxt6000.ko - insmod ./bcm3510.ko - insmod ./s5h1420.ko - insmod ./sp887x.ko - insmod ./or51211.ko - insmod ./or51132.ko - insmod ./zl10353.ko - insmod ./ttusbdecfe.ko - insmod ./saa7146.ko - insmod ./saa7146_vv.ko - insmod ./ttpci-eeprom.ko - insmod ./dvb-ttpci.ko debug=247 - insmod ./budget-core.ko - insmod ./budget.ko - insmod ./budget-ci.ko - insmod ./budget-av.ko - insmod ./mxb.ko - insmod ./hexium_gemini.ko - insmod ./hexium_orion.ko - insmod ./dvb-ttusb-budget.ko - insmod ./stv0297_cs2.ko - insmod ./b2c2-flexcop.ko debug=0x01 - insmod ./b2c2-flexcop-usb.ko debug=0x01 - insmod ./b2c2-flexcop-pci.ko debug=0x01 - insmod ./ttusb_dec.ko - insmod ./cinergyT2.ko - - insmod ./dvb-usb.ko debug=0x33 - insmod ./dvb-usb-gp8psk.ko debug=0x03 - insmod ./dvb-usb-vp7045.ko debug=0x03 - insmod ./dvb-usb-dtt200u.ko debug=0x03 - - insmod ./dvb-usb-dibusb-common.ko debug=0x03 - insmod ./dvb-usb-dibusb-mb.ko - insmod ./dvb-usb-dibusb-mc.ko - insmod ./dvb-usb-a800.ko - insmod ./dvb-usb-nova-t-usb2.ko - insmod ./dvb-usb-umt-010.ko - insmod ./dvb-usb-digitv.ko - insmod ./dvb-usb-cxusb.ko - - insmod ./bt832.ko - insmod ./bttv.ko - insmod ./bt878.ko - insmod ./dst.ko - insmod ./dst_ca.ko - insmod ./dvb-bt8xx.ko - insmod ./saa6588.ko - - insmod ./cx88xx.ko - insmod ./cx8800.ko - insmod ./cx8802.ko - insmod ./cx88-vp3054-i2c.ko - insmod ./cx88-dvb.ko - insmod ./cx88-blackbird.ko - insmod ./cx88-alsa.ko - - insmod ./saa7134.ko - insmod ./saa7134-alsa.ko - insmod ./saa7134-oss.ko - insmod ./saa7134-dvb.ko - insmod ./saa7134-empress.ko - insmod ./saa6752hs.ko - - insmod ./em28xx.ko - insmod ./pvrusb2.ko - insmod ./cpia2.ko - insmod ./vivi.ko - echo - ;; - unload) - echo "Removing V4L/DVB modules from kernel" - rmmod b2c2-flexcop-usb b2c2-flexcop-pci b2c2-flexcop dvb-ttpci budget \ - budget-av budget-ci budget-core ttusb_dec dvb-ttusb-budget \ - ttpci-eeprom dvb-usb-nova-t-usb2.ko dvb-usb-a800.ko \ - dvb-usb-umt-010.ko dvb-usb-dibusb-mc.ko dvb-usb-dibusb-mb.ko\ - dvb-usb-dibusb-common.ko dvb-usb-gp8psk.ko dvb-usb-vp7045.ko \ - dvb-usb-dtt200u.ko dvb-usb-digitv.ko dvb-usb-cxusb.ko \ - dvb-usb.ko -# video4linux cards - rmmod cx88-alsa cx88-blackbird cx88-dvb cx88-vp3054-i2c cx8802 cx8800 \ - cx88xx saa7134-oss saa7134-alsa saa7134-empress saa7134-dvb \ - saa7134 dvb-bt8xx dst_ca dst bt878 bttv bt832 mxb \ - hexium_gemini hexium_orion em28xx pvrusb2 cpia2 vivi - -# frontends - rmmod dib3000mb zl10353 dib3000mc dib3000_common nxt200x ves1x93 \ - sp8870 cx22700 stv0299 ves1820 cinergyT2 ttusbdecfe \ - tda1004x l64781 tda8083 cx24110 cx22702 stv0297 \ - tda10021 mt352 mt312 bcm3510 s5h1420 nxt6000 \ - stv0297_cs2 lgdt330x cx24123 sp887x or51211 or51132 \ - dvb-pll - -# chips and helpers - rmmod saa7127 msp3400 tvp5150 tda7432 tda9840 tda9875 tea6415c tea6420 \ - saa6752hs saa6588 btcx-risc tveeprom tvaudio tda9887 tuner \ - ir-kbd-i2c ir-common cx25840 tvmixer cs53l32a wm8775 saa7115 \ - saa7146_vv saa7146 video-buf-dvb video-buf \ - v4l2-common v4l1-compat dvb-core videodev compat_ioctl32 - - echo - ;; - reload) - $0 unload && $0 load - ;; - *) - echo "Usage$0 {load|unload|debug|reload}" - exit 1 -esac - -sync diff --git a/v4l/scripts/rmmod.pl b/v4l/scripts/rmmod.pl new file mode 100644 index 000000000..6cb690217 --- /dev/null +++ b/v4l/scripts/rmmod.pl @@ -0,0 +1,193 @@ +#!/usr/bin/perl +use strict; +use File::Find; + +my %depend = (); +my %depend2 = (); +my %rmlist = (); +my @nodep; +my @modlist; +my @allmodules; +my %reqmodules; +my %loaded = (); +my $i=0; + +# Device debug parameters +# Module name Debug option +my %debug = ( "tuner" => "tuner_debug=1", + "dvb-core" => "cam_debug=1", + "dvb-ttpci" => "debug=247", + "b2c2-flexcop" => "debug=0x01", + "b2c2-flexcop-usb" => "debug=0x01", + "b2c2-flexcop-pci" => "debug=0x01", + "dvb-usb" => "debug=0x33", + "dvb-usb-gp8psk" => "debug=0x03", + "dvb-usb-vp7045" => "debug=0x03", + "dvb-usb-dtt200u" => "debug=0x03", + "dvb-usb-dibusb-common" => "debug=0x03", + ); + + +sub parse_dir { + my $file = $File::Find::name; + + if (!($file =~ /[.]ko$/)) { + return; + } + + my $module = $file; + $module =~ s|^[./]*(.*)[.]ko|\1|; + + open IN, "modinfo $file|grep depends|cut -b 17-|"; + while () { + my $deps = $_; + $deps =~ s/\n//; + $deps =~ s/[,]/ /g; + $deps = " $deps "; + $depend{$module} = $deps; + push @allmodules, $module; + $i++; + } + close IN; +} + +sub parse_loaded { + open IN, "/proc/modules"; + while () { + m/^([\w\d_-]+)/; + $loaded{$1}=1; + } + close IN; +} + +sub cleandep() +{ + my $dep; + + while ( my ($k, $v) = each(%depend) ) { + my $arg=$v; + my $arg2=" "; + while (!($arg =~ m/^\s*$/)) { + if ($arg =~ m/^ ([^ ]+) /) { + my $val=$1; + if (exists($depend{$val})) { + $arg2="$arg2 $val "; + } else { + $reqmodules{$val}=1; + } + } + $arg =~ s/^ [^ ]+//; + $arg2 =~ s/\s\s+/ /; + } + $depend2 { $k } = $arg2; + } + +} + +sub rmdep() +{ + my $dep; + + while ($dep=pop @nodep) { + while ( my ($k, $v) = each(%depend2) ) { + if ($v =~ m/\s($dep)\s/) { + $v =~ s/\s${dep}\s/ /; + $v =~ s/\s${dep}\s/ /; + $v =~ s/\s${dep}\s/ /; + $depend2 {$k} = $v; + } + } + } +} + +sub orderdep () +{ + my $old; + do { + $old=$i; + while ( my ($key, $value) = each(%depend2) ) { + if ($value =~ m/^\s*$/) { + push @nodep, $key; + push @modlist, $key; + $i=$i-1; + delete $depend2 {$key}; + } + } + rmdep(); + } until ($old==$i); + while ( my ($key, $value) = each(%depend2) ) { + printf "ERROR: bad dependencies - $key ($value)\n"; + } +} + +sub insmod ($) +{ + my $debug=shift; + + while ( my ($key, $value) = each(%reqmodules) ) { + printf ("modprobe $key\n"); + system ("modprobe $key"); + } + + foreach my $key (@modlist) { + if ($debug) { + my $dbg=$debug{$key}; + + printf "insmod ./$key.ko $dbg\n"; + system "insmod ./$key.ko $dbg\n"; + } else { + printf "insmod ./$key.ko\n"; + system "insmod ./$key.ko\n"; + } + } +} + +sub rmmod () +{ + my $cmd="rmmod"; + while (my $key=pop @modlist) { + my $dep=$key; + $dep=~s/[\-]/_/g; + if (exists ($loaded{$dep})) { + printf "$cmd ./$key.ko\n"; + system "$cmd ./$key.ko\n"; + } + } +} + +sub prepare_cmd() +{ + find(\&parse_dir, "."); + printf "found $i modules\n"; + + cleandep(); + orderdep(); +} + +# main +my $mode=shift; +if ($mode eq "load") { + prepare_cmd; + insmod(0); +} else { + if ($mode eq "unload") { + prepare_cmd; + parse_loaded; + rmmod; + } else { + if ($mode eq "reload") { + prepare_cmd; + parse_loaded; + rmmod; + insmod(0); + } else { + if ($mode eq "debug") { + prepare_cmd; + parse_loaded; + insmod(1); + } else { + printf "Usage: $0 [load|unload|reload]\n"; + } + } + } +} -- cgit v1.2.3 From 48f270e2f6dff0d7521b34ba75dfa8d7cf391cd4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 8 Jun 2006 17:13:52 -0300 Subject: Handles also hexa fields on Kconfig From: Mauro Carvalho Chehab The same threatment to integer can also be applied Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 16135c034..0d396c8f4 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -120,6 +120,9 @@ sub open_kconfig($$) { if (m|^\s+int\s|) { add_int($key); } + if (m|^\s+hex\s|) { + add_int($key); + } # Get default for int options if (m|^\s+default "(\d+)"| && exists $intopt{$key}) { set_int_value($key, $1); -- cgit v1.2.3 From 3f6fb6f3acef43c20b96855b273c9b912af22b87 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 8 Jun 2006 17:16:46 -0300 Subject: There were a cross-reference on cpia and cpia_pp/cpia_usb From: Mauro Carvalho Chehab Those cross-references were generating an error: *** Warning: "cpia_pp_init" [/home/v4l/master/v4l/cpia.ko] undefined! *** Warning: "cpia_usb/_init" [/home/v4l/master/v4l/cpia.ko] undefined! Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/rmmod.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 v4l/scripts/rmmod.pl (limited to 'v4l') diff --git a/v4l/scripts/rmmod.pl b/v4l/scripts/rmmod.pl old mode 100644 new mode 100755 -- cgit v1.2.3 From cb280e81213d8fd2f87abc3ac2a6a23fd316da5d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 8 Jun 2006 18:00:33 -0300 Subject: Make reload were not working. fixed. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/rmmod.pl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'v4l') diff --git a/v4l/scripts/rmmod.pl b/v4l/scripts/rmmod.pl index 6cb690217..eb8f02d14 100755 --- a/v4l/scripts/rmmod.pl +++ b/v4l/scripts/rmmod.pl @@ -178,7 +178,9 @@ if ($mode eq "load") { if ($mode eq "reload") { prepare_cmd; parse_loaded; + my @modlist2=@modlist; rmmod; + @modlist=@modlist2; insmod(0); } else { if ($mode eq "debug") { -- cgit v1.2.3 From e36b7b260ab8cee00f043cfcd64a4bec046997df Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 12 Jun 2006 17:03:58 -0300 Subject: Hex option defaults weren't handled correct in make_kconfig From: Trent Piepho The regex for int and hex option defaults was only correct for int options, it didn't handle hex characters. The kernel version code was outputing "default n" lines for disabled hex and int options, it should only be done for boolean and tristate options. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 0d396c8f4..228e0aa48 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -32,7 +32,7 @@ sub add_int($) { my $arg=shift; - exists $config{$arg} or die "Adding unknown int '$arg'"; + exists $config{$arg} or die "Adding unknown int/hex '$arg'"; $intopt{$arg} = 0; } @@ -41,7 +41,7 @@ sub set_int_value($$) my $key = shift; my $val = shift; - exists $intopt{$key} or die "Default for unknown int option '$key'"; + exists $intopt{$key} or die "Default for unknown int/hex option '$key'"; $intopt{$key} = $val; } @@ -124,7 +124,7 @@ sub open_kconfig($$) { add_int($key); } # Get default for int options - if (m|^\s+default "(\d+)"| && exists $intopt{$key}) { + if (m|^\s+default "([[:xdigit:]]+)"| && exists $intopt{$key}) { set_int_value($key, $1); } # Override default for disabled tri/bool options @@ -138,7 +138,9 @@ sub open_kconfig($$) { # we need to make sure we've disabled it, and add a bit # to the help text if (m|^\s*(---)?help(---)?\s*$| && $disabled) { - print OUT "\tdefault n\n" unless($default_seen); + if(exists $tristate{$key} && !$default_seen) { + print OUT "\tdefault n\n"; + } print OUT <<"EOF"; depends on VIDEO_KERNEL_VERSION help -- cgit v1.2.3 From da4bf4260d1fe9964768ced721f2cbcb8c740850 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 12 Jun 2006 17:05:52 -0300 Subject: mailimport improved to accept "hg export" patches From: Mauro Carvalho Chehab Now, script will detect "hg export" patches inside emails, removing non-pertinent headers, keeping only the original commit message and the patch. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/hghead.pl | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index ddaef0767..16e566ea9 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -8,10 +8,10 @@ use Date::Parse; my $in = shift; my $line; my $subject; -my $from=0; my $sub_ok=0; my $init=0; my $num=0; +my $hgimport=0; my $maint_ok=0; my $noblank=1; my $maintainer_name=$ENV{CHANGE_LOG_NAME}; @@ -87,6 +87,20 @@ while ($line = ) { $signed="$signed$line"; next; } + if ($line =~ m/^\# HG changeset patch/) { + $sub_ok=0; + $init=0; + $num=0; + $hgimport=0; + $maint_ok=0; + $noblank=1; + $from=""; + $body=""; + $subject=""; + $hgimport=1; + next; + } + if ($line =~ m/^Acked-by:.*/) { $signed="$signed$line"; next; @@ -96,7 +110,7 @@ while ($line = ) { if ($line =~ m/Changeset:\s*(.*)\n/) { $num=$1; } - print "# $line"; +# print "# $line"; next; } @@ -105,12 +119,19 @@ while ($line = ) { $line="\n"; } + if ($line =~ m/^#/) { + next; + } if ($sub_ok == 0) { $sub_ok=1; substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1)); if ($subject =~ m|V4L\/DVB\s*(.+)|) { $subject=$1; } + if ($hgimport) { + $subject=$line; + next; + } if ($line =~ m/^\n/) { next; } -- cgit v1.2.3 From fe38dbcbe8854d0d696942de3327b3acf7789815 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 13 Jun 2006 20:31:50 -0300 Subject: rmmod syntax works only on newer mod-utils packages From: Mauro Carvalho Chehab rmmod doesn't work with rmmod version 3.2.2. This patch uses rmmod instead. This should work with older mod-utils. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/rmmod.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/rmmod.pl b/v4l/scripts/rmmod.pl index eb8f02d14..19a0a8c61 100755 --- a/v4l/scripts/rmmod.pl +++ b/v4l/scripts/rmmod.pl @@ -144,13 +144,12 @@ sub insmod ($) sub rmmod () { - my $cmd="rmmod"; while (my $key=pop @modlist) { my $dep=$key; $dep=~s/[\-]/_/g; if (exists ($loaded{$dep})) { - printf "$cmd ./$key.ko\n"; - system "$cmd ./$key.ko\n"; + printf "rmmod $dep\n"; + system "rmmod $dep\n"; } } } -- cgit v1.2.3 From bc8ffa59a8ca28d18784da684563210ceb5acd22 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 17 Jun 2006 07:48:03 -0300 Subject: Fix problems with AV7110 firmware building From: Trent Piepho 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 Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 8 -------- 1 file changed, 8 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 87fdc5270..d20e68d4e 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -47,14 +47,6 @@ 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 EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL) -- cgit v1.2.3 From 3ca0bf3bc155f5b99b87fb7ca3524a984d2cb4e4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 17 Jun 2006 07:48:38 -0300 Subject: integer/hex/string options need to appear in .myconfig From: Trent Piepho integer/hex/string options were getting omitted from .myconfig, produced by make_noconfig.pl. They don't need to be there for the Makefile that includes .myconfig, it only uses the bool/tristate options. They need to be there for compat-config.h, which is generated from .myconfig and so will only have the #define statements for options that appear in .myconfig. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_noconfig.pl | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl index cb3ea9627..7323f419c 100755 --- a/v4l/scripts/make_noconfig.pl +++ b/v4l/scripts/make_noconfig.pl @@ -1,5 +1,13 @@ #!/usr/bin/perl +# The purpose of this script is to produce a file named '.myconfig', in +# the same style as the '.config' file. Except .myconfig has disabled +# options explicitly set to 'n' rather than just omitted. This is to +# make sure they override any corresponding options that may be turned on +# in the Kernel's config files. +# The .myconfig file is what will be included in the v4l-dvb Makefile +# to control which drivers are built. + my %config = (); my %allconfig = (); @@ -13,9 +21,11 @@ while () { close IN; # Build table of _all_ bool and tristate config variables +my $key = 0; open IN,"Kconfig"; while () { if (/^config\s+(\w+)\s*$/) { + $key == 0 or die "Couldn't find type of config '$key'"; $key = "CONFIG_$1"; } elsif (/^\s+bool(ean)?\s/) { $allconfig{$key} = 'bool'; @@ -23,18 +33,26 @@ while () { } elsif (/^\s+tristate\s/) { $allconfig{$key} = 'tristate'; $key = 0; + } elsif (/^\s+(int|hex|string)\s/) { + $allconfig{$key} = 'data'; + $key = 0; } - # else, must be int or string, ignore } close IN; exists $allconfig{0} and die "Unable to correctly parse Kconfig file"; # Produce output for including in a Makefile -# Explicitly set options that didn't appear in .config to n +# Explicitly set bool/tri options that didn't appear in .config to n +# 'data' options are only output if they appeared in .config open OUT,">.myconfig"; while ( my ($key, $value) = each(%allconfig) ) { - $value = exists $config{$key} ? $config{$key} : 'n'; + if ($value eq 'data') { + next unless (exists $config{$key}); + $value = $config{$key}; + } else { + $value = exists $config{$key} ? $config{$key} : 'n'; + } printf OUT "%-44s := %s\n",$key,$value; } close OUT; -- cgit v1.2.3 From f3557e8748785f4d92bcfad80becf953561bb2e7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 17 Jun 2006 08:45:59 -0300 Subject: Hex handling is different from int From: Mauro Carvalho Chehab Kernel handling of hex type passes those values prefixed with 0x to the modules. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 228e0aa48..4511f0def 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -5,6 +5,7 @@ my %depend = (); my %minver = (); my %config = (); my %intopt = (); +my %hexopt = (); my %tristate = (); my $version, $level, $sublevel; @@ -32,19 +33,36 @@ sub add_int($) { my $arg=shift; - exists $config{$arg} or die "Adding unknown int/hex '$arg'"; + exists $config{$arg} or die "Adding unknown int '$arg'"; $intopt{$arg} = 0; } +sub add_hex($) +{ + my $arg=shift; + + exists $config{$arg} or die "Adding unknown hex '$arg'"; + $hexopt{$arg} = 0; +} + sub set_int_value($$) { my $key = shift; my $val = shift; - exists $intopt{$key} or die "Default for unknown int/hex option '$key'"; + exists $intopt{$key} or die "Default for unknown int option '$key'"; $intopt{$key} = $val; } +sub set_hex_value($$) +{ + my $key = shift; + my $val = shift; + + exists $hexopt{$key} or die "Default for unknown hex option '$key'"; + $hexopt{$key} = "0x".$val; +} + sub add_config($) { my $arg=shift; @@ -121,12 +139,16 @@ sub open_kconfig($$) { add_int($key); } if (m|^\s+hex\s|) { - add_int($key); + add_hex($key); } # Get default for int options - if (m|^\s+default "([[:xdigit:]]+)"| && exists $intopt{$key}) { + if (m|^\s+default "(\d+)"| && exists $intopt{$key}) { set_int_value($key, $1); } + # Get default for hex options + if (m|^\s+default "([[:xdigit:]]+)"| && exists $hexopt{$key}) { + set_hex_value($key, $1); + } # Override default for disabled tri/bool options if (m/^\s+default (y|n|m|"yes"|"no")\s+(if .*)?$/ && exists $tristate{$key} && $disabled) { @@ -281,5 +303,8 @@ if (($force_kconfig eq 1) || !open IN,".config") { while ( my ($key,$value) = each(%intopt) ) { print OUT "CONFIG_$key=$value\n"; } + while ( my ($key,$value) = each(%hexopt) ) { + print OUT "CONFIG_$key=$value\n"; + } close OUT; } -- cgit v1.2.3 From 22ca6fbfdb83215e3e763226f6f15c2e7aec7a16 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Jun 2006 19:40:30 +0200 Subject: Add CX2341X MPEG encoder module. From: Hans Verkuil Adds the cx2341x.c module that handles the programming of the Conexant cx23415/6 MPEG encoder chip used by cx88-blackbird, pvrusb2 and ivtv. Signed-off-by: Hans Verkuil --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 35cb44fc6..e7339be5d 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -206,3 +206,4 @@ VIDEO_BUF_DVB VIDEO_BTCX VIDEO_IR VIDEO_TVEEPROM +VIDEO_CX2341X -- cgit v1.2.3 From 0e5e865d415e3e6de0eb7a4199b22f954e591ea4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 19 Jun 2006 09:16:03 -0300 Subject: hex defaults in Kconfig sometimes have "0x", sometimes don't From: Trent Piepho A check of the current Linux 2.6 kernel reveals that the default values for hex options sometimes have the form "0x1f0" and sometimes "1f0", with the former being more common. Adjust the make_kconfig.pl script so it can understand both. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 4511f0def..b499fefa1 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -146,8 +146,8 @@ sub open_kconfig($$) { set_int_value($key, $1); } # Get default for hex options - if (m|^\s+default "([[:xdigit:]]+)"| && exists $hexopt{$key}) { - set_hex_value($key, $1); + if (m|^\s+default "(0x)?([[:xdigit:]]+)"| && exists $hexopt{$key}) { + set_hex_value($key, $2); } # Override default for disabled tri/bool options if (m/^\s+default (y|n|m|"yes"|"no")\s+(if .*)?$/ && -- cgit v1.2.3 From d02b60987a9d04d3f7a58c04c1000797b8563b92 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 19 Jun 2006 19:49:57 -0300 Subject: Improved to accept also patches from akpm. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/hghead.pl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 16e566ea9..3f8b4b0ba 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -12,6 +12,7 @@ my $sub_ok=0; my $init=0; my $num=0; my $hgimport=0; +my $mmimport=0; my $maint_ok=0; my $noblank=1; my $maintainer_name=$ENV{CHANGE_LOG_NAME}; @@ -33,6 +34,10 @@ while ($line = ) { if ($line =~ m/^\-\-\- .*/) { last; } + if ($line =~ m/^\-\-\-\-.*/) { + $body=""; + next; + } if ($line =~ m/^\-\-\-.*/) { last; } @@ -62,7 +67,11 @@ while ($line = ) { $from= "From: $fromname\n"; next; } - print "Bad: author line have a wrong syntax\n"; + if ($line =~ m/^From:\sakpm\@osdl.org/) { + $mmimport=1; + next; + } + print "Bad: author line have a wrong syntax: $line\n"; die; } @@ -87,11 +96,11 @@ while ($line = ) { $signed="$signed$line"; next; } - if ($line =~ m/^\# HG changeset patch/) { + if ( ($line =~ m/^\# HG changeset patch/) || + ($line =~ m/^has been added to the -mm tree. Its filename is/) ) { $sub_ok=0; $init=0; $num=0; - $hgimport=0; $maint_ok=0; $noblank=1; $from=""; @@ -100,6 +109,7 @@ while ($line = ) { $hgimport=1; next; } + if ($line =~ m/^Acked-by:.*/) { $signed="$signed$line"; @@ -164,8 +174,8 @@ if (!$signed =~ m/$from/) { die; } -$body=~s/\n+$//; -$body=~s/^\n+$//; +$body=~s/[\n\s]+$//; +$body=~s/^[\n\s]+//; # First from is used by hg to recognize commiter name print "#Committer: $maintainer_name <$maintainer_email>\n"; -- cgit v1.2.3 From 5da0337a0500257e93259472d26bca4ca9a6be9a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 20 Jun 2006 00:24:50 -0300 Subject: Faster strip whitespace cleaning script From: Trent Piepho Faster script that doesn't use any temporary files. The old one would also miss cleaning four spaces in a row in places where it would clean one to eight spaces. Has two options: fast Only clean whitespace in files Hg thinks are modified or added. Used by make whitespace and much (about 100x) faster. manifest Clean all files controlled by Hg, using "hg manifest" The default with no options is the old behaviour, clean all files under the linux directory, except CVS files. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/strip-trailing-whitespaces.sh | 56 +++++++++++++------------------ 1 file changed, 23 insertions(+), 33 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index 1a23e436d..5bd7784e4 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -1,37 +1,27 @@ #!/bin/sh +# Strips trailing whitespace. Leading spaces and spaces after tabs are +# converted to the equivalent sequence of tabs only. -# tmp dir for my files -WORK="${TMPDIR-/tmp}/${0##*/}-$$" -mkdir "$WORK" || exit 1 -trap 'rm -rf "$WORK"' EXIT +# Use the option "fast" to only check files Hg thinks are new or modified. +# The option "manifest" will use Hg's manifest command to check all files +# under Hg revision control. +# Otherwise, all files under the linux tree are checked, except files in CVS +# directories and .cvsignore files. This is the historical behavior. -for file in `find linux -type d | grep -v CVS | grep -v .cvsignore` ; do - mkdir -p "$WORK/${file}" -done -for file in `find linux -type f | grep -v CVS | grep -v .cvsignore` ; do - tmpfile="$WORK/${file}.$$" - perl -ne 's/[ \t]+$//; - s/^\ \ \ \ \ \ \ \ /\t/; - s/^\ \ \ \ \ \ \ \t/\t/; - s/^\ \ \ \ \ \ \t/\t/; - s/^\ \ \ \ \ \t/\t/; - s/^\ \ \ \t/\t/; - s/^\ \ \t/\t/; - s/^\ \t/\t/; - $m=1; - while ($m>0) { - $m=0; - $m= s/\t\ \ \ \ \ \ \ \ /\t\t/g; - $m=$m+s/\t\ \ \ \ \ \ \ \t/\t\t/g; - $m=$m+s/\t\ \ \ \ \ \ \t/\t\t/g; - $m=$m+s/\t\ \ \ \ \ \t/\t\t/g; - $m=$m+s/\t\ \ \ \t/\t\t/g; - $m=$m+s/\t\ \ \t/\t\t/g; - $m=$m+s/\t\ \t/\t\t/g; - } - print' < "${file}" > "${tmpfile}" - diff -u "${file}" "${tmpfile}" | sed \ - -e "s|^--- ${file}|--- ${file}.orig|" \ - -e "s|^+++ ${tmpfile}|+++ ${file}|" - rm -f "$tmpfile" + +if [ "x$1" = "xfast" ]; then + files="hg status -man" +elif [ "x$1" = "xmanifest" ]; then + files="hg manifest | cut '-d ' -f3" +else + files="find linux -name CVS -prune -o -type f -not -name .cvsignore -print" +fi + +for file in `eval $files`; do + perl -ne ' + s/[ \t]+$//; + s<^ {8}> <\t>; + s<^ {1,7}\t> <\t>; + while( s<\t {8}> <\t\t>g || s<\t {1,7}\t> <\t\t>g ) {}; + print' < "${file}" | diff -u "${file}" - done -- cgit v1.2.3 From ecddc353539730fcf011b1e9d60ba3acca577e04 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 20 Jun 2006 13:17:11 -0300 Subject: Makefile.media were rewritten even when not required. From: Mauro Carvalho Chehab make 3.81 were suffering some endless loop that might be caused by Makefile.media rewrites. After this patch, make_makefile will only write Makefile.media if needed. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_makefile.pl | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 238c5082f..bcfb3764f 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -109,7 +109,7 @@ sub open_makefile($) { close $in; } -open OUT,">Makefile.media"; +open OUT,">Makefile.media.new"; open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule @@ -156,7 +156,29 @@ while ( my ($key, $value) = each(%depend) ) { } close OUT; -if (open OUT,".myconfig") { +if (open IN,"Makefile.media") { + close IN; + my $changed=0; + if (open IN,"diff Makefile.media Makefile.media.new|") { + while () { + if ($_ ne "") { + $changed=1; + } + } + close IN; + if ($changed) { + printf("One or more linux Makefiles had changed. Makefile.media rewrited.\n"); + system ("mv Makefile.media.new Makefile.media"); + } else { + system ("rm Makefile.media.new"); + } + } +} else { + printf("Creating Makefile.media.\n"); + system "mv Makefile.media.new Makefile.media"; +} + +if (open IN,".myconfig") { close IN; } else { system "make allmodconfig"; -- cgit v1.2.3 From a65cbc3b7aa2eaf072f20f362966f0b0055077b3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 20 Jun 2006 20:01:22 -0300 Subject: Adjust distclean target to clean a few more files From: Trent Piepho distclean was not cleaning the v4l/.myconfig file, or the symlinks made for the lxdialog program. This caused problems especially if you were switching between different kernel versions for testing. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index d20e68d4e..5be5f40ba 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -216,8 +216,9 @@ clean:: distclean:: clean -rm -f .version .*.o.flags .*.o.d Makefile.media \ - Kconfig Kconfig.kern .config .config.cmd + Kconfig Kconfig.kern .config .config.cmd .myconfig -rm -rf .tmp_versions + -rm -f scripts/lxdialog scripts/kconfig @find .. -name '*.orig' -exec rm '{}' \; @find .. -name '*.rej' -exec rm '{}' \; -- cgit v1.2.3 From 74e1ed0781b35cfd53baba71c84dfbf6c59c5403 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 10:04:08 -0300 Subject: Fixes circular dependencies at building system From: Mauro Carvalho Chehab There were a circular dependency at scripts/make_makefile.pl that were affecting mostly building with GNU make 3.81. Also, scripts/make_noconfig.pl is, in fact, building .myconfig file, so, better to name it as make_myconfig.pl. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 14 ++++++----- v4l/scripts/make_makefile.pl | 2 +- v4l/scripts/make_myconfig.pl | 58 ++++++++++++++++++++++++++++++++++++++++++++ v4l/scripts/make_noconfig.pl | 58 -------------------------------------------- 4 files changed, 67 insertions(+), 65 deletions(-) create mode 100755 v4l/scripts/make_myconfig.pl delete mode 100755 v4l/scripts/make_noconfig.pl (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index d20e68d4e..27a79a181 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -180,7 +180,9 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; -config-compat.h:: .myconfig +config-compat.h:: + scripts/make_myconfig.pl + @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h @echo >> config-compat.h @@ -253,26 +255,26 @@ LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog xconfig:: links .version $(QCONF) ./scripts/make_kconfig.pl $(QCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl gconfig:: links .version $(GCONF) ./scripts/make_kconfig.pl $(QCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl config:: links .version $(CONF) ./scripts/make_kconfig.pl $(CONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl menuconfig:: links .version $(MCONF) lxdialog ./scripts/make_kconfig.pl $(MCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl allyesconfig allmodconfig:: links .version ./scripts/make_kconfig.pl 1 - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl # rule to build kernel conf programs KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0 diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index bcfb3764f..f0d9aef7f 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -181,5 +181,5 @@ if (open IN,"Makefile.media") { if (open IN,".myconfig") { close IN; } else { - system "make allmodconfig"; + system "./scripts/make_kconfig.pl 1"; } diff --git a/v4l/scripts/make_myconfig.pl b/v4l/scripts/make_myconfig.pl new file mode 100755 index 000000000..7323f419c --- /dev/null +++ b/v4l/scripts/make_myconfig.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +# The purpose of this script is to produce a file named '.myconfig', in +# the same style as the '.config' file. Except .myconfig has disabled +# options explicitly set to 'n' rather than just omitted. This is to +# make sure they override any corresponding options that may be turned on +# in the Kernel's config files. +# The .myconfig file is what will be included in the v4l-dvb Makefile +# to control which drivers are built. + +my %config = (); +my %allconfig = (); + +open IN,".config"; +while () { + if (m/\s*(\w+)=\s*(\S*)/) { +#printf "%s=%s\n",$1,$2; + $config { $1 } = $2; + } +} +close IN; + +# Build table of _all_ bool and tristate config variables +my $key = 0; +open IN,"Kconfig"; +while () { + if (/^config\s+(\w+)\s*$/) { + $key == 0 or die "Couldn't find type of config '$key'"; + $key = "CONFIG_$1"; + } elsif (/^\s+bool(ean)?\s/) { + $allconfig{$key} = 'bool'; + $key = 0; + } elsif (/^\s+tristate\s/) { + $allconfig{$key} = 'tristate'; + $key = 0; + } elsif (/^\s+(int|hex|string)\s/) { + $allconfig{$key} = 'data'; + $key = 0; + } +} +close IN; + +exists $allconfig{0} and die "Unable to correctly parse Kconfig file"; + +# Produce output for including in a Makefile +# Explicitly set bool/tri options that didn't appear in .config to n +# 'data' options are only output if they appeared in .config +open OUT,">.myconfig"; +while ( my ($key, $value) = each(%allconfig) ) { + if ($value eq 'data') { + next unless (exists $config{$key}); + $value = $config{$key}; + } else { + $value = exists $config{$key} ? $config{$key} : 'n'; + } + printf OUT "%-44s := %s\n",$key,$value; +} +close OUT; diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl deleted file mode 100755 index 7323f419c..000000000 --- a/v4l/scripts/make_noconfig.pl +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl - -# The purpose of this script is to produce a file named '.myconfig', in -# the same style as the '.config' file. Except .myconfig has disabled -# options explicitly set to 'n' rather than just omitted. This is to -# make sure they override any corresponding options that may be turned on -# in the Kernel's config files. -# The .myconfig file is what will be included in the v4l-dvb Makefile -# to control which drivers are built. - -my %config = (); -my %allconfig = (); - -open IN,".config"; -while () { - if (m/\s*(\w+)=\s*(\S*)/) { -#printf "%s=%s\n",$1,$2; - $config { $1 } = $2; - } -} -close IN; - -# Build table of _all_ bool and tristate config variables -my $key = 0; -open IN,"Kconfig"; -while () { - if (/^config\s+(\w+)\s*$/) { - $key == 0 or die "Couldn't find type of config '$key'"; - $key = "CONFIG_$1"; - } elsif (/^\s+bool(ean)?\s/) { - $allconfig{$key} = 'bool'; - $key = 0; - } elsif (/^\s+tristate\s/) { - $allconfig{$key} = 'tristate'; - $key = 0; - } elsif (/^\s+(int|hex|string)\s/) { - $allconfig{$key} = 'data'; - $key = 0; - } -} -close IN; - -exists $allconfig{0} and die "Unable to correctly parse Kconfig file"; - -# Produce output for including in a Makefile -# Explicitly set bool/tri options that didn't appear in .config to n -# 'data' options are only output if they appeared in .config -open OUT,">.myconfig"; -while ( my ($key, $value) = each(%allconfig) ) { - if ($value eq 'data') { - next unless (exists $config{$key}); - $value = $config{$key}; - } else { - $value = exists $config{$key} ? $config{$key} : 'n'; - } - printf OUT "%-44s := %s\n",$key,$value; -} -close OUT; -- cgit v1.2.3 From 6cfc8eeff6261fb1153a67e5bc3c71616f332044 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 12:23:13 -0300 Subject: Some improvements at the building system From: Mauro Carvalho Chehab Building system now looks kernel config.h and autoconf.h files, seeking for the compiled options at kernel. If something is missing, it will disable compilation for that driver, printing a warning message. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 33 +++++----- v4l/scripts/make_kconfig.pl | 152 +++++++++++++++++++++++++++++++++++++++---- v4l/scripts/make_makefile.pl | 3 +- v4l/versions.txt | 8 +-- 4 files changed, 162 insertions(+), 34 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 58354a035..881329d7d 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -17,7 +17,12 @@ else ifneq ($(SRCDIR),) KDIR := $(SRCDIR) else +ifneq ($(KERNELRELEASE),) KDIR := /lib/modules/$(KERNELRELEASE)/build +else +KDIR := /lib/modules/$(shell uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("%s.%s.%s%s\n",$$1,$$2,$$3,$$4); };')/build + +endif endif endif @@ -133,9 +138,6 @@ remove rminstall:: media-rminstall ivtv-rminstall ################################################# # Compiling preparation rules -Makefile.media:: .version - scripts/make_makefile.pl - .version:: ifneq ($(KERNELRELEASE),) @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version @@ -147,6 +149,9 @@ else @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 +Makefile.media:: .version + scripts/make_makefile.pl $(KDIR) + release:: ifneq ($(VER),) @echo "Forcing compiling to version $(VER)." @@ -180,9 +185,7 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; -config-compat.h:: - scripts/make_myconfig.pl - +config-compat.h:: .myconfig @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h @echo >> config-compat.h @@ -253,29 +256,27 @@ LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kc LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog +.myconfig : .config + ./scripts/make_myconfig.pl + xconfig:: links .version $(QCONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(QCONF) Kconfig - ./scripts/make_myconfig.pl gconfig:: links .version $(GCONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(QCONF) Kconfig - ./scripts/make_myconfig.pl config:: links .version $(CONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(CONF) Kconfig - ./scripts/make_myconfig.pl menuconfig:: links .version $(MCONF) lxdialog - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(MCONF) Kconfig - ./scripts/make_myconfig.pl allyesconfig allmodconfig:: links .version - ./scripts/make_kconfig.pl 1 - ./scripts/make_myconfig.pl + ./scripts/make_kconfig.pl $(KDIR) 1 # rule to build kernel conf programs KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0 diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index b499fefa1..33a53d772 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -7,10 +7,69 @@ my %config = (); my %intopt = (); my %hexopt = (); my %tristate = (); +my %kernopts = (); +my %depmods = (); my $version, $level, $sublevel; +my $kernel=shift; my $force_kconfig=shift; +#!/usr/bin/perl +use FileHandle; + +########################################################### +# Checks config.h and autoconf.h for current kernel defines +sub process_config ($) +{ + my $filename = shift; + my $in = new FileHandle; + + open $in,"$kernel/include/$filename" or die; + while (<$in>) { + if (m|\#include\s+\<(.*)\>|) { + process_config ($1); + next; + } + if (m/\#define\s+CONFIG_([^ ]*)_ON_SMP\s+(.*)\n/) { + my $key=$1; + my $value=$2; +# printf "defined $key as $value\n"; + if ( $value == 1 ) { + $value='y'; + } + $kernopts{$key}=$value; + next; + } + if (m/\#define\s+CONFIG_([^ ]*)_MODULE\s+(.*)\n/) { + my $key=$1; + my $value=$2; +# printf "defined $key as $value\n"; + if ( $value == 1 ) { + $value='m'; + } + $kernopts{$key}=$value; + next; + } + if (m/\#define\s+CONFIG_([^ ]*)\s+(.*)\n/) { + my $key=$1; + my $value=$2; +# printf "defined $key as $value\n"; + if ( $value == 1 ) { + $value='y'; + } + $kernopts{$key}=$value; + next; + } + if (m/\#undef\s+CONFIG_([^ ]*)\n/) { +# printf "undefined $1\n"; + $kernopts{$1}='n'; + next; + } + } + + close $in; +} + sub add_bool($) { my $arg=shift; @@ -18,6 +77,8 @@ sub add_bool($) exists $config{$arg} or die "Adding unknown boolean '$arg'"; $tristate{$arg}="bool"; # printf "Boolean:%s\n",$arg; + + $kernopts{$arg}='y'; } sub add_tristate($) @@ -26,7 +87,8 @@ sub add_tristate($) exists $config{$arg} or die "Adding unknown tristate '$arg'"; $tristate{$arg}="tristate"; -# printf "Tristate:%s\n",$arg; + + $kernopts{$arg}='m'; } sub add_int($) @@ -75,6 +137,7 @@ sub add_config($) } } +######################################## # Turn option off, iff it already exists sub disable_config($) { @@ -83,9 +146,14 @@ sub disable_config($) $config{$key} = 0 if (exists $config{$key}); } -sub check_deps($) +################################################################# +# Make a list of dependencies and the number of references for it +sub check_deps($$) { + my $key=shift; my $arg=shift; + + $depmods{$key}=$arg; $arg=$arg." "; while ($arg ne "") { @@ -96,6 +164,44 @@ sub check_deps($) } $arg =~ s/^[^ ]+ //; } + + return $ok; +} + +###################################################### +# Checks if all dependencies for the key are satisfied +sub deps_ok($) +{ + my $key=shift; + my $arg=$depmods{$key}; + my $ok=1; + + if ($arg eq "") { + return $ok; + } + + $arg=$arg." "; + + +# printf "$key: deps are '$arg'\n"; + + while ($arg ne "") { + if ($arg =~ m/^([A-Z0-9_]+) /) { + if ((! exists $kernopts {$1}) || ($kernopts {$1} eq 'n')) { + printf "$key: Required kernel opt '$1' is not present\n"; + $ok=0; + } + } + if ($arg =~ m/^\!([A-Z0-9_]+) /) { + if ($kernopts {$1} eq 'y') { + printf "$key: Driver is incompatible with '$1'\n"; + $ok=0; + } + } + $arg =~ s/^[^ ]+ //; + } + + return $ok; } sub open_kconfig($$) { @@ -105,7 +211,7 @@ sub open_kconfig($$) { my $key; #print "opening $file\n"; - open $in,"$file"; + open $in,"$file" or die; while (<$in>) { # if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) { # next; @@ -124,10 +230,10 @@ sub open_kconfig($$) { next; } if (m|^\s+depends on\s+(.*)\n|) { - check_deps ($1); + check_deps ($key,$1); } if (m|^\s+select\s+(.*)\n|) { - check_deps ($1); + check_deps ($key,$1); } if (m|^\s+bool(ean)?\s|) { add_bool($key); @@ -155,7 +261,6 @@ sub open_kconfig($$) { $default_seen = 1; $_ = "\tdefault n\n"; } - # check for end of config definition for disabled drivers # we need to make sure we've disabled it, and add a bit # to the help text @@ -211,7 +316,7 @@ sub parse_versions () my $in = new FileHandle; my $ver; - open $in,"versions.txt"; + open $in,"versions.txt" or die; while (<$in>) { if (m/\[([\d.]*)\]/) { $ver=$1; @@ -226,9 +331,11 @@ sub parse_versions () close $in; } +process_config("linux/config.h"); + parse_versions; -open IN,".version"; +open IN,".version" or die; while () { if (m/KERNELRELEASE\s*[:]*[=]+\s*(\d+)\.(\d+)\.(\d+)/) { $version=$1; @@ -240,7 +347,7 @@ close IN; printf "Preparing to compile for kernel version %d.%d.%d\n",$version,$level,$sublevel; -open OUT,">Kconfig"; +open OUT,">Kconfig" or die; print OUT <<"EOF"; mainmenu "V4L/DVB menu" @@ -273,14 +380,19 @@ while ( my ($key, $value) = each(%config) ) { delete $depend{$key}; } -open OUT,">Kconfig.kern"; +open OUT,">Kconfig.kern" or die; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; add_config('MODULES'); add_bool('MODULES'); while ( my ($key, $value) = each(%depend) ) { - print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n"; + if ($kernopts{$key}) { + print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault ". + $kernopts{$key}."\n\n"; + } else { + print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault n #not found\n\n"; + } } close OUT; @@ -290,10 +402,24 @@ disable_config('DVB_CINERGYT2_TUNING'); # Produce a .config file if it's forced or one doesn't already exist if (($force_kconfig eq 1) || !open IN,".config") { - open OUT,">.config"; + open OUT,">.config" or die; while ( my ($key,$value) = each(%tristate) ) { if (!$config{$key}) { - print OUT "CONFIG_$key=n\n"; + print OUT "# CONFIG_$key is not set\n"; + } elsif ($kernopts{$key}) { + my $ok=deps_ok($key); + + # If deps are not ok, mark default as n + if (!$ok) { +# print "$key disabled due to missing kernel required prereq\n"; + $kernopts{$key}='n'; + } + + if ($kernopts{$key} eq 'n') { + print OUT "# CONFIG_$key is not set\n"; + } else { + print OUT "CONFIG_$key=".$kernopts{$key}."\n"; + } } elsif ($value eq 'tristate') { print OUT "CONFIG_$key=m\n"; } else { # must be 'bool' diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index f0d9aef7f..e0a099e9b 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use FileHandle; +my $kernel=shift; my $instdir = (); sub check_line($$$) @@ -181,5 +182,5 @@ if (open IN,"Makefile.media") { if (open IN,".myconfig") { close IN; } else { - system "./scripts/make_kconfig.pl 1"; + system "./scripts/make_kconfig.pl $kernel 1"; } diff --git a/v4l/versions.txt b/v4l/versions.txt index 35cb44fc6..6da410612 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -6,10 +6,6 @@ VIDEO_ZR36120 # This is also marked as broken VIDEO_PLANB -# Those are architecture-dependent -VIDEO_VINO -VIDEO_M32R_AR_M64278 - [2.6.16] VIDEO_USBVIDEO USB_VICAM @@ -23,6 +19,10 @@ USB_ZC0301 VIDEO_ZORAN_AVS6EYES VIDEO_TLV320AIC23B +# Those are architecture-dependent +VIDEO_VINO +VIDEO_M32R_AR_M64278 + [2.6.14] VIDEO_ZORAN VIDEO_ZORAN_BUZ -- cgit v1.2.3 From e7a1d090b86f3e99145a255967b4d49cbaf36087 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 16:30:43 -0300 Subject: Option disabling should be recursive. Fixing it. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 33a53d772..5f8866220 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -400,6 +400,19 @@ close OUT; disable_config('DVB_AV7110_FIRMWARE'); disable_config('DVB_CINERGYT2_TUNING'); +my $i; +do { + $i=0; + while ( my ($key,$value) = each(%kernopts) ) { + if ($value ne 'n') { + if (!deps_ok($key)) { + $kernopts{$key}='n'; + } + $i=$i+1; + } + } +} until (!$disable); + # Produce a .config file if it's forced or one doesn't already exist if (($force_kconfig eq 1) || !open IN,".config") { open OUT,">.config" or die; @@ -407,14 +420,6 @@ if (($force_kconfig eq 1) || !open IN,".config") { if (!$config{$key}) { print OUT "# CONFIG_$key is not set\n"; } elsif ($kernopts{$key}) { - my $ok=deps_ok($key); - - # If deps are not ok, mark default as n - if (!$ok) { -# print "$key disabled due to missing kernel required prereq\n"; - $kernopts{$key}='n'; - } - if ($kernopts{$key} eq 'n') { print OUT "# CONFIG_$key is not set\n"; } else { -- cgit v1.2.3 From ba915ac86439f7c2e134346710e2c95835fa8b68 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 16:31:24 -0300 Subject: Some cleanups at the release script From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 881329d7d..a034be061 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -158,12 +158,13 @@ ifneq ($(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"; \ + @echo "Seeking for a version at $(DIR)/Makefile." + @perl -e 'open IN,"$(DIR)/Makefile"; \ while () { \ - 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; }\ + if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; }\ + elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; }\ + elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; }\ + elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; }\ }; \ printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n", \ $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra); \ -- cgit v1.2.3 From 6ed34e3a513dd73f39d804e9416524bf5eb54be6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 19:07:45 -0300 Subject: building system fix: miropcm20 depends on sound/oss/aci.h From: Mauro Carvalho Chehab Most V4L/DVB hg tree users are just compiling using kernel headers. This is bad, due to: 1) the lack of support for make *config 2) the kernel itself have unknown patches from the distros Anyway, it is useful to provide they some support. This patch provides a "hack" for such users, by checking if the sound/oss/aci.h file is present under kernel tree. If not, it will disable miropcm20 and print a warning about the usage of a kernel-headers only package. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 5f8866220..807fea2e6 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -400,6 +400,20 @@ close OUT; disable_config('DVB_AV7110_FIRMWARE'); disable_config('DVB_CINERGYT2_TUNING'); +# Hack for check sound/oss/aci.h header + +my $mirodep="$kernel/sound/oss/aci.h"; +if (!open IN, $mirodep) { + my $key="RADIO_MIROPCM20"; + printf "$key: $mirodep is missing.\n"; + printf "It seems that you are using a kernel-headers only package\n"; + printf "kernel-headers only won't provide you make menuconfig/xconfig/qconfig\n"; + + $kernopts{$key}='n'; +} +close IN; + +# Recursively check for broken dependencies my $i; do { $i=0; -- cgit v1.2.3 From 443a49ca134a2691307741a3f7e4744f52d1eb49 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 11:08:17 -0300 Subject: The new POSIX backslash behavior on GNU make 3.81 breaks make release From: Mauro Carvalho Chehab On make 3.81, backslash isn't removed anymore when inside of a single quotted string. This makes make release to fail, since perl won't understand the backslash. This patch just make all script into one line. Bad to understand, but, at least, it will work fine with both GNU make 3.80 and make 3.81. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index a034be061..0e90e13d8 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -159,22 +159,12 @@ ifneq ($(VER),) else ifneq ($(DIR),) @echo "Seeking for a version at $(DIR)/Makefile." - @perl -e 'open IN,"$(DIR)/Makefile"; \ - while () { \ - if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; }\ - elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; }\ - elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; }\ - elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; }\ - }; \ - 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 + @perl -e 'open IN,"$(DIR)/Makefile"; while () { if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; } elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; } elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; } elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; } }; 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 -- cgit v1.2.3 From 78d2d7a1fea8c058e3ffa9dae7b6f96c3491a7ac Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 11:47:13 -0300 Subject: Adjust filenames in the strip whitespace script output From: Trent Piepho Before: --- Makefile +++ - 2006-06-20 22:16:36.320564000 -0700 Now: --- Makefile +++ Makefile patch handles both correctly, but diffstat will use the "+++" filename rather than the "---" filename, making diffstat output rather useless. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/strip-trailing-whitespaces.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index 5bd7784e4..a546a0b9f 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -23,5 +23,6 @@ for file in `eval $files`; do s<^ {8}> <\t>; s<^ {1,7}\t> <\t>; while( s<\t {8}> <\t\t>g || s<\t {1,7}\t> <\t\t>g ) {}; - print' < "${file}" | diff -u "${file}" - + print' < "${file}" | \ + diff -u --label="$file" "$file" --label="$file" - done -- cgit v1.2.3 From 9a9c8e49eea524960d5fbead3d5794a0bd936500 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 11:51:24 -0300 Subject: Have the commit auto-check code tell you when it does something From: Trent Piepho When the make commit checks for whitespace errors, it will save a copy of the changes it makes to $(TMP)/v4l_hg_whitespace. The prep_commit_msg.pl script will look for this file and include a note in the prepared commit message with diffstat output. The changes that scripts/cardlist might make are not included, but that can be added later. The prep_commit_msg.pl script is effectively totally re-written. This one will try some extra stuff to some up with the user's e-mail, such as looking in the ~/.hgrc file. The Makefile is changed so that temporary files created by make commit and make whitespace will honor the $TMP environment variable, if set. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/prep_commit_msg.pl | 73 ++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 24 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/prep_commit_msg.pl b/v4l/scripts/prep_commit_msg.pl index ac958667b..a4594c7f9 100755 --- a/v4l/scripts/prep_commit_msg.pl +++ b/v4l/scripts/prep_commit_msg.pl @@ -1,34 +1,59 @@ #!/usr/bin/perl -$f=shift; -open IN,"hg diff|diffstat -p1 |"; -my $n=2; -my $from=""; -my $first=""; -my $changed=""; -$out=""; -while () { - $changed="$changed#$_"; -} +my $autopatch = shift; +# Get Hg username from environment my $user = $ENV{HGUSER}; -if ( $user eq "" ) { +# Didn't work? Try the .hgrc file +if ($user eq "") { + open IN, "<$ENV{HOME}/.hgrc"; + while () { + if(/^\s*username\s*=\s*(\S.*)$/) { + $user = $1; + last; + } + } + close IN; +} + +# Still no luck? Try some other environment variables +if ($user eq "") { my $name = $ENV{CHANGE_LOG_NAME}; my $email = $ENV{CHANGE_LOG_EMAIL_ADDRESS}; + $user = "$name <$email>" if ($name ne "" || $email ne ""); +} + +# Last try to come up with something +if ($user eq "") { + $user = "$ENV{USER} <>"; +} - $user="$name <$email>"; +print "# Added/removed/changed files:\n"; +system "hg diff | diffstat -p1 -c"; +if (-s $autopatch) { + print "#\n# Note, a problem with your patch was detected! These changes were made\n"; + print "# automatically: $autopatch\n"; + system "diffstat -p0 -c $autopatch"; + print "#\n# Please review these changes and see if they belong in your patch or not.\n"; } +print <<"EOF"; +# +# For better log display, please keep a blank line after subject, after from, +# and before signed-off-by. +# First line should be the subject, without Subject: +# + + +# Now, patch author (just the main one), on a From: field +# Please change below if the committer is not the patch author. +# +From: $user + +# Then a detailed description: + -$first= "# Please change below if you are not patch author\n#\nFrom: $user"; -$out= "# At the end Signed-off-by: fields by patch author and committer, at least\n#\nSigned-off-by: $user"; -$from= "From: $user"; - -printf "#Added/removed/changed files:\n%s#\n" . - "# For better log display, please keep a blank line after subject, after from\n" . - "# and before signed-off-by\n" . - "# First line should be the subject, without Subject:\n#\n\n\n" . - "# Now, patch author (just the main one), on a From: field\n" . - "# Please change below if the committer is not the patch author\n#\n%s\n\n" . - "# Then a detailed description:\n\n\n%s", - $changed,$from,$out; +# At the end Signed-off-by: fields by patch author and committer, at least. +# +Signed-off-by: $user +EOF -- cgit v1.2.3 From b00987276ad2c4bef7891591a6ca2081a7d1e1d4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 18:52:04 -0300 Subject: Improved message when only kernel headers are found From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 807fea2e6..c58f5b028 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -405,10 +405,27 @@ disable_config('DVB_CINERGYT2_TUNING'); my $mirodep="$kernel/sound/oss/aci.h"; if (!open IN, $mirodep) { my $key="RADIO_MIROPCM20"; - printf "$key: $mirodep is missing.\n"; - printf "It seems that you are using a kernel-headers only package\n"; - printf "kernel-headers only won't provide you make menuconfig/xconfig/qconfig\n"; +print <<"EOF2"; +$key: $mirodep is missing. +***WARNING:*** You do not have the full kernel sources installed. +This does not prevent you from building the v4l-dvb tree if you have the +kernel headers, but the full kernel source is required in order to use +make menuconfig / xconfig / qconfig. + +If you are experiencing problems building the v4l-dvb tree, please try +building against a vanilla kernel before reporting a bug. + +Vanilla kernels are available at http://kernel.org. +On most distros, this will compile a newly downloaded kernel: + +cp /boot/config-`uname -r` /.config +cd +make all modules_install install + +Please see your distro's web site for instructions to build a new kernel. + +EOF2 $kernopts{$key}='n'; } close IN; -- cgit v1.2.3 From d6f3e25616ac528ec4630545e5f5b7600f51c16f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 23 Jun 2006 12:19:41 -0300 Subject: Have config-compat.h, undefine options turned off From: Trent Piepho Use a (make 3.81 safe!) in-line perl script to generate config-compat.h from .myconfig. The output will be more like the Kernel's output: Options set to 'm' will define CONFIG_WHATEVER_MODULE to 1, rather than define CONFIG_WHATEVER to m. Options set to 'y' to be defined to 1 instead of y. Options that are off will be #undef'ed, rather that omitted, so that they will override the settings from the kernel autoconf.h file. The last change will fix a problem where certain options, like CinergyT2 tuning and AV7110 firmware, wouldn't work properly if they were on in the kernel but off for v4l-dvb Hg. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 0e90e13d8..b162ddcc3 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -177,20 +177,19 @@ links:: @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; config-compat.h:: .myconfig - @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h - @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h - @echo >> config-compat.h - @echo \#include \ >> config-compat.h - @echo >> config-compat.h - @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ - sed s/"CONFIG\_"/"\#undef CONFIG\_"/1 | \ - sed s/"\:\= .*"/""/1 >> config-compat.h >> config-compat.h - @echo >> config-compat.h - @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ - sed s/"CONFIG\_"/"\#define CONFIG\_"/1 | \ - sed s/"\:\="/""/1 >> config-compat.h >> config-compat.h - @echo >> config-compat.h - @echo \#endif >> config-compat.h + @perl \ + -e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \ + -e 'print "#define __CONFIG_COMPAT_H__\n\n";' \ + -e 'print "#include \n\n";' \ + -e 'while(<>) {'\ + -e ' next unless /^(\S+)\s*:= (\S+)$$/;' \ + -e ' print "#undef $$1\n";' \ + -e ' if($$2 eq "n") { next; }' \ + -e ' elsif($$2 eq "m") { print "#define $$1_MODULE 1\n"; }' \ + -e ' elsif($$2 eq "y") { print "#define $$1 1\n"; }' \ + -e ' else { print "#define $$1 $$2\n"; }' \ + -e '} print "\n#endif\n";' \ + < .myconfig > config-compat.h kernel-links makelinks:: cd ..; v4l/scripts/makelinks.sh $(KDIR) -- cgit v1.2.3 From 7bbcab1af264a64efd2772c7e078e2137a24e018 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 23 Jun 2006 13:26:14 -0300 Subject: Break make release into several lines keeping it work with make 3.81 From: Mauro Carvalho Chehab Also, fixes a trouble with make 3.81 introduced by the latest patch. make 3.81 doesn't work fine with something like: 'foo'\ It should be, instead: 'foo' \ Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index b162ddcc3..663369674 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -159,7 +159,17 @@ ifneq ($(VER),) else ifneq ($(DIR),) @echo "Seeking for a version at $(DIR)/Makefile." - @perl -e 'open IN,"$(DIR)/Makefile"; while () { if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; } elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; } elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; } elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; } }; 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 + @perl \ + -e 'open IN,"$(DIR)/Makefile"; ' \ + -e 'while () {' \ + -e ' if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; }' \ + -e ' elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; }' \ + -e ' elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; }' \ + -e ' elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; }' \ + -e '};' \ + -e 'printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",' \ + -e ' $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra);' \ + -e 'printf ("SRCDIR:=$(DIR)\n");' > $(obj)/.version @cat .version|grep KERNELRELEASE:|sed s,'KERNELRELEASE:=','Forcing compiling to version ', @if [ ! -f $(DIR)/scripts/kallsyms ]; then \ @@ -181,7 +191,7 @@ config-compat.h:: .myconfig -e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \ -e 'print "#define __CONFIG_COMPAT_H__\n\n";' \ -e 'print "#include \n\n";' \ - -e 'while(<>) {'\ + -e 'while(<>) {' \ -e ' next unless /^(\S+)\s*:= (\S+)$$/;' \ -e ' print "#undef $$1\n";' \ -e ' if($$2 eq "n") { next; }' \ -- cgit v1.2.3 From f36035a9e66e7645ee1ce15fdf1093493539be1e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 24 Jun 2006 08:18:58 -0300 Subject: Add blacklist capability to tuner.pl and remove TDA9887 from the cardlist From: Mauro Carvalho Chehab tda9887 is not really an independent tuner, but part of one. It shouldn't be ponted at a userlist. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/tuner.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'v4l') diff --git a/v4l/scripts/tuner.pl b/v4l/scripts/tuner.pl index fcfa22e26..104c16dae 100755 --- a/v4l/scripts/tuner.pl +++ b/v4l/scripts/tuner.pl @@ -8,12 +8,17 @@ my %data; my $H = shift; my $C = shift; +my %blacklist; open IN, "<$H"; while () { # defines in header file if (/#define\s+(TUNER_\w+)\s+(\d+)/) { - $data{$1}->{nr} = $2; + my $num=$2; + $data{$1}->{nr} = $num; + if (/#define\s+TUNER_TDA9887/) { + $blacklist{$num}=1; + } next; } } @@ -37,6 +42,10 @@ while () { } foreach my $item (sort { $data{$a}->{nr} <=> $data{$b}->{nr} } keys %data) { + if ($blacklist{$data{$item}->{nr}}) { + next; + } + printf("tuner=%d - %s", $data{$item}->{nr}, $data{$item}->{name}); print "\n"; } -- cgit v1.2.3 From 3de3a189c2592763ae7fd5acd20d0a137090c2f5 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 24 Jun 2006 20:05:12 -0400 Subject: make VIDEO_CX88_BLACKBIRD a separate build option From: Michael Krufky This patch creates a new Kconfig menu option, entitled, "Blackbird MPEG encoder support (cx2388x + cx23416)" so that the cx88-blackbird mpeg encoder module can be chosen separately. Signed-off-by: Michael Krufky --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 706439959..2c74da43f 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -105,6 +105,7 @@ VIDEO_HEXIUM_GEMINI VIDEO_CX88_VP3054 VIDEO_CX88 VIDEO_CX88_ALSA +VIDEO_CX88_BLACKBIRD VIDEO_CX88_DVB VIDEO_CX88_DVB_ALL_FRONTENDS VIDEO_CX88_DVB_MT352 -- cgit v1.2.3 From 8a3fde84f22ff69d3d91e9ad98cd8bc27270ec35 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 26 Jun 2006 10:25:40 -0300 Subject: Added some error messages to the script From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index c58f5b028..feef72c92 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -24,7 +24,7 @@ sub process_config ($) my $filename = shift; my $in = new FileHandle; - open $in,"$kernel/include/$filename" or die; + open $in,"$kernel/include/$filename" or die "File not found: $kernel/include/$filename"; while (<$in>) { if (m|\#include\s+\<(.*)\>|) { process_config ($1); @@ -211,7 +211,7 @@ sub open_kconfig($$) { my $key; #print "opening $file\n"; - open $in,"$file" or die; + open $in,"$file" or die "File not found: $file"; while (<$in>) { # if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) { # next; @@ -316,7 +316,7 @@ sub parse_versions () my $in = new FileHandle; my $ver; - open $in,"versions.txt" or die; + open $in,"versions.txt" or die "File not found: versions.txt"; while (<$in>) { if (m/\[([\d.]*)\]/) { $ver=$1; @@ -335,7 +335,7 @@ process_config("linux/config.h"); parse_versions; -open IN,".version" or die; +open IN,".version" or die "File not found: .version"; while () { if (m/KERNELRELEASE\s*[:]*[=]+\s*(\d+)\.(\d+)\.(\d+)/) { $version=$1; @@ -347,7 +347,7 @@ close IN; printf "Preparing to compile for kernel version %d.%d.%d\n",$version,$level,$sublevel; -open OUT,">Kconfig" or die; +open OUT,">Kconfig" or die "Cannot write Kconfig file"; print OUT <<"EOF"; mainmenu "V4L/DVB menu" @@ -380,7 +380,7 @@ while ( my ($key, $value) = each(%config) ) { delete $depend{$key}; } -open OUT,">Kconfig.kern" or die; +open OUT,">Kconfig.kern" or die "Cannot write Kconfig.kern file"; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; add_config('MODULES'); @@ -446,7 +446,7 @@ do { # Produce a .config file if it's forced or one doesn't already exist if (($force_kconfig eq 1) || !open IN,".config") { - open OUT,">.config" or die; + open OUT,">.config" or die "Cannot write .config file"; while ( my ($key,$value) = each(%tristate) ) { if (!$config{$key}) { print OUT "# CONFIG_$key is not set\n"; -- cgit v1.2.3