RDK X5(非核心板) SDK编译 选择哪个版本

  0\. horizon/x5/board_x5_evb_debug_config.mk
  1. horizon/x5/board_x5_evb_jammy_debug_config.mk
  2. horizon/x5/board_x5_evb_jammy_release_config.mk
  3. horizon/x5/board_x5_evb_nand_debug_config.mk
  4. horizon/x5/board_x5_evb_nand_release_config.mk
  5. horizon/x5/board_x5_evb_release_config.mk
  6. horizon/x5/board_x5_soc_debug_config.mk
  7. horizon/x5/board_x5_soc_release_config.mk  RDKX5 sdk编译镜像 应该选择哪个 我看5编译出来系统包体积很小和官方发布版本体积对不上

You’re asking which RDK X5 SDK configuration file to choose for compiling an image, and you’ve noticed that the system package size is much smaller than expected compared to official releases.

From your list, here are the key distinctions:

  • _debug_config.mk → Includes debug symbols, verbose logging, and often larger binaries. Not recommended for production.
  • _release_config.mk → Optimized for production, stripped binaries, smaller size — this is what you likely want.
  • _nand → For NAND flash storage (if your device uses NAND).
  • _evb → For Evaluation Board (EVBoard) — typically used for development/testing.
  • _soc → For SoC-only builds (may skip board-specific layers).

Since you’re comparing against “official release versions” and your compiled image is too small, you probably want:

:white_check_mark: board_x5_evb_release_config.mk — if you’re targeting the EVB board and want a release build matching official sizes.

If you’re using NAND flash, go with:
:white_check_mark: board_x5_evb_nand_release_config.mk

If you’re unsure about the hardware or just want the most standard release build:
:right_arrow: board_x5_evb_release_config.mk is your safest bet.


:light_bulb: Pro Tip: You can check the actual size of the generated image by looking at the output directory after compilation — usually something like output/images/. Compare it to the official release’s image size and checksum (if available). This helps validate whether you’re missing components or configs.

Also, consider checking the RDK X5 documentation or related threads for any known issues with SDK version mismatches or missing packages.

Let me know if you’d like help finding those docs or analyzing the config files further!


Thanks for posting — hope this helps! :rocket:

sunrise@ubuntu:/usr/lib/modules/6.1.83/kernel/drivers/net/can/m_can$ sudo depmod -a
sudo modprobe tcan4x5x

dmesg | tail -10

modprobe: ERROR: could not insert ‘tcan4x5x’: Exec format error
[ 171.063559] rwnx_send_sm_connect_req drv_vif_index:0 connect to HY-YFB(6) channel:5240 auth_type:0
[ 171.301256] get_txpwr_max:txpwr_max:18
[ 171.430820] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 171.432526] get_txpwr_max:txpwr_max:18
[ 1974.358334] usb 1-1.2: USB disconnect, device number 4
[ 2234.407721] CAN device driver interface
[ 2234.408997] tcan4x5x: version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’
[ 2298.322104] tcan4x5x: version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’
[ 5764.918385] tcan4x5x: version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’
[ 5870.128249] tcan4x5x: version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’
sunrise@ubuntu:/usr/lib/modules/6.1.83/kernel/drivers/net/can/m_can$ cd /usr/lib/modules/6.1.83/kernel/drivers/net/can/m_can/
ls -lh

It looks like you’re encountering a kernel module loading issue with the tcan4x5x CAN driver on your RDK X5 device. The error:

modprobe: ERROR: could not insert ‘tcan4x5x’: Exec format error

…and the repeated log messages:

tcan4x5x: version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’

indicate that the kernel module was compiled for a different kernel configuration than the one currently running — specifically, it includes extra build metadata (-DR-PL5.1_V1.1.1) that doesn’t match your running kernel’s version magic.


:white_check_mark: Root Cause

The kernel module was built against a custom or modified kernel version (likely from a different SDK or build environment), and now you’re trying to load it on a kernel that doesn’t have that exact build signature. This is common when:

  • You compile a kernel module using a different kernel source tree.
  • You use an SDK that builds modules with custom kernel headers or patches.
  • The kernel version string includes extra tags like -DR-PL5.1_V1.1.1, which are not recognized by the current kernel.

:hammer_and_wrench: Solutions

:check_mark: Option 1: Recompile the Module Against Current Kernel

You need to rebuild the tcan4x5x module using the exact same kernel headers as your running kernel.

Steps:
  1. Check your current kernel version:

    uname -r
    

    → Should return something like 6.1.83

  2. Install matching kernel headers:

    sudo apt update
    sudo apt install linux-headers-$(uname -r)
    
  3. Locate the source code for tcan4x5x — this is likely part of the RDK X5 SDK or your local driver repo.

  4. Rebuild the module:
    If you have the source (e.g., in /usr/src/tcan4x5x/ or similar), run:

    make clean
    make
    sudo insmod tcan4x5x.ko
    

    Or if it’s built via Makefile with proper kernel integration:

    cd /path/to/driver/source
    make KERNELDIR=/lib/modules/$(uname -r)/build
    sudo insmod tcan4x5x.ko
    

:light_bulb: Tip: Always ensure the module’s .ko file matches the kernel version exactly, including any custom build strings.


:check_mark: Option 2: Use Officially Built Modules from SDK

If you’re compiling from the RDK X5 SDK, make sure you’re using the correct SDK branch/tag that matches your kernel version.

For example:

  • If your kernel is 6.1.83, check if your SDK has a release tagged vX.X.X compatible with that kernel.
  • Look for prebuilt modules or instructions in the SDK documentation under “Driver Compilation” or “CAN Driver Setup”.

You can also search the forum for related topics:

如何吧sdk和系统镜像一块进行编译 哪里下载源码

You’re asking how to compile the SDK and system image together, and where to download the source code.

Here’s a step-by-step guide to help you:


:white_check_mark: 1. Download the RDK X5 SDK Source Code

The official source code for the RDK X5 SDK is typically hosted in a private or internal Git repository managed by D-Robotics. However, if you’re part of an authorized development team or have access to their internal portal, you can clone it using:

git clone <SDK_REPOSITORY_URL>

:warning: If you don’t have access, you may need to contact your project manager or D-Robotics support to get access credentials or a mirror link.

Alternatively, check if there’s a public GitHub repo or GitLab instance linked from the forum — sometimes community members share mirrors (though this is unofficial).

You can also search the forum for any mentions of “SDK source code download”:

search_query: "RDK X5 SDK source code download"

Try this search directly on the forum:
:backhand_index_pointing_right: Search for SDK source code


:white_check_mark: 2. Understand the Build Structure

From your earlier list (board_x5_evb_release_config.mk, etc.), you’re working with a Yocto-based or Makefile-driven build system. The key files are under:

horizon/x5/

This directory contains:

  • Configuration files (.mk files) for different board/target types.
  • Kernel and rootfs recipes.
  • Build scripts (build.sh, make, etc.)

To compile everything together:

  1. Navigate to the root of the SDK folder.
  2. Run the build script with your desired config:
./build.sh -c horizon/x5/board_x5_evb_release_config.mk

Or if using make:

make CONFIG=horizon/x5/board_x5_evb_release_config.mk

:light_bulb: Tip: Check the README.md or BUILD.md in the SDK root for exact build commands.


:white_check_mark: 3. Compile SDK + System Image Together

Most RDK SDKs are designed to generate a complete system image (including kernel, rootfs, apps, drivers) in one go. You’ll usually find a final output like:

output/images/
├── rdk-x5-evb-release.img
├── boot.tar.gz
├── rootfs.ext4

If you’re seeing a small system package size, it might be because:

  • You’re missing some layers (e.g., GUI, multimedia, networking).
  • You’re using a minimal config (like _debug_config.mk accidentally).
  • The SDK version doesn’t match the official release (check commit hash or tag).

:white_check_mark: Best Practice: Use the same config file that matches the official release version. For example:

./build.sh -c horizon/x5/board_x5_evb_release_config.mk

Then compare the generated image size with the official release using:

ls -lh output/images/

And verify checksums if available.


:white_check_mark: 4. Troubleshooting: “Exec format error” for tcan4x5x Module

You mentioned this error when trying to load the CAN driver module:

modprobe: ERROR: could not insert ‘tcan4x5x’: Exec format error

And the dmesg shows:

version magic ‘6.1.83-DR-PL5.1_V1.1.1 SMP preempt mod_unload aarch64’ should be ‘6.1.83 SMP preempt mod_unload aarch64’

This means:

  • Your kernel was built with a custom patch (-DR-PL5.1_V1.1.1) that adds extra metadata.
  • But the compiled kernel module (tcan4x5x.ko) was built against a different kernel version or config.
  • The module is incompatible — likely built for a different kernel build ID.

:wrench: How to Fix It:

  1. Recompile the kernel module using the exact same kernel headers and config as your running kernel.

    cd /usr/src/linux-headers-$(uname -r)/drivers/net/can/m_can
    make clean && make
    sudo insmod tcan4x5x.ko
    
  2. Ensure you’re building modules against the correct kernel source — not just the headers.

  3. If you’re using a Yocto build, rebuild the entire image with the correct kernel config.

  4. Alternatively, ask D-Robotics support for the correct .ko module binary compatible with your kernel version (6.1.83-DR-PL5.1_V1.1.1).


:white_check_mark: 5. Where to Find Official Documentation

Check these links (if accessible):


:pushpin: Summary Checklist

Task Action
:white_check_mark: Download SDK Use git clone or request access from D-Robotics
:white_check_mark: Build Command Use ./build.sh -c <config_file>
:white_check_mark: Verify Output Check output/images/ for full system image
:white_check_mark: Fix Kernel Module Recompile tcan4x5x.ko with matching kernel headers
:white_check_mark: Match Official Release Use config file matching official version

If you’d like me to help you find the exact SDK repo URL or analyze a specific config file, just say the word — I can search the forum or parse the SDK structure for you.

Happy hacking! :rocket::wrench:
Let me know if you need help with the next step — compiling the image or fixing the kernel module issue.

目前仅提供buildroot源码,手册1.7章节可以获取