To check if your camera works you can do this:
Please use this 4.9.51 demo image: fsl-image-qt5-validation-imx-xwayland-imx8mqevk.sdcard
There are two CSI2 connectors on the 8M-EVK from NXP, the one in the corner should work out of the box with this SD card image (proceed with $ gst-launch-1.0 ... ), for the other one you need to do this:
In the SD card partition with the dtb files:
- rename the file fsl-imx8mq-evk.dtb to original_fsl-imx8mq-evk.dtb
- rename the file fsl-imx8mq-evk-mipi-csi2.dtb to fsl-imx8mq-evk.dtb
This enables the other CSI2 interface on the connector showing to the power connector.
Connect the camera to the CSI2 connector (the one you've chosen) and connect an HDMI display. Then switch on the board and boot Linux.
$ gst-launch-1.0 v4l2src device=/dev/video0 ! waylandsink
You could use parameters to scale the camera window down to 640x480:
$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! waylandsink
To record the stream into a file you normally use a video encoder. On the i.MX 8M such an encoder is software based and must be included into the image first. Please look into this thread for some information:
IMX8MQ video encoding capabilities
Regards,
Bernhard.