Compiling Yocto on the i.MX8M including TC358743 drivers

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

Compiling Yocto on the i.MX8M including TC358743 drivers

1,231 Views
jgrider
Contributor II

Hello, I am a bit new to recompiling Linux so bare with me on this.

I have a Solidrun i.MX8M Plus SOM (on a HummingBoard Pulse SBC) and a geekworm C779 HDMI to CSI-2 Module (Toshiba TC358743XBG chip)

https://www.solid-run.com/embedded-industrial-iot/nxp-i-mx8-family/hummingboard-m/#pulse

https://wiki.geekworm.com/C779

All I'm trying to do right now is make the CSI input coming from the HDMI to CSI module display on the screen (HDMI output)

Solidrun already has board support packages for Yocto and Debian (and a few others).  

https://github.com/SolidRun/meta-solidrun-arm-imx8/tree/hardknott-imx8mp

I am currently headed down the Yocto path, trying to use the current board support package that is provided for this dev board.  I have already tested the precompiled binaries for this board, they work.  However, they do not include support for the  Toshiba TC358743XBG chip.

This leads into my 2 problems:

1. I cannot compile Yocto given Solidrun's instructions without it failing.

2. I'm unsure about the device tree modification to get this device supported on my build

 

1. Compiling Yocto

I followed all of Solidrun's instructions above and continue to get the compiling error.  

ERROR: qtdeclarative-5.15.2+gitAUTOINC+104eae5b17-r0 do_fetch: Fetcher failure: Unable to find revision 104eae5b17b0ec700391e9539ee3a4f638588194 in branch 5.15.2 even from upstream

I found this forum post describing the same issue, however there was no clear solution listed.

https://community.nxp.com/t5/i-MX-Processors/7ulp-imx-yocto-L5-10-52-2-1-0-build/m-p/1568785#M198656

2. Modifying the Device Tree

From what I have gathered,  the way that bitbake (the compiler that I was instructed to use in Solidrun's docs) works, is that you make a patch file, that is effectively a diff between the kernel source and your target code.  If this is correct, I believe that I have to make a .patch file that includes the modifications to the device tree and save it into the one of the build directories that contain patches (not sure if I need to do more here).

https://community.nxp.com/t5/i-MX-Processors/imx8mm-mipi-csi-capture-with-tc358743-hdmi-gt-mipi-not-...

I did find this post where someone seems to have modified the device tree as to enable the TC358743 using the pre-existing drivers included in the 5.10.x kernel.  Do I simply need to make a patch file that describes the addition of these lines to the device tree file?  Is there something else going on here I need to know about?

Bringing it back to a high level

Does all of this make sense for what I am trying to do?  If I am making extra work for myself by taking this approach, please let me know.  If you know of a more foolproof way, please let me know.  Thank you for your assistance.

0 Kudos
5 Replies

1,162 Views
jgrider
Contributor II

I was able to resolve the two issues that I mentioned in the original post.  Quoting my follow up post.

For question #1

I ended up using this post to solve the issue

https://community.nxp.com/t5/i-MX-Processors/7ulp-imx-yocto-L5-10-52-2-1-0-build/td-p/1568785

I'm still running into compiler errors, just have to google them each time or sometimes retrying the compiling works.  It is taking me over a week to finish this compilation.

For question #2.

I ended up following the post you provided

https://community.nxp.com/t5/i-MX-Processors/YOCTO-how-to-add-own-driver-to-the-Linux-and-build-it/m...

Using this command to enable the TC358743 in the menuconfig

bitbake virtual/kernel -c menuconfig

 However, I am still confused about how to use this CSI input + TC358743 as a video input.

There is a tutorial for this specific dev board and a specific mfg supported camera.

https://solidrun.atlassian.net/wiki/spaces/developer/pages/315588609/HummingBoard+Pulse+i.MX8M+Plus+...

There is also a tutorial for the TC358743 board connecting to a Raspberry-Pi.

https://wiki.geekworm.com/C779-Software

This is where I am getting stuck. I am not sure if simply including TC358743 drivers are sufficient to get the HDMI to CSI converter working. There are several steps in the Geekworm instructions that I know need to be executed to configure the EDID data these are outlined in the Geekworm instructions.

Do I have to specify the I2C port that the TC358743 is connected to? I2C2/I2C3 I don’t know how the kernel would know which one to use in this case.

Which video device should I be using? What would it be called when I run v4l2-ctl --list-devices what should I be expecting? It seems that the video devices listed are the same after I recompiled Yocto with the TC358743 drivers enabled.

Any guidance on this would be appreciated. 

Side note

I have make all of the electrical connections to connect these two, not easy but I made it happen.  

Tags (1)
0 Kudos

1,222 Views
khang_letruong
Senior Contributor III

HI @jgrider,

From https://community.nxp.com/t5/i-MX-Processors/7ulp-imx-yocto-L5-10-52-2-1-0-build/m-p/1568785#M198656, the solution for question 1 would be :

 

Check if you can download it by "git clone git://code.qt.io/qt/qtbase.git"

 Check if one can manually clone the repository using git protocol : git clone git://code.qt.io/qt/qtbase.git

If not, you need to fix the network security, or change the git protocol to https accordingly.

If not, try with https : git clone https://code.qt.io/qt/qtbase.git

For question 2 about re-compiling kernel with custom modificationm you can take a look at the following discussion : https://community.nxp.com/t5/i-MX-Processors/YOCTO-how-to-add-own-driver-to-the-Linux-and-build-it/m...

Regards,
K

1,215 Views
jgrider
Contributor II

Thank you for the fast reply.

1. Git clone for qtbase seems to work no problem.

 

 git clone https://code.qt.io/qt/qtbase.git
Cloning into 'qtbase'...
remote: Counting objects: 853382, done.
remote: Compressing objects: 100% (158134/158134), done.
remote: Total 853382 (delta 697093), reused 840969 (delta 686390)
Receiving objects: 100% (853382/853382), 318.70 MiB | 9.17 MiB/s, done.
Resolving deltas: 100% (697093/697093), done.
Checking out files: 100% (21522/21522), done.

 

 Is there some other problem that I might be running into here?

Should I try the solution outlined in the following post?

https://community.nxp.com/t5/i-MX-Processors/7ulp-imx-yocto-L5-10-52-2-1-0-build/m-p/1569078/highlig...

2. I will look into this.  It seems like it's what I am trying to do.

0 Kudos

1,213 Views
khang_letruong
Senior Contributor III

Hi @jgrider ,

I would suggest to re-fetch and re-compile the qtdeclarative package to make sure that was it not a momentaneous issue of the network connection. In your Yocto environment, you can try : 

bitbake qtdeclarative -c cleanall

bitbake qtdeclarative -c compile

 

Regards,
Khang

 

1,179 Views
jgrider
Contributor II

Thank you @khang_letruong , you have been very helpful.  

For question #1

I ended up using this post to solve the issue

https://community.nxp.com/t5/i-MX-Processors/7ulp-imx-yocto-L5-10-52-2-1-0-build/td-p/1568785

I'm still running into compiler errors, just have to google them each time or sometimes retrying the compiling works.  It is taking me over a week to finish this compilation.

For question #2.

I ended up following the post you provided

https://community.nxp.com/t5/i-MX-Processors/YOCTO-how-to-add-own-driver-to-the-Linux-and-build-it/m...

Using this command to enable the TC358743 in the menuconfig

bitbake virtual/kernel -c menuconfig

 

I have not yet been able to finish the compilation, I am still continuously working though compilation errors as they come up.  I will let you know when the compilation has finished and if these drivers have been successfully included.

0 Kudos