Looking at your error messages, I can see several issues that are commonly reported with the Verdin iMX8M Plus and BSP 7 mainline kernel.
Error Analysis
The errors you’re experiencing are well-documented issues:
- MIPI-CSI errors: The “SOT Error”, “Lost Frame Start Error”, and “ECC Error” messages indicate problems with the MIPI-CSI interface(1)(2)
- Video device access: The “Failed to open device: No such file or directory” suggests
/dev/video0is not available or accessible(3)
Camera Interface Issues with BSP 7
Based on community reports, there are known issues with MIPI-CSI camera migration to Yocto Scarthgap (BSP 7)(2). Users have reported kernel panics and i2c communication problems when trying to use cameras with the newer kernel versions(2).
One user specifically mentioned that their camera worked with BSP 7.0.0 but failed with newer BSP 7.1.0 builds, requiring them to use the specific BSP 7.0.0 tag(2).
Troubleshooting Steps
1. Check Available Video Devices
First, verify what video devices are available:
ls /dev/video*
v4l2-ctl --list-devices
2. Verify Camera Detection
Check if your camera is properly detected:
dmesg | grep -i csi
dmesg | grep -i camera
3. Test with GStreamer Pipeline
Before using OpenCV, test the camera with a simple GStreamer pipeline:
gst-launch-1.0 v4l2src device=/dev/video2 ! waylandsink
Note: The video device number may vary - check your v4l2-ctl --list-devices output(3).
OpenCV Example Reference
The OpenCV documentation provides a face detection example that uses this camera initialization(3):
capture.open("v4l2:///dev/video3");
capture.set(CV_CAP_PROP_FRAME_WIDTH, 640);
capture.set(CV_CAP_PROP_FRAME_HEIGHT, 480);
Recommendations
-
Use BSP 7.0.0: Based on community feedback, consider using the specific BSP 7.0.0 tag instead of newer 7.1.0 builds if you’re experiencing camera issues(2)
-
Check video device number: Your code tries
/dev/video0, but the correct device might be/dev/video2or another number(3) -
Simplify the pipeline: Start with a basic v4l2src pipeline without format conversion:
std::string pipeline = "v4l2src device=/dev/video2 ! videoconvert ! appsink";
- Verify camera hardware: Ensure your camera module is properly connected and supported with your specific BSP version
The MIPI-CSI interface issues you’re seeing are known problems with certain BSP 7 versions, and the community has found that using specific kernel versions can resolve these issues(2).
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.