#!/bin/sh PWD=`pwd` CWD=$PWD cd ../linux V4L=$PWD cd ../../dvb-kernel/linux DVB=$PWD for x in `find drivers/media/dvb -type d | grep -v CVS | grep -v patches | grep -v compat` ; do mkdir -p -v $V4L/$x done echo creating symbolic links... mkdir -p -v $V4L/include/linux/dvb for x in `find drivers -type f | grep -v CVS | grep -v .cvsignore` ; do ln -f -s $DVB/$x $V4L/$x done for x in `find include -type f | grep -v CVS | grep -v .cvsignore` ; do ln -f -s $DVB/$x $V4L/$x done ln -s $V4L/drivers/media/dvb/frontends/dvb-pll.c dvb-pll.c ln -s $V4L/drivers/media/dvb/frontends/dvb-pll.h dvb-pll.h ln -s $V4L/drivers/media/dvb/frontends/mt352.c mt352.c ln -s $V4L/drivers/media/dvb/frontends/mt352.h mt352.h ln -s $V4L/drivers/media/dvb/frontends/mt352_priv.h mt352_priv.h ln -s $V4L/drivers/media/dvb/frontends/cx22702.c cx22702.c ln -s $V4L/drivers/media/dvb/frontends/cx22702.h cx22702.h ln -s $V4L/drivers/media/dvb/frontends/lgdt330x.c lgdt330x.c ln -s $V4L/drivers/media/dvb/frontends/lgdt330x.h lgdt330x.h ln -s $V4L/drivers/media/dvb/frontends/lgdt330x_priv.h lgdt330x_priv.h ln -s $V4L/drivers/media/dvb/frontends/or51132.c or51132.c ln -s $V4L/drivers/media/dvb/frontends/or51132.h or51132.h ln -s $V4L/drivers/media/dvb/frontends/tda1004x.c tda1004x.c ln -s $V4L/drivers/media/dvb/frontends/tda1004x.h tda1004x.h ln -s $V4L/drivers/media/dvb/frontends/sp887x.c sp887x.c ln -s $V4L/drivers/media/dvb/frontends/sp887x.h sp887x.h ln -s $V4L/drivers/media/dvb/frontends/nxt6000.c nxt6000.c ln -s $V4L/drivers/media/dvb/frontends/nxt6000.h nxt6000.h ln -s $V4L/drivers/media/dvb/frontends/nxt6000_priv.h nxt6000_priv.h ln -s $V4L/drivers/media/dvb/frontends/cx24110.c cx24110.c ln -s $V4L/drivers/media/dvb/frontends/cx24110.h cx24110.h ln -s $V4L/drivers/media/dvb/frontends/or51211.c or51211.c ln -s $V4L/drivers/media/dvb/frontends/or51211.h or51211.h ln -s $V4L/drivers/media/dvb/bt8xx/bt878.c bt878.c ln -s $V4L/drivers/media/dvb/bt8xx/bt878.h bt878.h ln -s $V4L/drivers/media/dvb/bt8xx/dvb-bt8xx.c dvb-bt8xx.c ln -s $V4L/drivers/media/dvb/bt8xx/dvb-bt8xx.h dvb-bt8xx.h ln -s $V4L/drivers/media/dvb/bt8xx/dst.c dst.c ln -s $V4L/drivers/media/dvb/bt8xx/dst_ca.c dst_ca.c ln -s $V4L/drivers/media/dvb/bt8xx/dst_ca.h dst_ca.h ln -s $V4L/drivers/media/dvb/bt8xx/dst_common.h dst_common.h ln -s $V4L/drivers/media/dvb/bt8xx/dst_priv.h dst_priv.h cd $CWD patch -p2 <<'DIFF' diff -up v4l-kernel.orig/v4l/Make.config v4l-kernel/v4l/Make.config --- v4l-kernel.orig/v4l/Make.config 2005-10-08 17:31:57.000000000 -0400 +++ v4l-kernel/v4l/Make.config 2005-10-08 17:46:08.000000000 -0400 @@ -32,5 +32,7 @@ endif ifeq ($(CONFIG_VIDEO_BUF_DVB),m) CONFIG_VIDEO_CX88_DVB := m CONFIG_VIDEO_SAA7134_DVB := m + CONFIG_DVB_BT8XX := m + CONFIG_DVB_FRONTENDS := m endif diff -up v4l-kernel.orig/v4l/Makefile v4l-kernel/v4l/Makefile --- v4l-kernel.orig/v4l/Makefile 2005-10-08 17:31:57.000000000 -0400 +++ v4l-kernel/v4l/Makefile 2005-10-08 17:45:48.000000000 -0400 @@ -68,6 +68,7 @@ ifeq ($(VERSION).$(PATCHLEVEL),2.6) endif # 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_CX88_DVB),m) @@ -182,7 +183,7 @@ links:: @ln -sf ../linux/drivers/media/common/ir-common.c . -install:: rminstall +install:: rminstall dvb-install @echo -e "\nInstalling new V4L modules at corresponding Kernel dir..." @strip --strip-debug $(inst-m) @@ -245,7 +246,7 @@ dvb-rminstall:: $(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null @echo -rminstall:: +rminstall:: dvb-rminstall @echo -e "\nEliminating old V4L modules (errors on this step is not a problem).." -@rm -r $(DEST) \ @@ -266,7 +267,7 @@ rminstall:: rmmodules:: rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d) -clean:: +clean:: unmerge-trees find . -name '*.c' -type l -exec rm '{}' \; find . -name '*.h' -type l -exec rm '{}' \; -rm -f *~ *.o *.ko *.mod.c