Make Scripts kernel 6.6.0

Hi all,

I’m currently working with am62 and utilizing a PC running Ubuntu 22.04. I’m trying to perform cross-compilation on am62, and for that, I need the kernel. So, I followed instructions on how to create a Yocto environment using the following link: Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center. In my local.conf file, I added “kernel-devsrc,” and after compiling everything, I used the script located at /build/deploy/sdk (./tdx-xwayland-glibc-x86_64-Reference-Minimal-Image-aarch64-verdin-am62-toolchain-6.6.0.sh).

After completing these steps, I have a folder at /opt/tdx-xwayland/6.6.0/sysroots/aarch64-tdx-linux/usr/src/kernel. When I run ‘make scripts’ in this directory after I sourced it with the command ‘. /opt/tdx-xwayland/6.6.0/environment-setup-aarch64-tdx-linux’, I encounter the following error:

In file included from scripts/sorttable.c:201:
scripts/sorttable.h:96:10: fatal error: asm/orc_types.h: No such file or directory
   96 | #include <asm/orc_types.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:111: scripts/sorttable] Error 1
make: *** [Makefile:1273: scripts] Error 2

How can I resolve this issue and make the ‘make’ command work?

Thank you in advance.

M. MALLET.

Hello @Phos,

Welcome to the Toradex Community!

Can you give me some more background on what you want to achieve by building such scripts?
Are you trying to build a kernel module? Or does your application require the source code of the kernel to be available?

In case you are trying to build an out-of-tree kernel module, we have a guide on how to do this via a Yocto recipe.


After completing these steps, I have a folder at /opt/tdx-xwayland/6.6.0/sysroots/aarch64-tdx-linux/usr/src/kernel. When I run ‘make scripts’ in this directory after I sourced it with the command ‘. /opt/tdx-xwayland/6.6.0/environment-setup-aarch64-tdx-linux’, I encounter the following error:

I cannot reproduce the issue you reported here.
How did you add kernel-devsrc to your local.conf file?

Best Regards,
Bruno

Hello, thank you for your response.

I’m attempting to compile a binary (v4l2loopback) for the am62 out of tree, and for that, I need the kernel sources. Here’s how I integrated “kernel-devsrc” into the local.conf file:

TOOLCHAIN_TARGET_TASK:append = " kernel-devsrc"

I simply added it at the end of the file with the "ACCEPT_FSL_EULA = “1"” and
“LICENSE_FLAGS_ACCEPTED=“commercial””

I’ll try with the recipe method.

Best Regards,

M. MALLET

Hello @Phos,

Thanks for the further context.
The recipe should be the way to go in this case.
Please let me know if it works for you.

Just a note: Using ACCEPT_FSL_EULA = "1" has no effect for the Verdin AM62, only for modules using an NXP SoC.

Best Regards,
Bruno