How to enable USB webcam support in Linux kernel for i.MX 8M?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable USB webcam support in Linux kernel for i.MX 8M?

1,403 Views
Sourabh1107
Contributor II

I am trying to configure a Logitech USB Webcam for my NXP i.MX 8M based embedded board. I am working with Buildroot and I have enabled CONFIG_MEDIA_USB_SUPPORT=y, CONFIG_USB_VIDEO_CLASS=y, CONFIG_USB_G_WEBCAM=y and CONFIG_MEDIA_CAMERA_SUPPORT=y in the kernel config linux-menuconfig. Added additional config fragment (in menuconfig) using BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES, did rm -rf buildroot/output/build/linux-*.*.*/ and rebuilt the image with make.

But after booting, when I do ls -l /dev/video* I get No such file or directory and v4l2-ctl --list-devices shows Cannot open device /dev/video0, exiting.. But USB device recognized (lsusb lists the device Bus 001 Device 003: ID 046d:0843)

Can anyone please let me know why the device is not showing as /dev/video* and how to resolve it?

Thanks in advance

Tags (1)
0 Kudos
3 Replies

1,378 Views
brian14
NXP TechSupport
NXP TechSupport

Hi @Sourabh1107

Could you please tell me your BSP version?

On the iMX8 family the USB camera is already supported you will need to connect your USB Camera and then list devices with Gstreamer using the following command:

$ gst-device-monitor-1.0

 

I hope this information will be helpful. 

Have a great day! 

0 Kudos

1,373 Views
Sourabh1107
Contributor II

Hi @brian14,

I am working with Buildroot and not Yocto. My Buildroot version is 2022.02

I have enabled CONFIG_MEDIA_USB_SUPPORT=y, CONFIG_USB_VIDEO_CLASS=y in Linux kernel menuconfig and rebuilt the kernel.

0 Kudos

1,325 Views
brian14
NXP TechSupport
NXP TechSupport

Hi @Sourabh1107

For this case, The Yocto Project is our fully supported tool with documentation and examples to build our BSP. I suggest using this tool instead of Buildroot.

As I mentioned before, on our latest BSP USB camera is already supported and you can implement the camera using Gstreamer.

I hope this information will be helpful. 

Have a great day!

0 Kudos