From patchwork Wed Jun 10 15:37:44 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: 4017 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CD31C600F7 for ; Wed, 10 Jun 2020 17:38:01 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: scerveau) with ESMTPSA id DF4042A22CB From: =?utf-8?q?St=C3=A9phane_Cerveau?= To: libcamera-devel@lists.libcamera.org Date: Wed, 10 Jun 2020 17:37:44 +0200 Message-Id: <20200610153744.3225-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: Wed, 10 Jun 2020 15:38:02 -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 --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index e898782..5063edb 100644 --- a/meson.build +++ b/meson.build @@ -105,6 +105,12 @@ if get_option('test') subdir('test') endif +kernel_version_req = '>= 5.0.0' +kernel_version = run_command('uname', '-r').stdout() +if not kernel_version.version_compare(kernel_version_req) + warning('V4L2 API version @0@ is too old, @1@ is required, consider to upgrade your kernel version to use libcamera'.format(kernel_version, kernel_version_req)) +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).