Porting Guide (Yocto)#
It focuses on Yocto-based systems, as these are the most widely used in the embedded world.
The guide is intended for Basler dart E cameras and the following NXP i.MX8 boards:
- imx8mmevk (NXP: 8MMINILPD4-EVK)
- imx8mmddr4evk (NXP: 8MMINID4-EVK)
- imx8mpevk (NXP: 8MPLUSLPD4-EVK) (with constraints)
- imx8mqevk (NXP: MCIMX8M-EVKB (B Silicon))
This guide focuses on cameras with on-board ISP (daA…mci cameras). Integration of non-ISP cameras for the i.MX 8M Plus isn't covered.
To simplify the development process, sources are provided as GitHub meta layers, which can be seamlessly integrated into existing Yocto projects. Each layer comes with its own documentation covering details about integration and compilation:
The overview diagram below provides a high-level view on all software components involved in operating a Basler dart E camera.
This guide assists in integrating the components highlighted in green and blue into your system.
Before you proceed, ensure that you have read the available information:
- README.md file in the meta-basler-imx8 repository on Github
- Documentation in the Embedded Vision Cameras section
A working setup based on one of the devices officially supported by Basler is also recommended.
Start by adding the layers to your Yocto setup as described in the meta-basler-imx8 repository.
The following paragraphs provide additional information related to the specific layers.
Basler Tools (meta-basler-tools)#
The meta-basler-tools layer is independent of the SoC and should therefore work out of the box. After compilation, you should be able to start the pylon Viewer application on the target by running the following command from a terminal:
Basler Embedded (meta-basler-imx8)#
The meta-basler-imx8 layer is SoC- and board-specific. Therefore, porting is a bit more complex. The effort depends on how much your target platform differs from the reference boards.
Basler recommends cloning the layer on GitHub and modifying it to your needs. Alternatively, you can create a custom layer and integrate the necessary changes using .bbappend files.
To create a working setup, the components shown on the overview diagram must be adapted to your BSP.
These are located in /recipes-camera. These recipes are not SoC-specific. They install the binary drivers for Basler cameras. There is no need to modify these.
Basler Camera Driver#
The camera driver is located in /recipes-kernel/kernel-modules. It is a generic camera driver for all MIPI based camera modules.
All necessary kernel patches are located in /recipes-kernel/linux/linux-imx. These need to be ported over to the target kernel.
There is no general advice on how to do that, as it heavily depends on the target structures. Basler recommends creating a kernel repo for the target device and applying the patches there using
Device Tree Files#
These need to be rewritten according to your target device. The kernel patches contain all device tree files for the NXP evaluation kits.
Basler recommends starting with a device tree file that is as close as possible to your target device. For a list of device tree files, see the tables in meta-basler-imx8.
- Ensure a device-tree node for the camera is assigned to the correct I2C bus.
- Ensure the camera node is correctly linked to the CSI device.
- Ensure the number and order of CSI lanes is correct.
The camera modules rely on the availability and correct implementation of I2C clock stretching.
Tips for Bring-up#
Ensure that the camera has power, i.e., that the green LED is lit.
Check the Linux kernel messages using
dmesg to ensure the camera was probed properly:
If there are more camera nodes in the device tree than physical connected cameras, you will see an error message for every node without a corresponding physical device.
Ensure that a GenTL producer (.cti file) for your camera model is installed in /opt/dart-bcon-mipi/lib*.
Operate the camera using the pylon Viewer:
If you have any difficulties during the installation, don't hesitate to contact Basler support. Our team of Field Application Engineers will reach out to you.
To make it easier to debug the issue, provide the following information:
- Camera type you are using
- SoC or board type
- Kernel version
- Output of
- Dump of the current device tree: