summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2020-06-12 13:24:22 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-06-15 21:53:11 +0100
commit348e94debcf17aaf8ab020fda1d955cfd70f5f43 (patch)
tree49482a1411192db407008de775eb704c37120c47
parent34540a6f033913b565082293bffa7c6979aff3fd (diff)
meson: detect kernel version
Add kernel version detection to warn user that only >= 5.0.0 V4L API are supported in libcamera. Signed-off-by: Stéphane Cerveau <scerveau@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e898782a..ec54e68f 100644
--- a/meson.build
+++ b/meson.build
@@ -105,6 +105,17 @@ if get_option('test')
subdir('test')
endif
+if not meson.is_cross_build()
+ kernel_version_req = '>= 5.0.0'
+ kernel_version = run_command('uname', '-r').stdout().strip()
+ if not kernel_version.version_compare(kernel_version_req)
+ warning('The current running kernel version @0@ is too old to run libcamera.'
+ .format(kernel_version))
+ warning('If you intend to use libcamera on this machine, please upgrade to a kernel @0@.'
+ .format(kernel_version_req))
+ endif
+endif
+
# Create a symlink from the build root to the source root. This is used when
# running libcamera from the build directory to locate resources in the source
# directory (such as IPA configuration files).