Changes

Jump to navigation Jump to search
Line 44: Line 44:     
==== overview ====
 
==== overview ====
<br />
+
This section describes how to update the MYD-JX8MX system to support our camera module. To support our camera module, we need to update two parts of the system, '''Image''' and '''dtb'''.
 +
 
 +
In the Image, we added the camera driver, while the dtb indicates the camera model used. In general, you only need to use the Image and dtb, that we have prebuilt(in deb format), and you don't need to build from source when it is not necessary.
 +
 
 +
==== BSP package introduction ====
 +
 
 +
=====i.MX platform bsp=====
 +
https://github.com/veyeimaging/nxp_i.mx_veye_bsp
 +
 
 +
includes:
 +
 
 +
*driver source code
 +
*i2c toolkits
 +
*application demo
 +
 
 +
=====google Coral Dev board bsp=====
 +
https://github.com/veyeimaging/google_coral_i.mx
 +
 
 +
includes:
 +
 
 +
*prebuild linux kernel and dtb:linux-image-4.14.98-imx_12-2_arm64.deb
 +
*dts source code
 +
*defconfig and rules file for build system
 +
 
 +
==== Flash the Coral standard system ====
 +
Refer to:
 +
 
 +
https://coral.ai/docs/dev-board/get-started/#flash-the-board
 +
 
 +
Flash the standard system provided by google to the board.
 +
 
 +
==== Install MDT and connect the board via MDT ====
 +
Refer to:
 +
 
 +
https://coral.ai/docs/dev-board/get-started/#install-mdt
 +
 
 +
https://coral.ai/docs/dev-board/get-started/#connect-via-mdt
 +
 
 +
==== Using prebuilt Image and dtb file (deb file) ====
 +
On HOST PC:
 +
 
 +
<code>git clone <nowiki>https://github.com/veyeimaging/google_coral_i.mx.git</nowiki></code>
 +
 
 +
* list device
 +
 
 +
<code>mdt devices</code>
 +
 
 +
one coral board appears like this:
 +
 
 +
<code>deft-kid                (192.168.0.122)</code>
 +
 
 +
* install linux image dtb
 +
 
 +
<code>cd google_coral_i.mx/linux-image-deb/</code>
 +
 
 +
<code>mdt install ./linux-image-4.14.98-imx_12-2_arm64.deb</code>
 +
 
 +
Pay attention to the log information, it can be installed correctly normally.
 +
 
 +
* Log in Coral board via mdt
 +
 
 +
<code>mdt shell</code>
 +
 
 +
* Overwrite the dtb file
 +
 
 +
In coral board shell,
 +
 
 +
<code>sudo cp fsl-imx8mq-phanbell-<camera_name>.dtb fsl-imx8mq-phanbell.dtb</code>
 +
 
 +
camera_name could be veye327,csimx307,cssc132.
 +
 
 +
* Reboot coral dev board
 +
 
 
=== Applications and Test ===
 
=== Applications and Test ===
 +
The following commands are all executed on coral board.
 +
 +
==== Check system status ====
 +
Run the following command to confirm whether the camera is probed.
 +
 +
*VEYE-MIPI-IMX327S
 +
 +
<code>dmesg | grep veye327</code>  
 +
 +
The output message appears as shown below:
 +
 +
<code>camera veye327_mipi is found</code>
 +
 +
<code>Registered sensor subdevice: veye327_mipi 1-003b</code>
 +
 +
*CS-MIPI-IMX307
 +
 +
<code>dmesg | grep csimx307</code>  
 +
 +
The output message appears as shown below:
 +
 +
<code>camera csimx307_mipi is found</code>
 +
 +
<code>Registered sensor subdevice: csimx307_mipi  1-003b</code>
 +
 +
*CS-MIPI-SC132
 +
 +
<code>dmesg | grep cssc132</code>  
 +
 +
The output message appears as shown below:
 +
 +
<code>camera cssc132_mipi is found</code>
 +
 +
<code>Registered sensor subdevice: cssc132_mipi 1-003b</code>
 +
 +
*Run the following command to check the presence of video node.
 +
 +
<code>ls /dev/video*</code>
 +
 +
The output message appears as shown below.
 +
 +
<code>video0</code>
 +
 +
or:
 +
 +
<code>v4l2-ctl --list-devices</code>
 +
 +
You should see the camera listed as <code>/dev/video0:</code>
 +
 +
<code>i.MX6S_CSI (platform:30a90000.csi1_bridge):</code>
 +
 +
<code>/dev/video0</code>
 +
 +
The camera use i2c-1.
 +
====List the modes supported by the camera====
 +
<code>v4l2-ctl --list-formats-ext -d /dev/video0</code>
 +
 +
==== Video Stream test ====
 +
<code>export DISPLAY=:0</code>
 +
 +
* Preview (VEYE-MIPI-IMX327S,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 io-mode=0 ! video/x-raw,width=1920,height=1080 ! glimagesink</code>
 +
 +
* Preview  example 2 (VEYE-MIPI-IMX327S,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 io-mode=0 ! video/x-raw,width=1920,height=1080 ! fpsdisplaysink videosink=glimagesink sync=false text-overlay=false -v</code>
    +
*Preview example 3(CS-MIPI-IMX307 @1080p mode 10fps)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1920,height=1080,framerate=(fraction)10/1' ! waylandsink</code>
 +
 +
* Preview (CS-MIPI-IMX307 @720p mode 60fps)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 io-mode=0 ! video/x-raw,width=1280,height=720,framerate=60/1 ! fpsdisplaysink videosink=glimagesink sync=false text-overlay=false -v</code>
 +
 +
* Preview (CS-MIPI-SC132 @1280*1080 mode 45fps)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 io-mode=0 ! video/x-raw,width=1280,height=1080,framerate=45/1 ! fpsdisplaysink videosink=glimagesink sync=false text-overlay=false -v</code>
 +
 +
* Preview (CS-MIPI-SC132 @1080*1280 mode 45fps)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 io-mode=0 ! video/x-raw,width=1280,height=1080,framerate=45/1 ! fpsdisplaysink videosink=glimagesink sync=false text-overlay=false -v</code>
 +
<br />
 
=== Build the drivers from source ===
 
=== Build the drivers from source ===
  

Navigation menu