I’m trying to install a custom display driver for my Yocto Image Layer Build. The manufacturer provide me with the Makefile and the sources/headers files needed. I’m did follow the custom meta layer
I added the MACHINE_EXTRA_RDEPENDS += “kernel-module-display” under the verdin-imx8mm.conf
located on oe-core/layers/meta-toradex-nxp/conf/machine right below MACHINE_FEATURES:
ERROR: display-ilitek-mod-1.0+git${SRCPV}-r0 do_populate_lic: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_hardcode_path(d)
0003:
File: '/home/ruben/oe-core/build/../layers/openembedded-core/meta/classes/sstate.bbclass', lineno: 634, function: sstate_hardcode_path
0630: bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
0631: subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
0632:
0633: # If the fixmefn is empty, remove it..
*** 0634: if os.stat(fixmefn).st_size == 0:
0635: os.remove(fixmefn)
0636: else:
0637: bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
0638: subprocess.check_output(sstate_filelist_relative_cmd, shell=True)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/display-ilitek-mod/1.0+git${SRCPV}-r0/sstate-build-populate_lic/fixmepath'
ERROR: Logfile of failure stored in: /home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/display-ilitek-mod/1.0+git${SRCPV}-r0/temp/log.do_populate_lic.21108
ERROR: Task (/home/ruben/oe-core/build/../layers/meta-noveldx/recipes-kernel/display-ilitek/display-ilitek-mod_1.0.bb:do_populate_lic) failed with exit code '1'
ERROR: display-ilitek-mod-1.0+git${SRCPV}-r0 do_deploy_source_date_epoch: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_hardcode_path(d)
0003:
File: '/home/ruben/oe-core/build/../layers/openembedded-core/meta/classes/sstate.bbclass', lineno: 634, function: sstate_hardcode_path
0630: bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
0631: subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
0632:
0633: # If the fixmefn is empty, remove it..
*** 0634: if os.stat(fixmefn).st_size == 0:
0635: os.remove(fixmefn)
0636: else:
0637: bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
0638: subprocess.check_output(sstate_filelist_relative_cmd, shell=True)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/display-ilitek-mod/1.0+git${SRCPV}-r0/sstate-build-deploy_source_date_epoch/fixmepath'
ERROR: Logfile of failure stored in: /home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/display-ilitek-mod/1.0+git${SRCPV}-r0/temp/log.do_deploy_source_date_epoch.21109
ERROR: Task (/home/ruben/oe-core/build/../layers/meta-noveldx/recipes-kernel/display-ilitek/display-ilitek-mod_1.0.bb:do_deploy_source_date_epoch) failed with exit code '1'
I already tried to clean the image and nothing. I’m attaching my .bb and makefile file, the git link is public also . If someone can help me out here. Thank you so much!
Unfortunately it’s not very obvious what the issue here is. The initial clue is that the particular task that fails is do_populate_lic, which is related to the licensing of your bb recipe. However, I don’t see any issues in your bb file. You have LIC_FILES_CHKSUM commented out, but this should be okay since your LICENSE is “CLOSED”.
I know sometimes cleaning the image doesn’t actually clean everything like you would think. Perhaps try this, create a completely brand new build, add your custom recipe/layer to this build and then try to build it all from scratch. That way you guarantee it’s truly a “clean” build and there’s nothing being cached from previous builds that may affect things.
Thanks for the answer, if I clone the toradex linux kernel (toradex-linux) and add the files on the kernel, I will be able to achieve the same result? Will it execute the Makefile inside the directory that I copy and paste the driver files (in this case is the touchscreen controller driver: drivers/input/touchscreen)?
I don’t see a reason why that wouldn’t work. But then you’d have to integrate your driver into the kernel source carefully. Also you’d then have to maintain a fork of linux-toradex with your integration going forward.
In that case you need to change the SRC_URI and the SRCREV within the bbappend file.
As my bbappend file attached I keep getting this error
Log data follows:
| DEBUG: Executing shell function do_kernel_checkout
| ERROR: S is not set to the linux source directory. Check
| ERROR: the recipe and set S to the proper extracted subdirectory
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.161+git${SRCPV}-r0/temp/run.do_kernel_checkout.228932' failed with exit code 1
Can you help me out on this issue? Below is my bbappend file attached.
Thanks for that input, after I fixed the URI repo it started fetching. But the I run on another problem, the build wasn’t able to compile the new Kernel. The kernel was downloaded from the Toradex repo following the steps of Building Kernel and then I add the Driver folder and pushed to my repo and during the build give some errors when compile. I’m attaching the log file.
Did you test if this customized kernel of yours compile on it’s own outside of Yocto?
Also be advised the support we can provide for customized kernels is limited. We provide a base Linux kernel that is tested and known to work as is. Once you make any changes or customization to our Linux kernel any guarantees we provide are no longer valid. As I said before:
you’d then have to maintain a fork of linux-toradex with your integration going forward.
Looking at your logs however, the error seems pretty clear:
/home/ruben/oe-core/build/tmp/work-shared/verdin-imx8mm/kernel-source/scripts/dtc/include-prefixes/dt-bindings/input/input.h:13:10: fatal error: linux-event-codes.h: No such file or directory
13 | #include "linux-event-codes.h"
I would suggest by looking at this file in your custom Linux kernel and begin investigating what’s wrong.
Seeing as you got this error, it probably means you were trying to compile our Linux Kernel for x86 instead of arm64. Which is the architecture our modules use.
You probably missed a step in that article about configuring the toolchain correctly.
Sorry for the late reply, I had some trouble to pull my kernel to GIT, do Toradex does somethins especial with the syslink file? Because those weren’t going to my GIT and then I wasn’t able to build the image.
What do you mean by “special”? Our kernel source does include symlinks but so does the standard linux kernel source. So I wouldn’t call what we’re doing “special”.
Sorry if it sounded rude but what I meant with “something special” was how did Toradex pushed the Kernel symlink files to the Git because I wasn’t able to do that. I had to remove the links manually and create static files in order to push my Kernel to the Git.
We don’t do anything special, Git should be able to just store and push symlinks as is. You can find many examples of this in other projects on Github. Have you tried researching your issue? Perhaps it’s not related to symlinks at all.
The problem was the symlinks, all the errors that I was getting in the Yocto build was fixed after I made the symlinks static. I look into some issue that people had with pushing symlink to Git but the only solution that worked for me was creating the static files instead of symlink file.
So our Linux Kernel repo has symlinks in it. The main Linux Kernel repo has symlinks in it. Both these git repos work just fine with symlinks. But you’re claiming that you can’t push symlinks to your Linux Kernel repo? You can see why I’m finding this strange.
Also you haven’t shared the exact error message you get when trying to push symlinks.
When I clone Toradex Linux Kernel or the main Linux Kernel I’m able to compile it and its modules. The problem starts when I try to push it, I can push all the files for the ones inside the symlink folder, as the image I’m attaching:
Well yes that error in Yocto is because your repo does not have the symlinks that were there originally and now the filepaths that depended on these symlinks got broken.
What I’m asking is what prevents you to just git push the repo with the symlinks as is. Just doing a simple git push on my side was all it took. Is the Git client you’re using in that picture preventing this?
Cause using git push from the command line has no issues handling the symlinks.
Sorry for the delay. I tried push it by command lines and I get the same issue, even if I commit and push. The git keeps warning me that is files to be pushed.
The git keeps warning me that is files to be pushed.
I’m not sure what you mean by this. Could you just copy and paste this warning that git is giving you, exactly as the message is given.
Why don’t you try debugging this step by step.
Step 1: Clone our linux-toradex repo
Are the present when you clone it?
Step 2: Push the linux-toradex repo to your new repo location. Make no changes do not commit anything, just push it as is to the new repo location.
After pushing does the repo still contain symlinks?
If this still doesn’t work then your Git is obviously configured differently somehow, and you’ll need to figure this out on your own. As I’ve said many times and have tested myself default Git can handle and push symlinks just fine.