Issues in building Yocto image with BSP 7.4.0

Hi,

I’m trying to build a customized Yocto image based on tdx-reference-multimedia-image using BSP 7.4.0.

When compiling linux-toradex-6.6.101 I get the following error:

|   LD      .tmp_vmlinux.kallsyms1
| aarch64-tdx-linux-ld.bfd: Unexpected GOT/PLT entries detected!
| aarch64-tdx-linux-ld.bfd: Unexpected run-time procedure linkages detected!
| aarch64-tdx-linux-ld.bfd: drivers/net/ethernet/freescale/enetc/enetc_ethtool.o: in function `enetc_get_ts_info':
| enetc_ethtool.c:(.text+0x4b8): undefined reference to `netc_timer_get_phc_index'
| make[2]: *** [/srv/ssd/yocto_imx8p_lts/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source/scripts/Makefile.vmlinux:37: vmlinux] Error 1
| make[1]: *** [/srv/ssd/yocto_imx8p_lts/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source/Makefile:1172: vmlinux] Error 2
| make: *** [/srv/ssd/yocto_imx8p_lts/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source/Makefile:234: __sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/srv/ssd/yocto_imx8p_lts/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bb:do_compile) failed with exit code '1'

The image was building successfully with BSP 7.1.0.

BR,

Diego

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’ll help you troubleshoot this Yocto build issue. This appears to be a kernel compilation error related to the ENETC Ethernet driver and missing symbol references.

Understanding the Error

The error indicates that the kernel linker cannot find the netc_timer_get_phc_index function that’s being referenced by the ENETC Ethernet driver (1). This type of issue typically occurs when:

  1. Kernel configuration changes between BSP versions
  2. Missing or incompatible kernel modules
  3. Dependency issues in the kernel build system

Troubleshooting Steps

1. Clean and Rebuild

First, try cleaning the kernel build and rebuilding (1):

$ bitbake -c clean linux-toradex
$ bitbake linux-toradex

(1)

2. Check Your Configuration

Verify your conf/local.conf settings match the requirements for BSP 7.4.0 (1):

MACHINE ?= "verdin-imx8mp"
ACCEPT_FSL_EULA = "1"

(1)

3. Repository Sync

Ensure all repositories are properly synchronized for BSP 7.4.0 (1):

$ repo init -u git://git.toradex.com/toradex-manifest.git -b refs/tags/7.4.0 -m tdxref/default.xml
$ repo sync

(1)

4. Build Environment Reset

If the issue persists, try setting up a fresh build environment (1):

$ . export

(1)

Additional Considerations

Based on the community forum discussion, similar kernel compilation issues have been resolved by (2):

  • Ensuring all build dependencies are properly installed
  • Checking for transient network connectivity issues during the build
  • Verifying sufficient system resources (RAM and disk space)

The fact that this worked with BSP 7.1.0 but fails with BSP 7.4.0 suggests there may be kernel configuration differences between these versions that affect the ENETC driver compilation.

If the clean rebuild doesn’t resolve the issue, you may need to examine the specific kernel configuration differences between BSP versions or consider whether your customizations are compatible with the newer BSP version.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Having already tried all of the suggestions but this one, I’ve regenerated custom kernel config based from the one present at JFrog

I’ll post results as soon as the build process finishes.

D.

Excellent Approach!

That’s a very methodical approach to resolving the kernel compilation issue. Using the official kernel-config file from the Toradex Artifact Repository is exactly the right strategy for ensuring compatibility between BSP versions (1).

The path you’re using is correct for BSP 7.x.y with the verdin-imx8mp machine and tdx-reference-multimedia-image. According to the documentation, the kernel configuration process involves:

  1. Downloading the correct kernel-config file from the artifact repository at the specific build location (1)
  2. Copying it to your kernel source directory and renaming it to .config (1)
  3. Applying the configurations with make olddefconfig (1)

This approach should resolve the netc_timer_get_phc_index undefined reference error you encountered, as the official kernel configuration will include all the necessary dependencies and symbols required for the ENETC Ethernet driver in BSP 7.4.0.

Next Steps

Once your build completes successfully, you’ll have confirmed that the kernel configuration differences between BSP 7.1.0 and 7.4.0 were indeed the root cause. If you need to customize the kernel configuration further, you can then use make menuconfig to modify specific options while maintaining the base compatibility (1).

Looking forward to hearing about your build results!

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.