Message ID | 20200610153936.3469-1-scerveau@collabora.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Le mercredi 10 juin 2020 à 17:39 +0200, Stéphane Cerveau a écrit : > 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> > --- > 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 This should not be checked for cross builds. Perhaps it could be made conditional to meson.is_cross_build() not be set ? It remains error prone as the host kernel may differ from the target kernel even without cross compilation. > + > # 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).
On 10/06/2020 22:15, Nicolas Dufresne wrote: > Le mercredi 10 juin 2020 à 17:39 +0200, Stéphane Cerveau a écrit : >> 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> >> --- >> 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 > > This should not be checked for cross builds. Perhaps it could be made > conditional to meson.is_cross_build() not be set ? It remains error > prone as the host kernel may differ from the target kernel even without > cross compilation. Indeed, Perhaps we should add some LOG(Media, Fatal) when enumerating the devices at runtime which will print a more meaningful message based on the kernel version given by the devices? -- Kieran > >> + >> # 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). > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel >
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).
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> --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+)