From patchwork Thu Jun 11 09:33:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?St=C3=A9phane_Cerveau?= X-Patchwork-Id: 4022 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D88F660C4E for ; Thu, 11 Jun 2020 11:33:59 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: scerveau) with ESMTPSA id 196242A4A7A From: =?utf-8?q?St=C3=A9phane_Cerveau?= To: libcamera-devel@lists.libcamera.org Date: Thu, 11 Jun 2020 11:33:50 +0200 Message-Id: <20200611093350.9307-1-scerveau@collabora.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson: detect kernel version X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 09:34:00 -0000 Add kernel version detection to warn user that only >= 5.0.0 V4L API are supported in libcamera. Signed-off-by: Stéphane Cerveau Reviewed-by: Kieran Bingham --- meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meson.build b/meson.build index e898782..5ac9039 100644 --- a/meson.build +++ b/meson.build @@ -105,6 +105,15 @@ if get_option('test') subdir('test') endif +if not meson.is_cross_build() + kernel_version_req = '>= 6.0.0' + kernel_version = run_command('uname', '-r').stdout() + if not kernel_version.version_compare(kernel_version_req) + warning('Consider upgrading your kernel, as only @0@ is supported by libcamera at runtime' + .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).