There is a problem capturing images with the newly added camera driver(imx219) to the Linux kernel

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

There is a problem capturing images with the newly added camera driver(imx219) to the Linux kernel

1,006 Views
KartikFromMarth
Contributor I

Hi NXP Community,

The process we followed to add a new camera driver(Sony imx219) to I.MX 8QM Board. 

  • Added .c file of the camera to the below location. 
    /media/santosh/24cca546-a379-4ad1-b84a-0470ca63b7dc/i.mx_kernel_compilation/iwg27s-release-bsp/build_imx8qm/tmp/work-shared/imx8qm-iwg27s/kernel-source/drivers/media/i2c. 
  • Created Makefile for the .c file to generate the kernel object file or .ko file and added the information about camera driver in the Kconfig file. 
  • Added device tree file of the camera to the below location 
    /media/santosh/24cca546-a379-4ad1-b84a-0470ca63b7dc/i.mx_kernel_compilation/iwg27s-release-bsp/build_imx8qm/tmp/work-shared/imx8qm-iwg27s/kernel-source/arch/arm64/boot/dts/freescale. 
  • Selected the custom camera driver as a module in Menuconfig. 
  • By compiling the entire Yocto image, we generated the .ko file for that camera driver at lib/modules/linux_kernel_version/drivers/media/i2c/ 

The following command is run in terminal to capture an image from the camera. The linux image has GStreamer Core Library version 1.18.0 

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=1920,height=1080 ! jpegenc ! filesink location=/home/root/test.jpg  

However, we are getting the error below as shown in the image below. 

KartikFromMarth_0-1685175398766.png

 

 

0 Kudos
5 Replies

939 Views
joanxie
NXP TechSupport
NXP TechSupport

use the command "v4l2-ctl --list-device" to check if your camera uses /dev/video0 or other device, it seems you use the wrong device

0 Kudos

884 Views
KartikFromMarth
Contributor I

In the screenshot below, I'm able to see the devices by running the command "v4l2-ctl --list-device".

KartikFromMarth_0-1685342758950.png

Although I used the above device to capture an image, I am still experiencing errors

KartikFromMarth_1-1685342898503.png

 

0 Kudos

790 Views
joanxie
NXP TechSupport
NXP TechSupport

do you have NDA? if yes, I can send the sample code to you for reference, it seems that your porting code isn't correct

0 Kudos

869 Views
joanxie
NXP TechSupport
NXP TechSupport

it seems that your board couldn't probe the camera yet, pls share the whole logfile with me

0 Kudos

854 Views
KartikFromMarth
Contributor I

I have attached the Log file document. Please look into that.

 

 

0 Kudos