summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_kconfig.pl
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-05-26 17:58:20 -0700
committerTrent Piepho <xyzzy@speakeasy.org>2007-05-26 17:58:20 -0700
commit599566a6b844b0086539e650336feada4b3e5bbb (patch)
treed9c688045e82c0500db858c4f52a9882a4e071af /v4l/scripts/make_kconfig.pl
parent8d9359376069ed515be1e3ec1afa1f73de1bfa3b (diff)
downloadmediapointer-dvb-s2-599566a6b844b0086539e650336feada4b3e5bbb.tar.gz
mediapointer-dvb-s2-599566a6b844b0086539e650336feada4b3e5bbb.tar.bz2
build: Put check in make_kconfig for pre 2.6.22 kernels
From: Trent Piepho <xyzzy@speakeasy.org> Most of the v4l-dvb drivers now depend on the kernel Kconfig option HAS_IOMEM, which isn't defined by kernels older than 2.6.22. Assume HAS_IOMEM is true for older kernels to make the v4l-dvb Kconfig files work. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l/scripts/make_kconfig.pl')
-rwxr-xr-xv4l/scripts/make_kconfig.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index d558aaeb6..7cb258d86 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -475,6 +475,10 @@ sub cmp_ver($$)
return $v1_sublevel <=> $v2_sublevel;
}
+# Get kernel version
+get_version();
+print "Preparing to compile for kernel version $kernver\n";
+
# Get Kernel's config settings
%kernopts = process_config("$kernel/.config");
@@ -492,14 +496,14 @@ EOF
exit -1;
}
+# Kernel < 2.6.22 is missing the HAS_IOMEM option
+if (!defined $kernopts{HAS_IOMEM} && cmp_ver($kernver, '2.6.22') < 0) {
+ $kernopts{HAS_IOMEM} = 2;
+}
+
# Get minimum kernel version for our variables
parse_versions();
-# Get kernel version
-get_version();
-
-print "Preparing to compile for kernel version $kernver\n";
-
kernelcheck();
open OUT, ">Kconfig" or die "Cannot write Kconfig file";