Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

Revision and Notes

Date

Owner

Revision

Notes

1.0

Initial release

1.1

Update for new BSP

Table of Contents

Table of Contents
minLevel1
maxLevel7

Introduction

The following provides a quick guide to start using the Camera Module on your HummingBoard Pulse and i.MX8M Plus SOM.

Software Setup

Cable setup and prerequisites

Here are the additional cables and prerequisites you will need for being able to get started with your Camera:

Image download and SD card preparation

1. Downloading the Yocto image:Download

Find the image by running the following command on your PClatest imx-image-full-*.wic.{zst,bmap} targeting the i.MX8M Plus SoM at images.solid-run.com - e.g. at the time of writing:

Code Block
wget https://images.solid-run-images.sos-de-fra-1.exo.io/IMX8/imx8mp_yocto_hardknott-5.10.72.com/IMX8/meta-solidrun-arm-imx8/scarthgap-lf-6.6.52-2.2.0/2025-06-08_24a365b/imx8mp-sr-som/imx-image-full-imx8mp-sr-som.rootfs.wic.zst
wget https://images.solid-run.com/IMX8/meta-solidrun-arm-imx8/scarthgap-lf-6.6.52-2.2.0/2025-06-08_24a365b/imx8mp-sr-som/imx-image-full-imx8mpsolidrunimx8mp-sr-20220216104419som.rootfs.wic.xzbmap

2. Writing the image to the SD card

Use the following commands for writing the image to an SD card:

Code Block
xz -dc# Either with bmaptool (faster)
sudo bmaptool copy imx-image-full-imx8mp-sr-som.rootfs.wic.zst /dev/sdX
# Or with dd (slower)
zstdcat imx-image-full-imx8mpsolidrunimx8mp-sr-20220216104419som.rootfs.wic.xzzst | sudo dd of=/dev/sdX bs=4k4M conv=fdatasync status=progress fsync

Note: Plug a micro SD into your Linux PC, the following assumes that the micro SD is added as /dev/sdX and all it’s partitions are unmounted.

...

Please insert the micro USB into your device, then you can refer to Serial Connection for installing necessary serial connection software in Linux/Windows.

...

  • Please inset ‘root’ as a username for being able to log in as shown in the above picture.

Camera Test

...

  1. Enable Basler Cameras in Software:
    Edit file extlinux.conf on the first partition of the board adding the line starting with “FDTOVERLAYS” - either from a PC, or from the device serial console, then reboot. The resulting file should look similar to the example below (line 5 is the important addition):

    Code Block
    default Yocto
    label Yocto
       kernel /Image
       fdtdir /
       FDTOVERLAYS ../freescale/imx8mp-sr-som-basler.dtbo ../freescale/imx8mp-hummingboard-pulse-basler.dtbo
    append root=PARTUUID=076c4a2a-02 rootwait


    For editing on device can use nano text editor:

    Code Block
    mount /dev/mmcblk1p1 /boot
    nano /boot/extlinux/extlinux.conf
    # save with ctrl+o, exit with ctrl+x
    sync
    reboot
  2. Connect your HDMI cable.

Note: The camera preview only works when a monitor is connected to your Board.

...

  1. Connect your Camera to the CSI 2.0 of the carrier as shown in the picture below:

...

  1. Image Added

Tip

A green LED will light up at the back panel of your camera. This is an indication of Camera is operating. See the following figure:

...

Info

You can either connect your Camera to the CSI 1.0 of the i.MX8M SOM. See the following figure:

...

  1. Check available devices by running the following on your monitor:

    Code Block
    v4l2-ctl --list-devices

...

  • You can use 'v4l2-ctl --device /dev/video0 --all' for complete information and default configuration of your device.

Info

When connecting to the i.MX8M Plus SOM, please use
'v4l2-ctl --device /dev/video1 --all' instead.

4. Use the following commands to monitor your camera and configure resolution:

...

  1. 
    # Example Output:
     ():
            /dev/v4l-subdev0
            /dev/v4l-subdev4
            /dev/v4l-subdev5
    
     ():
            /dev/v4l-subdev1
            /dev/v4l-subdev6
            /dev/v4l-subdev7
    
     (csi0):
            /dev/v4l-subdev3
    
     (csi1):
            /dev/v4l-subdev2
    
    FSL Capture Media Device (platform:32c00000.bus:camera):
            /dev/media0
    
    mxc-isi-m2m_v1 (platform:32e00000.isi:m2m_devic):
            /dev/video2
    
    VIV (platform:viv0):
            /dev/video3
    
    VIV (platform:viv1):
            /dev/video4
    
    vsi_v4l2dec (platform:vsi_v4l2dec):
            /dev/video1
    
    vsi_v4l2enc (platform:vsi_v4l2enc):
            /dev/video0
    
    viv_media (platform:vvcam-video.0):
            /dev/media1

    The relevant capture devices associated with the cameras are the ones named “VIV (platform:vivX)”:
    - “VIV (platform:viv0)” (/dev/video3): Camera Connector on HummingBoard
    - “VIV (platform:viv1)” (/dev/video4): Camera Connector on System on Module
    If the numbering changed, substitute the video device numbers (3,4) accordingly in the following steps.

  2. Render from Camera to HDMI Display with gstreamer:

    Code Block
    # for HummingBoard Camera Connector
    gst-launch-1.0 -v v4l2src device=/dev/

...

  1. video3 ! "video/x-raw,format=YUY2,width=1920,height=1080" ! queue ! imxvideoconvert_g2d ! waylandsink

...

Info

When connecting to the i.MX8M Plus SOM, please use 'v4l2-ctl --device /dev/video1 --all' instead.

...

  1. 
    # for System on Module Camera Connector
    gst-launch-1.0 -v v4l2src device=/dev/video4 ! "video/x-raw,format=YUY2,width=1920,height=1080" ! queue ! imxvideoconvert_g2d ! waylandsink
  2. Run NXP Video Demo to render from Camera to HDMI Display:

    Code Block
    systemctl stop weston weston.socket
    cd /opt/imx8-isp/bin
    # for HummingBoard Camera Connector
    ./video_test -w 1920 -h 1080 -f YUYV -t drm -m 0 -d 3
    # for System on Module Camera Connector
    ./video_test -w 1920 -h 1080 -f YUYV -t drm -m 0 -d 4

Once you run the previous commands, you can direct your camera to an object and start monitoring as shown in the following figure:

...