Commit Graph

13 Commits

Author SHA1 Message Date
Peter Seiderer
72578f6ebb package/libcamera: fix BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS handling
Fix BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS handling, change from
'depends on BR2_m68k' to 'depends on !BR2_m68k'.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit ff60c4c533)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-12-06 23:25:19 +01:00
Kieran Bingham
2d68375b9c package/libcamera: Prevent builds on m68k
The ControlValue structure is currently defined with a 16-bit hole
(causing unaligned access to the numElements_ field, though that's a
separate topic).

This structure has a static assertion to ensure that its size does not
change without due care, as it forms part of our ABI and is used in
Serialisation between the pipeline handlers and IPA components.

The m68k architecture is the only target which fails this assertion,
which is likely because it can pack the structure more efficiently,
producing a different binary size.

This is likely an area we will tackle before stabilising our ABI, but
until then, disable m68k builds as libcamera is not expected to be
supported on this target.

Fixes;
  - http://autobuild.buildroot.net/results/9dce26e94299a2c61bba60cbc7803926e2f85e29/

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[yann.morin.1998@free.fr, suggestions from Thomas:
  - introduce BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
  - propagate that to the comment
  - add autobuilder reference
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 66526e3518)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-09-05 14:29:32 +02:00
Fabrice Fontaine
868207d792 package/libcamera: disable werror
This will fix the following build failure:

../src/gstreamer/gstlibcameraallocator.cpp: In static member function 'static GQuark FrameWrap::getQuark()':
/home/peko/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/glib-2.0/glib/gatomic.h:128:15: error: variable 'gapg_temp_atomic' set but not used [-Werror=unused-but-set-variable]
     gpointer *gapg_temp_atomic = (gpointer *)(atomic);                       \
               ^

Fixes:
 - http://autobuild.buildroot.org/results/c28500d4cc55fbd2bac87f2c11759ddc9163bc91

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-08-16 23:02:53 +02:00
Peter Seiderer
f1c7d55458 package/libcamera: needs faligned-new
Fixes:

  - http://autobuild.buildroot.net/results/2db7292e251ce81d31187c3a9eb36dbc9236bd07

  ../src/libcamera/v4l2_videodevice.cpp: In member function 'int libcamera::V4L2VideoDevice::allocateBuffers(unsigned int, std::vector<std::unique_ptr<libcamera::FrameBuffer> >*)':
  ../src/libcamera/v4l2_videodevice.cpp:1139:39: error: 'new' of type 'libcamera::V4L2BufferCache' with extended alignment 8 [-Werror=aligned-new=]
   1139 |  cache_ = new V4L2BufferCache(*buffers);
        |                                       ^
  ../src/libcamera/v4l2_videodevice.cpp:1139:39: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter
  ../src/libcamera/v4l2_videodevice.cpp:1139:39: note: use '-faligned-new' to enable C++17 over-aligned new support
  ../src/libcamera/v4l2_videodevice.cpp: In member function 'int libcamera::V4L2VideoDevice::importBuffers(unsigned int)':
  ../src/libcamera/v4l2_videodevice.cpp:1315:36: error: 'new' of type 'libcamera::V4L2BufferCache' with extended alignment 8 [-Werror=aligned-new=]
   1315 |  cache_ = new V4L2BufferCache(count);
        |                                    ^
  ../src/libcamera/v4l2_videodevice.cpp:1315:36: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter
  ../src/libcamera/v4l2_videodevice.cpp:1315:36: note: use '-faligned-new' to enable C++17 over-aligned new support

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-08 18:19:05 +02:00
James Hilliard
b6141b2aa1 package/libcamera: fix install staging typo
This won't enable install to staging unless capitalized.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-07-07 23:04:18 +02:00
Yann E. MORIN
f835da1c6d package/lbcamera: don't override _CONF_OPTS, but append
Commit 99cc53f3f4 (package/libcamera: add v4l2 compatibility layer
option) incorrectly added the v4l2 option, which makes it so that
the previous options are overrdien.

Fix that by using an append-assignment.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-20 08:56:20 +02:00
Peter Seiderer
99cc53f3f4 package/libcamera: add v4l2 compatibility layer option
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-18 22:17:07 +02:00
Peter Seiderer
f63d6b5459 package/libcamera: bump version to 96fab38
- add host dependencies: openssl, pkgconf, python3-pyyaml
- add dependencies: gnutls
- changed from mandatory to optional dependency: udev
- add dedicated pipeline configure options
- add optional dependencies: boost, gstreamer1/gst1-plugins-base,
  qt5base, tiff
- update license info (Apache-2.0 omitted - applies only for android code)

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[yann.morin.1998@free.fr:
  - simplify the qt5-widgets and qt5tools-linguist conditions
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-18 22:09:01 +02:00
Kieran Bingham
fc0e9bef63 package/libcamera: bump to version 448393f77ec9e37cb807e8e8d35c1a4877d253d4
Update to the latest version of libcamera, including a fix for toolchains
which require libatomic to be linked manually.

The patch which handles this locally is therefore removed.

Since the last version update, the option to disable building of the
unit tests has been renamed from '-Dtests=' to '-Dtest='

This is updated accordingly.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-19 22:10:10 +02:00
Fabrice Fontaine
1e0dfcd50a package/libcamera: link with atomic when needed
Fixes:
 - http://autobuild.buildroot.org/results/1f0b8338f5f39aa86b9d432598dae2f53c5f7c84

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 22:17:43 +02:00
Kieran Bingham
1db7890e0a package/libcamera: bump to version caf25dc5cfd11b965316f02610d49ae3d886716b
Buildroots autobuild identified a failure on GCC v6.2 and GCC v6.3,
producing the following warning (reported as error due to -Werror):

  event_dispatcher_poll.cpp:231:13: error: types may not be defined
      in a for-range-declaration [-Werror]

              for (const struct pollfd &pfd : pollfds) {
                         ^~~~~~
              cc1plus: all warnings being treated as errors

A fix has been integrated upstream, bump the package to incorporate it.

Fixes: http://autobuild.buildroot.net/results/f6dd4c60c04892c8b1669e6000fce7edb2b6349e/

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-06-27 22:29:37 +02:00
Giulio Benetti
6cccfe64cd package/libcamera: bump to version ab0188fc8bbb6f397ac3aa11c9377662b7bd88b0
Build failures due to:
`fatal error: sys/auxv.h: No such file or directory`
have been fixed upstream.

Fixes:
http://autobuild.buildroot.net/results/158/158950190141b4f1b0a3d7813322d3971bb8ba75/

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-04-27 14:30:28 +02:00
Kieran Bingham
25be066a65 package/libcamera: new package
http://libcamera.org/

Cameras are complex devices that need heavy hardware image processing
operations. Control of the processing is based on advanced algorithms
that must run on a programmable processor. This has traditionally been
implemented in a dedicated MCU in the camera, but in embedded devices
algorithms have been moved to the main CPU to save cost. Blurring the
boundary between camera devices and Linux often left the user with no
other option than a vendor-specific closed-source solution.

To address this problem the Linux media community has very recently
started collaboration with the industry to develop a camera stack that
will be open-source-friendly while still protecting vendor core IP.
libcamera was born out of that collaboration and will offer modern
camera support to Linux-based systems, including traditional Linux
distributions, ChromeOS and Android.

The project has not made an official release as of yet, so we're
using the latest sha1 from master

We utilise C++ 11 but we mandate GCC5+ due to a bug [0] in earlier
versions which result in compile failures on our code base.

[0] Bug 54316 - [C++11] move constructor for stringstream
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

Documentation and Tests are disabled from the build.

With the following added to libcamera.config:

  BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
  BR2_PACKAGE_LIBCAMERA=y

./utils/test-pkg -c libcamera.config -p libcamera
                             br-arm-full [1/6]: SKIPPED
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: SKIPPED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: SKIPPED
                            sourcery-arm [6/6]: SKIPPED

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas:
 - add missing Config.in comment
 - remove empty newline at end of hash file
 - adjust indentation of upstream URL in Config.in help text]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-03 22:51:45 +02:00