I’m working on AM62 and use my VM host Ubuntu lts 22.04 to build my custom image following the steps in the Toradex documentation.
I’m able to build my custom image and deploy it on my board. This image was lightly customized ( only splasch creen). I’m now trying to customize by adding the hello-mod kernel module but after a lot of trial, i’m still getting a compilation error.
I didn’t modified the kernel module, just got it from git and add it to the tcbuild.yaml file.
Please find in attachment the yaml and the result of the build command for kernel module fail .
Is it necessary to install gcc on my machine ?
By what is the module build if i don’t have the compiler installed on my machine ?
Is the compiler integrated into the docker that run the torizon-builder may be ?
I was able to reproduce this issue as well. What’s strange is that it works fine on other arm64 modules like Verdin i.MX8MP. Perhaps the am62 needs a slightly different build setup here. I’ll report this to our team to take a look at.
Is it necessary to install gcc on my machine ?
By what is the module build if i don’t have the compiler installed on my machine ?
Is the compiler integrated into the docker that run the torizon-builder may be ?
None of this is needed all the build tools and requirements should be handled internally by TorizonCore Builder.
The issue was reported to our development team who are currently taking a look into this. I don’t have any real timelines yet as the issue is till being analyzed, but I will let you know once there is news to share.
Does it mean that I should work with yocto project directly ?
By looking at the dts documentation, i had to checkout the linux folder.
When i go into the floder : linux/drivers/gpio/gpio-pca953x.c , i find one of the driver i need for my system. This GPIO expander is connected on my Som AM62 with the i2c bus.
As the kernel module compiler is not working for the moment , what will be the best method to enable this driver in my custom image ?
I tried this method ( build Torizon OS with Yocto ) but i get an error at the begining of the build:
I don’t know how far the AM62 has been checked with the online documentation but I hope to be able to quickly build something functionnal ( can be really problematic for our buisness case in short term).
When i go into the floder : linux/drivers/gpio/gpio-pca953x.c , i find one of the driver i need for my system. This GPIO expander is connected on my Som AM62 with the i2c bus.
Wait is this the driver/kernel module you’re trying to add to your system? I can see the kernel config corresponding to this driver is already enabled in our OS by default:
I still have two others to impement: Module Lora SX1302 for Lora Gateway, and DIO5661ST6 to control the backlight of my 7" Display.
I know that we need to set the # CONFIG linked to the kernel module we want to use, and specify “y” as " yes" to specify the kernel to load the module at boot. ‘m’ to let us mount the drive at run time . But what about if the module is not in the # CONFIG list , like it is the case for my backlight device for example ?
A part of that, have you understand why i’m not able to build the yocto because of the missing receipe ( or the wrong pointed by the linux-firmware .bb file ?
As for the module, i just followed the documentation step without modifications.
But what about if the module is not in the # CONFIG list , like it is the case for my backlight device for example ?
If the driver exists in the Linux Kernel then you can simply request us to add it to our OS by default set to “m”. If the driver does not exist in the Linux Kernel then you need to add it externally.
For these other 2 devices you listed, do you know where there drivers can be found?
A part of that, have you understand why i’m not able to build the yocto because of the missing receipe ( or the wrong pointed by the linux-firmware .bb file ?
After removing the .bb file, i was able to build the Yocto image… after 10hours of build !
Yeah doing Yocto builds from scratch can be quite time-consuming and compute intensive.
I guess i have to create a kernel module for it, right ?
Correct. If there is no driver for this hardware available in the Linux kernel then your only real option is to build it as an external kernel module and hope it works.
That said I do have good news. The team seems to have fixed the original issue with TorizonCore Builder. You should now be able to use it to build external kernel modules for AM62.
However, you need to use a very recently nightly image as your base image. The fix involved here required a change on the OS level. For reference I used the nightly image for February 2nd.
I get the same image than you, named :
torizon-core-docker-verdin-am62-Tezi_6.6.0-devel-20240203+build.501
Now let’s go on vscode or application layer It seems i have deployement issue with code 18 but i will open a new ticket thanks again for the reactivity of the support !