diff options
author | Michael Krufky <devnull@localhost> | 2005-10-10 09:21:29 +0000 |
---|---|---|
committer | Michael Krufky <devnull@localhost> | 2005-10-10 09:21:29 +0000 |
commit | d5d9d828e88ef31c781c4809856065497072cb41 (patch) | |
tree | ddaa30af236ecc40b8280c2905da5994c613913f /v4l/scripts | |
parent | 68c78ec14f59773d86ac8ed293819325655147b8 (diff) | |
download | mediapointer-dvb-s2-d5d9d828e88ef31c781c4809856065497072cb41.tar.gz mediapointer-dvb-s2-d5d9d828e88ef31c781c4809856065497072cb41.tar.bz2 |
- 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>
Diffstat (limited to 'v4l/scripts')
-rw-r--r-- | v4l/scripts/makelinks.sh | 81 | ||||
-rw-r--r-- | v4l/scripts/merge-trees.sh | 4 | ||||
-rw-r--r-- | v4l/scripts/unmerge-trees.sh | 4 |
3 files changed, 85 insertions, 4 deletions
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) |