MX8 Basler Camera: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 23: Line 23:
= Download and install Variscite kernel patches =
= Download and install Variscite kernel patches =


  $ wget ftp://customerv:Variscite1@ftp.variscite.com/Basler/sumo-fsl-4.14.98/recipes-kernel/linux.tar.gz
  $ wget ftp://customerv:Variscite1@ftp.variscite.com/Basler/sumo-fsl-4.14.98/meta-variscite-imx-basler.tar.gz
  $ rm -rf ../sources/meta-variscite-imx/recipes-kernel/linux
  $ tar xf meta-variscite-imx-basler.tar.gz -C ../sources/
$ tar xf linux.tar.gz -C ../sources/meta-variscite-imx/recipes-kernel


= Customize configuration files =
= Customize configuration files =
Line 34: Line 33:
BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-variscite-imx-basler "
</pre>
</pre>


Line 50: Line 50:
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-basler-camera-driver"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-basler-camera-driver"
</pre>
</pre>
Add Basler DTB files:
{{#ifeq: {{#var:SOC}}|mx8mq|
<pre>
KERNEL_DEVICETREE_append_imx8mq-var-dart = " \
        freescale/fsl-imx8mq-var-dart-sd-dp-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-sd-hdmi-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-sd-lvds-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-sd-lvds-dp-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-sd-lvds-hdmi-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-wifi-dp-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-wifi-hdmi-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-wifi-lvds-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-wifi-lvds-dp-basler-camera.dtb \
        freescale/fsl-imx8mq-var-dart-wifi-lvds-hdmi-basler-camera.dtb \
"
</pre>
|{{#ifeq: {{#var:SOC}}|mx8mm|
<pre>
KERNEL_DEVICETREE_append_imx8mm-var-dart = " \
        freescale/fsl-imx8mm-var-dart-basler-camera.dtb \
"
</pre>
|}}}}


= Build Yocto image =
= Build Yocto image =

Revision as of 14:34, 10 May 2020

DART-MX8M-MINI Basler Camera

Introduction

The following instructions will help you to integrate Basler MIPI camera support into Variscite Yocto images for i.MX8M and i.MX8MM platforms.
This will allow you to stream images/video from a Basler camera(s) connected to Variscite evaluation platforms.
You can save the camera output to a storage device and process it using the Basler pylon SDK and the pylonViewer app.

Download Variscite Yocto BSP

Please follow Build Yocto from source code.
Execute steps 1-4.3 to download the BSP sources, but don't start bitbake yet.

Download and install Basler meta layers

$ wget ftp://customerv:Variscite1@ftp.variscite.com/Basler/basler-dart-bcon-mipi-imx8-cep_1.1.2.tar.gz
$ tar xf basler-dart-bcon-mipi-imx8-cep_1.1.2.tar.gz
$ mv basler-dart-bcon-mipi-imx8-cep_1.1.2/meta-basler* ../sources

Download and install Variscite kernel patches

$ wget ftp://customerv:Variscite1@ftp.variscite.com/Basler/sumo-fsl-4.14.98/meta-variscite-imx-basler.tar.gz
$ tar xf meta-variscite-imx-basler.tar.gz -C ../sources/

Customize configuration files

Customize bblayers.conf

Add the following lines to conf/bblayers.conf

BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-variscite-imx-basler "

Customize local.conf

Add the following to conf/local.conf under your Yocto build directory:

Add Basler software and driver:

IMAGE_INSTALL_append = " \
        basler-camera-driver \
        pylon \
        python3-pypylon \
        gentl-producer \
        xauth \
"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-basler-camera-driver"

Build Yocto image

Continue following Build Yocto from source code from where you left off, to bitbake and install an image.

Running Basler camera application

Run the following commands at the shell prompt:

$ export DISPLAY=:0.0
$ GENICAM_GENTL64_PATH=/opt/dart-bcon-mipi/lib /opt/pylon6/bin/pylonviewer 2>/dev/null &