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>
This commit is contained in:
parent
34540a6f03
commit
348e94debc
1 changed files with 11 additions and 0 deletions
11
meson.build
11
meson.build
|
@ -105,6 +105,17 @@ if get_option('test')
|
||||||
subdir('test')
|
subdir('test')
|
||||||
endif
|
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
|
# 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
|
# running libcamera from the build directory to locate resources in the source
|
||||||
# directory (such as IPA configuration files).
|
# directory (such as IPA configuration files).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue