Usage of torizoncore-builder with new kernel modules

Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version: 0058 V1.1A
Kernel version: 5.15.148-6.8.0+git.8c5c2dcbf6ba #1-TorizonCore SMP PREEMPT Tue Aug 6 10:01:59 UTC 2024

Hello, we had a doubt were we try to use the torizoncore-builder.
We have the following folder tree and we can generate sucess images.
The problem is, when we try to change a driver in the linux folder (git repository from toradex-linux) is does not change anything in the final image.
For example, we change the driver sn65dsi83, which we use on our DSI display, but the driver was not compiled and was not used because we put some prints on the driver and they were not being printer, so the linux folder os not being compiled.
We also try to compile as a kernel module, but riverdi has told us the driver need to be compiled at the image instead of kernel module.
Can you help us how to use the linux folder? And what is it being used for in the torazoncore-builder?

Hi @peterz !

Before going into how to use TorizonCore Builder, I would like to understand your use case on why you need to modify adapt sn65dsi83. Could you please share more details?

Also, I see you are using an older BSP version compared to other information you previously shared. Did you feel the need to go back to an older release?

Best regards,

Hello @henrique.tx , in the past we try version 7.0.0 but it has some problem with the boot screen logo, so we revert to stable 6.8.0. Probably is fiex now but we dont update the image in the meantime.

Our current problem is that toradexcore-builder is not allowing us to recompile the kernel.
We need to modify a kernel driver, but we are unable to integrate it into the image.
We were supposed to achieve the same result by adding a kernel module, but the truth is that we cannot get the display to work with the new driver.
Without using toradexcore-builder, we recompiled kernel added to the Toradex Embedded Linux Reference Multimedia Image 6.8.1+build.15 , the display started working.

What you might be able to help us with is how we could recompile the kernel and add the recompiled modules to the image with TorizonOS, considering that the /lib/modules folder has a read-only protection.

Hi @peterz !

I do understand that this is the case.

But the thing is: it is not usual that a customer needs to customize this driver. Therefore I would like to better understand what issue you are trying to solve via driver customization.

Best regards,

The need to change the driver is due to our supplier. The company that supplies the display needed to add some delays in the driver in order to make it work properly during power up and power downs of the driver.
As mentioned before we were able to test that with the changed driver the display works properly. So now we need to add these changes to the kernel that toradexcore-builder uses so we can have this changes in our image as well.

Hi @tvasconcelos !

Thanks for the extra context.

Since you are using the sn65dsi83, you are using an LVDS display. For LVDS display, you could be using the native LVDS of Verdin iMX8MP (so you wouldn’t need the bridge).

But, if you want to keep using the DSI because it is a Verdin Family Standard interface (and native LVDS is not), it is ok: it is a step in the right direction in terms of using the same carrier board for different Verdin modules.

Regarding the need for the driver modification, that’s unfortunate, and the need to modify it is really unusual. Would you be ok to share the patch you are applying? We would like to take a look at it, since it might be something that should be improved on the driver itself (so, in the future, you might not need to modify the image yourself since the modification would be there already).

Now, about using TorizonCore Builder to add your modified driver.

As we can see from arm64.cfg « arm64 « cfg - linux-toradex-kconfig.git - Linux Toradex Kconfig, the driver for sn65dsi83 is compiled as module on Torizon OS 7 (as you might expect, I recommend you to update to this newer one).

On Torizon OS 6, we can check it here: toradex_defconfig « configs « arm64 « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

Therefore, you will need to blacklist the sn65dsi83 driver already available on the image. This section of this article can be helpful for this: https://developer.toradex.com/torizon/os-customization/use-cases/torizoncore-boot-time-optimization/#blacklisting-wifi-drivers-to-optimize-boot-time.

You can do it using the filesystem changes of TorizonCore Builder (e.g.: TorizonCore Builder Tool “build” command | Toradex Developer Center)

Then, to add your driver, you will need to use the kernel-modules of TorizonCore Builder to have your driver built and added to the image correctly. In this section of this article we have an example: https://developer.toradex.com/torizon/os-customization/torizoncore-builder-tool-build-command#example-building-kernel-modules

I know this might be too much to digest. If you guys hit any rocks, please let me know, and we can try to arrange a meeting to go through it together.

Best regards,

Hi @tvasconcelos and @peterz !

How is it going?

Did my previous message help you?

Were you able to do some progress?

Please let us know if we can do something to help you :slight_smile:

Best regards,

Hi @henrique.tx,

Sorry for the late reply. Yes as of now we found a way by rebuilding the base image from your repositories and add the driver change to the kernel and rebuild it using yocto.
It works for now.

Hi @tvasconcelos !

Thanks for the update.

I just marked your answer as the solution.

Best regards,