diff options
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/fix_kconfig.pl | 21 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 7 | ||||
-rwxr-xr-x | v4l/scripts/make_kconfig.pl | 5 | ||||
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 6 | ||||
-rwxr-xr-x | v4l/scripts/strip-trailing-whitespaces.sh | 2 |
5 files changed, 37 insertions, 4 deletions
diff --git a/v4l/scripts/fix_kconfig.pl b/v4l/scripts/fix_kconfig.pl new file mode 100755 index 000000000..9a448cbc6 --- /dev/null +++ b/v4l/scripts/fix_kconfig.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +use strict; + +my $need_changes = 0; +my $out; + +open IN,".config"; +while (<IN>) { + if (s/CONFIG_VIDEO_CX88_MPEG=y/CONFIG_VIDEO_CX88_MPEG=m/) { + $need_changes=1; + $out .= $_; + } +} +close IN; + +if ($need_changes) { + printf("There's a known bug with the building system with this kernel. Working around.\n"); + open OUT, ">.config"; + print OUT $out; + close OUT; +} diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index d24b5f718..423dcff77 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -277,6 +277,13 @@ open IN, "<$infile" or die "File not found: $infile"; $out.= "#ifndef __CONFIG_COMPAT_H__\n"; $out.= "#define __CONFIG_COMPAT_H__\n\n"; $out.= "#include <linux/autoconf.h>\n\n"; + +# mmdebug.h includes autoconf.h. So if this header exists, +# then include it before our config is set. +if (-f "$kdir/include/linux/mmdebug.h") { + $out.= "#include <linux/mmdebug.h>\n\n"; +} + while(<IN>) { next unless /^(\S+)\s*:= (\S+)$/; $out.= "#undef $1\n"; diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 7c259eeb6..144325c34 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -537,6 +537,11 @@ if (!defined $kernopts{HAS_IOMEM} && cmp_ver($kernver, '2.6.22') < 0) { $kernopts{HAS_IOMEM} = 2; } +# Kernel < 2.6.22 is missing the HAS_DMA option +if (!defined $kernopts{HAS_DMA} && cmp_ver($kernver, '2.6.22') < 0) { + $kernopts{HAS_DMA} = 2; +} + # Kernel < 2.6.23 is missing the VIRT_TO_BUS option if (!defined $kernopts{VIRT_TO_BUS} && cmp_ver($kernver, '2.6.23') < 0) { # VIRT_TO_BUS -> !PPC64 diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 43c563d47..35ab7dddf 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -192,8 +192,6 @@ open_makefile('../linux/drivers/media/Makefile'); # Creating Install rule print OUT "media-install::\n"; -print OUT "\t\@echo \"Stripping debug info from files\"\n"; -print OUT "\t\@strip --strip-debug \$(inst-m)\n\n"; removeobsolete(); removeubuntu(); @@ -210,7 +208,9 @@ while (my ($dir, $files) = each %instdir) { print OUT "if [ \$\$n -eq 4 ]; then echo; echo -n \"\t\t\"; n=1; fi; "; print OUT "echo -n \"\$\$i \"; "; print OUT "install -m 644 -c \$\$i \$(DESTDIR)\$(KDIR26)/$dir; fi; done; "; - print OUT "if [ \$\$n -ne 0 ]; then echo; fi;\n\n"; + print OUT "if [ \$\$n -ne 0 ]; then echo; "; + print OUT "strip --strip-debug \$(DESTDIR)\$(KDIR26)/$dir/*.ko; "; + print OUT "fi;\n\n"; } print OUT "\t@echo\n"; print OUT "\t/sbin/depmod -a \$(KERNELRELEASE) \$(if \$(DESTDIR),-b \$(DESTDIR))\n\n"; diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index cb341ce76..def48a67d 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -21,7 +21,7 @@ fi for file in `eval $files`; do case "$file" in - *.patch) + *.gif | *.pdf | *.patch) continue ;; esac |