summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/ChangeLog21
-rw-r--r--v4l/Makefile8
-rw-r--r--v4l/scripts/makelinks.sh81
-rw-r--r--v4l/scripts/merge-trees.sh4
-rw-r--r--v4l/scripts/unmerge-trees.sh4
5 files changed, 112 insertions, 6 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 625f7f042..0d8049af7 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,24 @@
+2005-10-10 09:05 mkrufky
+
+ * ../v4l/Makefile:
+ * ../v4l/scripts/makelinks.sh:
+ * ../v4l/scripts/merge-trees.sh:
+ * ../v4l/scripts/unmerge-trees.sh:
+ - Alternative build method: 'make kernel-links'
+ based on 'makelinks' script in dvb-kernel cvs.
+ - Symlink cvs code into kernel source in order to build cvs code
+ inside kernel build.
+ - Currently requires merged-trees, because of some missing files
+ in v4l-kernel cvs, present in dvb-kernel cvs, such as Makefile
+ - 'make kernel-links' will automatically call 'make merge-trees'
+ - Currently requires a patch to linux/include/linux/videodev.h,
+ which adds #include "compat.h" Patch is applied during
+ 'make kernel-links' and is removed during 'make clean'
+ - videodev.h patch and merge-trees dependency can be removed in
+ the future.
+
+ Signed-off-by: Michael Krufky <mkrufky@m1k.net>
+
2005-10-09 23:08 mkrufky
* ../linux/drivers/media/video/tda9887.c: (dump_read_message),
diff --git a/v4l/Makefile b/v4l/Makefile
index 1b5bc769a..bfcfb15a0 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -209,10 +209,14 @@ v4l_install:: rminstall
/sbin/depmod -a
-merge-trees:
+kernel-links:: merge-trees
+ cd ..; v4l/scripts/makelinks.sh $(KDIR) \;
+ echo $(KDIR)
+
+merge-trees::
@scripts/merge-trees.sh
-unmerge-trees:
+unmerge-trees::
@scripts/unmerge-trees.sh
dvb-install:: dvb-rminstall
diff --git a/v4l/scripts/makelinks.sh b/v4l/scripts/makelinks.sh
new file mode 100644
index 000000000..06d2fa748
--- /dev/null
+++ b/v4l/scripts/makelinks.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+# link drivers sources from CVS or release tarball into your 2.6.x kernel sources;
+
+if test -z $1 || ! test -d $1 ; then
+ echo
+ echo " usage: $0 <path_to_kernel_to_patch>"
+ echo
+ exit
+fi
+
+echo "patching $1..."
+
+cd linux
+PWD=`pwd`
+
+for x in `find drivers -type d | grep -v CVS` ; do
+ mkdir -p -v $1/$x
+done
+
+for x in `find Documentation -type d | grep -v CVS` ; do
+ mkdir -p -v $1/$x
+done
+
+for x in `find include -type d | grep -v CVS` ; do
+ mkdir -p -v $1/$x
+done
+
+for x in `find Documentation -type f | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+for x in `find drivers -type f | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+for x in `find include -type f | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+for x in `find Documentation -type l | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+for x in `find drivers -type l | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+for x in `find include -type l | grep -v CVS | grep -v .cvsignore` ; do
+ ln -v -f -s $PWD/$x $1/$x
+done
+
+cd ..
+
+ln -v -f -s $PWD/v4l/compat.h $1/include/media/compat.h
+ln -v -f -s $PWD/v4l/compat.h $1/include/linux/compat.h
+ln -v -f -s $PWD/v4l/compat.h $1/drivers/media/common/compat.h
+ln -v -f -s $PWD/v4l/compat.h $1/drivers/media/dvb/bt8xx/compat.h
+ln -v -f -s $PWD/v4l/compat.h $1/drivers/media/video/compat.h
+patch -p0 <<'DIFF'
+diff -u -p -r1.10 videodev.h
+--- linux/include/linux/videodev.h 9 Oct 2005 03:06:09 -0000 1.10
++++ linux/include/linux/videodev.h 10 Oct 2005 07:54:58 -0000
+@@ -1,6 +1,7 @@
+ #ifndef __LINUX_VIDEODEV_H
+ #define __LINUX_VIDEODEV_H
+
++#include "compat.h"
+ #include <linux/compiler.h>
+ #include <linux/types.h>
+
+diff -up v4l-kernel.orig/v4l/Makefile v4l-kernel/v4l/Makefile
+--- v4l/Makefile 2005-10-10 00:57:41.000000000 -0400
++++ v4l/Makefile 2005-10-10 00:58:26.000000000 -0400
+@@ -267,6 +267,7 @@ clean::
+ find . -name '*.c' -type l -exec rm '{}' \;
+ find . -name '*.h' -type l -exec rm '{}' \;
+ -rm -f *~ *.o *.ko *.mod.c
++ @cd ..; patch -p0 -s -R -N < v4l/scripts/makelinks.sh
+
+ distclean:: clean
+ -rm -f .version .*.o.flags .*.o.d .*.o.cmd .*.ko.cmd
diff --git a/v4l/scripts/merge-trees.sh b/v4l/scripts/merge-trees.sh
index aa8aa97b9..c41f8eba8 100644
--- a/v4l/scripts/merge-trees.sh
+++ b/v4l/scripts/merge-trees.sh
@@ -55,7 +55,7 @@ diff -up v4l-kernel.orig/v4l/Makefile v4l-kernel/v4l/Makefile
@echo -e "\nInstalling new V4L modules at corresponding Kernel dir..."
@strip --strip-debug $(inst-m)
-@@ -237,7 +238,7 @@ dvb-rminstall::
+@@ -241,7 +242,7 @@ dvb-rminstall::
$(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null
@echo
@@ -64,7 +64,7 @@ diff -up v4l-kernel.orig/v4l/Makefile v4l-kernel/v4l/Makefile
@echo -e "\nEliminating old V4L modules (errors on this step is not a problem).."
-@rm -r $(DEST) \
-@@ -258,7 +259,7 @@ rminstall::
+@@ -262,7 +263,7 @@ rminstall::
rmmodules::
rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d)
diff --git a/v4l/scripts/unmerge-trees.sh b/v4l/scripts/unmerge-trees.sh
index 9d8bd69bf..de1cf5143 100644
--- a/v4l/scripts/unmerge-trees.sh
+++ b/v4l/scripts/unmerge-trees.sh
@@ -38,7 +38,7 @@ diff -up v4l-kernel/v4l/Makefile v4l-kernel.orig/v4l/Makefile
@echo -e "\nInstalling new V4L modules at corresponding Kernel dir..."
@strip --strip-debug $(inst-m)
-@@ -238,7 +237,7 @@ dvb-rminstall::
+@@ -242,7 +241,7 @@ dvb-rminstall::
$(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null
@echo
@@ -47,7 +47,7 @@ diff -up v4l-kernel/v4l/Makefile v4l-kernel.orig/v4l/Makefile
@echo -e "\nEliminating old V4L modules (errors on this step is not a problem).."
-@rm -r $(DEST) \
-@@ -259,7 +258,7 @@ rminstall:: dvb-rminstall
+@@ -263,7 +262,7 @@ rminstall:: dvb-rminstall
rmmodules::
rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d)