[libcamera-devel] libcamera starting point on px30 evk

Tommaso Merciai tommaso.merciai at amarulasolutions.com
Thu May 12 13:04:55 CEST 2022


On Thu, May 12, 2022 at 12:33:43PM +0200, Jacopo Mondi wrote:
> Hi Tommaso,
> 
> On Thu, May 12, 2022 at 12:07:20PM +0200, Tommaso Merciai via libcamera-devel wrote:
> > On Thu, May 12, 2022 at 10:43:51AM +0100, Kieran Bingham wrote:
> > > Hi Tommaso,
> > >
> > > Quoting Tommaso Merciai via libcamera-devel (2022-05-12 10:31:07)
> > > > Hi all,
> > > > I'm trying to start to play with libcamera on PX30_Mini_EVB_V11.
> > > > Can you give me some tips on build image with all libcamera dependencies
> > > > for this type of SOC. Like buildroot Image or Yocto Image.
> > >
> > > libcamera is supported by buildroot, and as you've seen also by yocto. I
> > > haven't followed the Yocto support, so I don't know who keeps it
> > > updated, but I know buildroot received a patch to update to a quite
> > > recent libcamera release in the last few days.
> > >
> > > > Actually I have compiled multimedia-libcamera-image with sdk using Yocto. I'm able
> > > > to compile libcamera project with this. Could be a good starting point?
> > > > Or you suggest another way?
> > >
> > > I would say 'yes', but you will likely want to be able to specify the
> > > latest version of libcamera to build, and there may be more active
> > > development ongoing and required for your platform, so you probably
> > > don't want to 'wait' for someone to update the Yocto release. (Or you
> > > could post the updates to the yocto project too).
> > >
> > > (Wanting to use the latest libcamera applies to buildroot too of course)
> > >
> > > --
> > > Regards
> > >
> > > Kieran
> >
> >
> > Hi Kieran,
> > Thanks for your quick reply and your suggestion. Can you point me a good link to build a
> > an image that support libcamera using buildroot?
> >
> 
> Alternatively, you can use the buildroot-built toolchain andsysroot to
> build libcamera externally. Build your buildroot image as you would
> regularly do, then you can clone and build libcamera externally using
> a cross-file for meson, to instruct the build system to use the same
> toolchain as the one you have compiled your rootfs with.
> 
> The one I use looks like:
> 
> --------------------------------------------------------------------------------
> $ cat meson-cross-buildroot
> [binaries]
> c = '/home/build/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-gcc'
> cpp = '/home/build/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-g++'
> ar = '/home/build/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ar'
> strip = '/home/build/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-strip'
> pkgconfig = '/home/build/buildroot/output/host/usr/bin/pkg-config'
> cmake = '/home/build/buildroot/output/host/usr/bin/cmake'
> qmake = '/bin/false'
> 
> [properties]
> needs_exe_wrapper = true
> 
> [built-in options]
> c_args = ['-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64']
> c_link_args = []
> cpp_args = ['-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64']
> cpp_link_args = []
> 
> [host_machine]
> system = 'linux'
> cpu_family ='aarch64'
> cpu = 'cortex-a57.cortex-a53'
> endian = 'little'
> 
> $ meson build --cross-file meson-cross-buildroot
> $ cd build; ninja
> --------------------------------------------------------------------------------

Hi,
Thanks I'll try this way. At the moment I'm cross compiling libcamera
using Yocto SDK with the following cmds:

---------------------------------------------------------------------------------------------------------------------
source /opt/poky/4.0/environment-setup-armv8a-poky-linux
export PYTHONPATH="/opt/poky/4.0/sysroots/armv8a-poky-linux/usr/lib/python3.10/site-packages/"

meson --prefix=/targetfs --libdir=usr/lib --includedir=usr/include --datadir=usr/share --libexecdir=usr/libexec build
ninja -C build install
---------------------------------------------------------------------------------------------------------------------


output:
---------------------------------------------------------------------------------------------------------------------
...
Build targets in project: 138

libcamera 0.0.0

  Paths
    LIBCAMERA_DATA_DIR       : "/targetfs/usr/share/libcamera"
    LIBCAMERA_SYSCONF_DIR    : "/targetfs/etc/libcamera"
    IPA_PROXY_DIR            : "/targetfs/usr/libexec/libcamera"
    IPA_CONFIG_DIR           : "/targetfs/etc/libcamera/ipa:/targetfs/usr/share/libcamera/ipa"
    IPA_MODULE_DIR           : "/targetfs/usr/lib/libcamera"

  Configuration
    Enabled pipelines        : ipu3
                               raspberrypi
                               rkisp1
                               simple
                               uvcvideo
                               vimc
    Enabled IPA modules      : ipu3
                               raspberrypi
                               rkisp1
                               vimc
    Tracing support          : NO
    Android support          : NO
    GStreamer support        : YES
    Python bindings          : YES
    V4L2 emulation support   : NO
    cam application          : YES
    qcam application         : NO
    lc-compliance application: YES
    Unit tests               : YES

  Subprojects
    gtest                    : YES
    pybind11                 : YES

  User defined options
    Cross files              : /opt/poky/4.0/sysroots/x86_64-pokysdk-linux/usr/share/meson/aarch64-poky-linux-meson.cross
    Native files             : /opt/poky/4.0/sysroots/x86_64-pokysdk-linux/usr/share/meson/meson.native
    datadir                  : usr/share
    includedir               : usr/include
    libdir                   : usr/lib
    libexecdir               : usr/libexec
    prefix                   : /targetfs

Found ninja-1.10.2 at /opt/poky/4.0/sysroots/x86_64-pokysdk-linux/usr/bin/ninja


ninja: Entering directory `build'
[17/388] Generating src/ipa-priv-key with a custom command
...........+....+.........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+.+........+.+........+...+.........+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..........+..+....+...........+.......+...+.................+...............+.+..+....+......+.....+....+...+.....+.....................+.+...+...+.....+.........+.............+.....+.+...........+.............+...+...+......+...............+........+.+..+...+.+.....+...+...+.......+..+...............+.+.....+.............+.....+.+........+................+...........+....+..+............+......+...............+....+...+.....+....+...+.....+..........+...+..+......+...............+......+...+.+.........+..+.........+.+...........+...+.......+...+..+....+........+......+..........+..+..........+...+...........+.+........+....+...+............+..+......+...+................+...........+...+.........+............+....+......+........+...+.......+.....+......+.+.....+.........+......+...+.+.........+............+..............+..........+.....+.+..............+....+...............+...........+.......+..+...............+.+......+...+...............+.....+......+......+.+..+.+............+.....+.............+..+...+......+......+.......+......+.....+.......+...+..+.......+...........+......+...+...+.........+.+.....+....+......+.....+...+......+...+...+.............+..+.......+.....+......+.+...+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.+.+.....+..........+......+.....+...+.+...+..+....+.....+..........+..............+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.........+..............+......+...+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+..+............+.+..+..........+..+...+......+.+...+......+..+.......+..+...+.+......+........+.......+...+...+...+..+...+....+..+.+..+.+......+.....+.+...+.....+.+...+.....+..........................................+...+..........+......+..+.............+.....+.+.....+......+....+.....+.........+............+............+...+.............+.........+...+...+..+...+......+...+.......+...........+...+......+..........+...+......+...........+......+....+...+......+.........+...+........+.+...+...+..+................+......+..............+.+.....+.+...+..+...+......+..................+.......+..................+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[49/388] Generating src/libcamera/ipa_pub_key_cpp with a custom command
writing RSA key
[387/388] Installing files.
Installing include/libcamera/ipa/core_ipa_interface.h to /targetfs/usr/include/libcamera/libcamera/ipa...
....
----------------------------------------------------------------------------------------------------------------------

Could be also a valid solution or I'm wrong?

Thanks in advance,
Tommmaso

> 
> > Thanks,
> > Tommaso
> >
> > >
> > >
> > >
> > > >
> > > > Thanks in advance,
> > > > Tommaso
> > > >
> > > > --
> > > > Tommaso Merciai
> > > > Embedded Linux Engineer
> > > > tommaso.merciai at amarulasolutions.com
> > > > __________________________________
> > > >
> > > > Amarula Solutions SRL
> > > > Via Le Canevare 30, 31100 Treviso, Veneto, IT
> > > > T. +39 042 243 5310
> > > > info at amarulasolutions.com
> > > > www.amarulasolutions.com
> >
> > --
> > Tommaso Merciai
> > Embedded Linux Engineer
> > tommaso.merciai at amarulasolutions.com
> > __________________________________
> >
> > Amarula Solutions SRL
> > Via Le Canevare 30, 31100 Treviso, Veneto, IT
> > T. +39 042 243 5310
> > info at amarulasolutions.com
> > www.amarulasolutions.com

-- 
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai at amarulasolutions.com
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info at amarulasolutions.com
www.amarulasolutions.com


More information about the libcamera-devel mailing list