summaryrefslogtreecommitdiff
path: root/v4l/scripts/merge-trees.sh
blob: 0fc294416cba55d69782c0f64b76f4a57579e9e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/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

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
@@ -62,5 +62,34 @@ endif
 ifeq ($(CONFIG_VIDEO_BUF_DVB),m)
  CONFIG_VIDEO_CX88_DVB	:= m
  CONFIG_VIDEO_SAA7134_DVB := m
+ CONFIG_DVB_BT8XX       := m
+ CONFIG_DVB_BT8XX_DST   := m
+ CONFIG_DVB_FRONTENDS    := m
+ CONFIG_DVB_CORE        := m
+ CONFIG_DVB_B2C2_FLEXCOP := m
+ CONFIG_DVB_B2C2_FLEXCOP_PCI := m
+ CONFIG_DVB_B2C2_FLEXCOP_USB := m
+ CONFIG_DVB_CINERGYT2    := m
+ CONFIG_DVB_USB          := m
+ CONFIG_DVB_USB_VP7045   := m
+ CONFIG_DVB_USB_VP702X   := m
+ CONFIG_DVB_USB_DTT200U  := m
+ CONFIG_DVB_USB_A800     := m
+ CONFIG_DVB_USB_DIBUSB_MB := m
+ CONFIG_DVB_USB_DIBUSB_MC := m
+ CONFIG_DVB_USB_NOVA_T_USB2 := m
+ CONFIG_DVB_USB_UMT_010  := m
+ CONFIG_DVB_USB_DIGITV   := m
+ CONFIG_DVB_USB_CXUSB    := m
+ CONFIG_DVB_PLUTO2       := m
+ CONFIG_DVB_BUDGET       := m
+ CONFIG_DVB_BUDGET_AV    := m
+ CONFIG_DVB_BUDGET_CI    := m
+ CONFIG_DVB_BUDGET_PATCH := m
+ CONFIG_DVB_AV7110       := m
+ CONFIG_DVB_TTUSB_BUDGET := m
+ CONFIG_DVB_TTUSB_DEC    := m
+ CONFIG_VIDEO_SAA7146    := m
+ CONFIG_VIDEO_SAA7146_VV := 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
@@ -140,6 +140,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)
@@ -269,7 +267,7 @@ export LC_ALL
 default:: links .version
 	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
 
-links::
+links:: dvb-links
 	@echo creating symbolic links...
 	@find ../linux/drivers/media/video -name '*.[c,h]' -type f -exec ln -sf '{}' . \;
 
@@ -282,7 +283,7 @@ links::
 	@find ../linux/drivers/media/dvb -name '*.[c,h]' -type l -exec ln -sf '{}' . \;
 	@find ../linux/include -name '*.h' -type l -exec ln -sf '{}' . \;
 
-install:: rminstall
+install:: rminstall dvb-install
 	@echo -e "\nInstalling new V4L modules at corresponding Kernel dir..."
 
 	@strip --strip-debug $(inst-m)
@@ -375,7 +376,7 @@ dvb-rminstall::
 		$(addprefix $(KDIR26)/dvb/dvb-core/, $(addsuffix .gz,$(inst_dvb-core))) 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) \
@@ -396,7 +397,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