TDA4AL-Q1: [TDA4] IPC rpmsg_client_sample.ko can't run

Part Number: TDA4AL-Q1
Other Parts Discussed in Thread: BQ25890, CSD, TPS51632, LP3944, DP83869, TPS65912, BQ24190, ADS7950, CDCE925, LM95241, AFE4404, ADC161S626, SN65DSI83, LM95245, ADS7846, ADC108S102, TMAG5273, ADS1100, TMP117, LP8727, INA238, TMP006, LM63, LMP91000, AMC6821, TLC4541, LM93, LMK04832, LM3697, TUSB320, TPD12S015, LM8333, ADS8688, DAC5571, HDC2010, TMP401, TMP464, TPS65219, TPS65218, SN65DSI86, DAC7612, TPS65217, ADS131E08, DRV2665, DRV2667, TMP513, DAC082S085, ADS7828, TUSB1210, TPS65010, LP3972, LP3971, LM8323, ADC128S052, BQ24257, LM3642, TPS23861, ADS1015, TCA6507, INA3221, LM83, TPS62360, LM80, LM87, DAC7311, TPS65086, DAC124S085, DP83TC811, TPS65023, LP3943, LM95234, HD3SS3220, TFP410, SYSCONFIG, TSC2004, TSC2005, OPT3001, TSC2007, LM77, LM70, LM73, LM3530, INA209, ADS8344, PCF8574, ADC084S021, ADS7871, TSC2046, ADS7924, LM3532, LM3533, BQ24735, OPT4001, TCA8418, PMP, DLPC3433, CDCE706, AFE4403, TMP102, TMP103, ADC128D818, ADS124S08, TMP421, TMP007, TMP108, TPIC2810, LM3560, BQ25980, TPS65132, LMP92064, LM92, TCA6416, LM90

Tool/software:

Hi:

     My SDK version is 10.01.00.04

     I want to run the kernel driver test IPC with rpmsg_client_sample.

     I can saw the rpmsg_client_sample.ko at /lib/modules/6.6.32-ti-gc41847bf00f4-dirty/kernel/samples/rpmsg

     Reference 3.5. IPC for J721S2 — Processor SDK Linux for J721s2 Documentation to run the test driver

     cmd "modprobe rpmsg_client_sample count=10". And then dmesg to check kernel log. I didn't find any rpmsg_client_sample log.

     Could you please help check what did I wrong?

rpmsg_client_sample virtio1.ti.ipc4.ping-pong.-1.13

root@j721s2-evm:/lib/modules/6.6.32-ti-gc41847bf00f4-dirty/kernel/samples/rpmsg# ls -al
drwxr-xr-x 2 root root 4096 Mar 9 2018 .
drwxr-xr-x 3 root root 4096 Mar 9 2018 ..
-rw-r--r-- 1 root root 9024 Mar 9 2018 rpmsg_client_sample.ko
root@j721s2-evm:/lib/modules/6.6.32-ti-gc41847bf00f4-dirty/kernel/samples/rpmsg#

kernel config dump from /proc/config.gz

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[2025-03-14 23:56:55.916]
[2025-03-14 23:56:55.932] root@j721s2-evm:/mnt# zcat /proc/config.gz
[2025-03-14 23:56:59.321] #
[2025-03-14 23:56:59.321] # Automatically generated file; DO NOT EDIT.
[2025-03-14 23:56:59.321] # Linux/arm64 6.6.32 Kernel Configuration
[2025-03-14 23:56:59.321] #
[2025-03-14 23:56:59.321] CONFIG_CC_VERSION_TEXT="aarch64-oe-linux-gcc (GCC) 13.3.0"
[2025-03-14 23:56:59.321] CONFIG_CC_IS_GCC=y
[2025-03-14 23:56:59.321] CONFIG_GCC_VERSION=130300
[2025-03-14 23:56:59.321] CONFIG_CLANG_VERSION=0
[2025-03-14 23:56:59.321] CONFIG_AS_IS_GNU=y
[2025-03-14 23:56:59.321] CONFIG_AS_VERSION=24200
[2025-03-14 23:56:59.321] CONFIG_LD_IS_BFD=y
[2025-03-14 23:56:59.321] CONFIG_LD_VERSION=24200
[2025-03-14 23:56:59.321] CONFIG_LLD_VERSION=0
[2025-03-14 23:56:59.321] CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
[2025-03-14 23:56:59.321] CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
[2025-03-14 23:56:59.321] CONFIG_CC_HAS_ASM_INLINE=y
[2025-03-14 23:56:59.321] CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
[2025-03-14 23:56:59.321] CONFIG_PAHOLE_VERSION=0
[2025-03-14 23:56:59.321] CONFIG_IRQ_WORK=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi:

        Below show what I enable kernel config for RPMSG part. Search from /proc/config.gz

     2400: [2025-03-14 23:57:04.874] # CONFIG_RPMSG_WWAN_CTRL is not set
     2690: [2025-03-14 23:57:05.552] # CONFIG_RPMSG_TTY is not set
     5070: [2025-03-14 23:57:11.370] # Rpmsg drivers
     5072: [2025-03-14 23:57:11.370] CONFIG_RPMSG=y
     5073: [2025-03-14 23:57:11.370] CONFIG_RPMSG_CHAR=m
     5074: [2025-03-14 23:57:11.370] CONFIG_RPMSG_CTRL=m
     5075: [2025-03-14 23:57:11.370] CONFIG_RPMSG_NS=y
     5076: [2025-03-14 23:57:11.370] # CONFIG_RPMSG_QCOM_GLINK_RPM is not set
     5077: [2025-03-14 23:57:11.370] CONFIG_RPMSG_VIRTIO=y
     5078: [2025-03-14 23:57:11.370] CONFIG_RPMSG_PRU=m
     5079: [2025-03-14 23:57:11.370] # end of Rpmsg drivers
     6824: [2025-03-14 23:57:15.183] CONFIG_SAMPLE_RPMSG_CLIENT=m

  • Hello,

    what are your executable  loaded on the R5F cores? 

    Regards

    Tarun MUkesh

  • Hi Tarun MUkesh:

          In the MCU R5F, I use the ipc_echo_testb_mcu1_0_release_strip.xer5f DM firmware. It's include in tispl.bin

          And the other R5F code, I have change the /lib/firmware link to ipc firmware!

  • Hello,

    Can you have a look into the thread

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1316701/dra829v-ipc-echo-test-no-output-in-dmesg

    It is very similar to what you face now.

    Regards

    Tarun Mukesh

  • Hi Tarun Mukesh:

          To enable the rpmsg_client_sample.ko, I add below config in kernel/configs/ti_arm64_prune.config. And clean build all image.

          Below I check have been include kernel module at /lib/modules/6.6.44-ti-g4fcbbad8357c-dirty/kernel/samples/rpmsg and /lib/modules/6.6.44-ti-g4fcbbad8357c-dirty/kernel/drivers/rpmsg. But I stil can't see any logs when I run the rpmsg_client_sample.

    +CONFIG_SAMPLES=y
    +CONFIG_SAMPLE_RPMSG_CLIENT=m
    +CONFIG_RPMSG_NS=m
    +CONFIG_RPMSG_VIRTIO=m
    +CONFIG_RPMSG=m

    modprobe rpmsg_client_sample count=1000

    dmesg -w| grep rpmsg

    [ 1083.079130] rpmsg_client_sample unusing rpmsg_core
    [ 1132.835185] Core section allocation order for rpmsg_client_sample:
    [ 1132.835220] Init section allocation order for rpmsg_client_sample:
    [ 1132.835262] Final section addresses for rpmsg_client_sample:
    [ 1132.835380] rpmsg_client_sample does not use rpmsg_core!
    [ 1132.835383] Allocating new usage for rpmsg_client_sample.
    [ 1132.835479] doing rpmsg_client_sample, parsing ARGS: 'count=1000'
    [ 1132.835518] kobject: 'rpmsg_client_sample' (00000000cfc5d417): kobject_add_internal: parent: 'module', set: 'module'
    [ 1132.835535] kobject: 'holders' (000000005fe44684): kobject_add_internal: parent: 'rpmsg_client_sample', set: '<NULL>'
    [ 1132.835586] kobject: 'notes' (00000000a47487a1): kobject_add_internal: parent: 'rpmsg_client_sample', set: '<NULL>'
    [ 1132.835619] bus: 'rpmsg': add driver rpmsg_client_sample
    [ 1132.835623] kobject: 'rpmsg_client_sample' (00000000be67266c): kobject_add_internal: parent: 'drivers', set: 'drivers'
    [ 1132.835658] kobject: 'drivers' (00000000c4e06a6b): kobject_add_internal: parent: 'rpmsg_client_sample', set: '<NULL>'
    [ 1132.835670] kobject: 'rpmsg_client_sample' (00000000be67266c): kobject_uevent_env
    [ 1132.835675] kobject: 'rpmsg_client_sample' (00000000be67266c): fill_kobj_path: path = '/bus/rpmsg/drivers/rpmsg_client_sample'
    [ 1132.835721] kobject: 'rpmsg_client_sample' (00000000cfc5d417): kobject_uevent_env
    [ 1132.835726] kobject: 'rpmsg_client_sample' (00000000cfc5d417): fill_kobj_path: path = '/module/rpmsg_client_sample'

    root@j721s2-evm:/lib/modules/6.6.44-ti-g4fcbbad8357c-dirty/kernel/samples/rpmsg# ls -al
    drwxr-xr-x 2 root root 4096 Mar 9 2018 .
    drwxr-xr-x 3 root root 4096 Mar 9 2018 ..
    -rw-r--r-- 1 root root 7992 Mar 9 2018 rpmsg_client_sample.ko

    root@j721s2-evm:/lib/modules/6.6.44-ti-g4fcbbad8357c-dirty/kernel/drivers/rpmsg# ls -al
    drwxr-xr-x 2 root root 4096 Mar 9 2018 .
    drwxr-xr-x 54 root root 4096 Mar 9 2018 ..
    -rw-r--r-- 1 root root 18352 Mar 9 2018 rpmsg_char.ko
    -rw-r--r-- 1 root root 23720 Mar 9 2018 rpmsg_core.ko
    -rw-r--r-- 1 root root 10872 Mar 9 2018 rpmsg_ctrl.ko
    -rw-r--r-- 1 root root 8512 Mar 9 2018 rpmsg_ns.ko
    -rw-r--r-- 1 root root 14184 Mar 9 2018 rpmsg_pru.ko
    -rw-r--r-- 1 root root 21848 Mar 9 2018 virtio_rpmsg_bus.ko

    root@j721s2-evm:/# cd /lib/firmware/
    root@j721s2-evm:/lib/firmware# ls -al
    drwxr-xr-x 8 root root 4096 Oct 9 15:30 .
    drwxr-xr-x 68 root root 57344 Mar 9 2018 ..
    -rw-r--r-- 1 root root 2040 Mar 9 2018 LICENCE.ibt_firmware
    -rw-r--r-- 1 root root 2046 Mar 9 2018 LICENCE.iwlwifi_firmware
    -rw-r--r-- 1 root root 486800 Mar 9 2018 bl32.bin
    -rw-r--r-- 1 root root 4479904 Mar 9 2018 bl32.elf
    drwxr-xr-x 2 root root 4096 Mar 9 2018 cadence
    drwxr-xr-x 2 root root 4096 Mar 9 2018 cnm
    drwxr-xr-x 2 root root 4096 Mar 9 2018 intel
    -rw-r--r-- 1 root root 918268 Mar 9 2018 iwlwifi-3160-17.ucode
    -rw-r--r-- 1 root root 2448976 Mar 9 2018 iwlwifi-8000C-34.ucode
    -rw-r--r-- 1 root root 2428004 Mar 9 2018 iwlwifi-8000C-36.ucode
    -rw-r--r-- 1 root root 2440780 Mar 9 2018 iwlwifi-8265-34.ucode
    -rw-r--r-- 1 root root 2436632 Mar 9 2018 iwlwifi-8265-36.ucode
    -rw-r--r-- 1 root root 2678092 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-34.ucode
    -rw-r--r-- 1 root root 2521412 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-38.ucode
    -rw-r--r-- 1 root root 1490508 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-46.ucode
    lrwxrwxrwx 1 root root 66 Oct 9 15:30 j721s2-c71_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_1_release_strip.xe71
    lrwxrwxrwx 1 root root 73 Oct 9 15:30 j721s2-c71_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_1_release_strip.xe71.signed
    lrwxrwxrwx 1 root root 66 Oct 9 15:30 j721s2-c71_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_2_release_strip.xe71
    lrwxrwxrwx 1 root root 73 Oct 9 15:30 j721s2-c71_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_2_release_strip.xe71.signed
    lrwxrwxrwx 1 root root 68 Oct 9 15:30 j721s2-main-r5f0_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_0_release_strip.xer5f
    lrwxrwxrwx 1 root root 75 Oct 9 15:30 j721s2-main-r5f0_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_0_release_strip.xer5f.signed
    lrwxrwxrwx 1 root root 68 Oct 9 15:30 j721s2-main-r5f0_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_1_release_strip.xer5f
    lrwxrwxrwx 1 root root 75 Oct 9 15:30 j721s2-main-r5f0_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_1_release_strip.xer5f.signed
    lrwxrwxrwx 1 root root 68 Oct 9 15:30 j721s2-main-r5f1_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_0_release_strip.xer5f
    lrwxrwxrwx 1 root root 75 Oct 9 15:30 j721s2-main-r5f1_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_0_release_strip.xer5f.signed
    lrwxrwxrwx 1 root root 68 Oct 9 15:30 j721s2-main-r5f1_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_1_release_strip.xer5f
    lrwxrwxrwx 1 root root 75 Oct 9 15:30 j721s2-main-r5f1_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_1_release_strip.xer5f.signed
    lrwxrwxrwx 1 root root 68 Oct 9 15:30 j721s2-mcu-r5f0_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu1_1_release_strip.xer5f
    lrwxrwxrwx 1 root root 75 Oct 9 15:30 j721s2-mcu-r5f0_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu1_1_release_strip.xer5f.signed
    -rw-r--r-- 1 root root 5980 Mar 9 2018 regulatory.db
    -rw-r--r-- 1 root root 1085 Mar 9 2018 regulatory.db.p7s
    -rw-r--r-- 1 root root 143360 Mar 9 2018 rgx.fw.36.53.104.796
    -rw-r--r-- 1 root root 383128 Mar 9 2018 rgx.sh.36.53.104.796
    -rw-r--r-- 1 root root 28 Mar 9 2018 tee-header_v2.bin
    -rw-r--r-- 1 root root 0 Mar 9 2018 tee-pageable_v2.bin
    -rw-r--r-- 1 root root 486800 Mar 9 2018 tee-pager_v2.bin
    -rw-r--r-- 1 root root 486800 Mar 9 2018 tee-raw.bin
    -rw-r--r-- 1 root root 486828 Mar 9 2018 tee.bin
    -rw-r--r-- 1 root root 4479904 Mar 9 2018 tee.elf
    drwxr-xr-x 2 root root 4096 Mar 9 2018 ti-connectivity
    drwxr-xr-x 3 root root 4096 Mar 9 2018 ti-ipc
    drwxr-xr-x 2 root root 4096 Mar 9 2018 vision_apps_evm
    lrwxrwxrwx 1 root root 46 Mar 9 2018 wave521c_k3_codec_fw.bin -> /usr/lib/firmware/cnm/wave521c_k3_codec_fw.bin

  • If i understand correctly, you are using yocto-ti repository to build the images  not using any default SDK?

    +CONFIG_SAMPLES=y
    +CONFIG_SAMPLE_RPMSG_CLIENT=m
    +CONFIG_RPMSG_NS=m
    +CONFIG_RPMSG_VIRTIO=m
    +CONFIG_RPMSG=m

    and including the images 

    -rw-r--r-- 1 root root 18352 Mar 9 2018 rpmsg_char.ko
    -rw-r--r-- 1 root root 23720 Mar 9 2018 rpmsg_core.ko
    -rw-r--r-- 1 root root 10872 Mar 9 2018 rpmsg_ctrl.ko
    -rw-r--r-- 1 root root 8512 Mar 9 2018 rpmsg_ns.ko
    -rw-r--r-- 1 root root 14184 Mar 9 2018 rpmsg_pru.ko
    -rw-r--r-- 1 root root 21848 Mar 9 2018 virtio_rpmsg_bus.ko

    May i also know if remote proc modules are also built ?

    Regards

    Tarun Mukesh

  • Hi Tarun Mukesh:

         You are right! I use the yocto-ti repository to build image.

         remote proc modules? I have include the remoteproc module. Like below. If I use the rpmsg_char_simple tool test on userspace. That was workable. 

    root@j721s2-evm:/lib/firmware# lsmod | grep remo
    ti_k3_r5_remoteproc 24576 0
    ti_k3_dsp_remoteproc 16384 0

  •  You are right! I use the yocto-ti repository to build image.

    Thanks for confirmation.

     remote proc modules? I have include the remoteproc module. Like below. If I use the rpmsg_char_simple tool test on userspace. That was workable. 

    so if you run rpmsg_char_simple test it is working fine but has problem with rpmsg_client_sample test .Am i right ?

  • Hi Tarun Mukesh:

         Yes, You are right! Command "modprobe rpmsg_client_sample count=1000" and check dmesg no find any test logs!

  • In the ti-linux-kernel-6.6\samples\rpmsg\rpmsg_client_sample.c, I check this driver code. 

    In the rpmsg_sample_probe(), I saw the function rpmsg_send() send data to remote process with data MSG. I have question that what remote core was sending. The parameter input is rpdev->ept. But I didn't see where set the remote core endpoint. Or It was send to all off remote core. Like broadcast?  

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    static int rpmsg_sample_probe(struct rpmsg_device *rpdev)
    {
    int ret;
    struct instance_data *idata;
    dev_info(&rpdev->dev, "new channel: 0x%x -> 0x%x!\n",
    rpdev->src, rpdev->dst);
    idata = devm_kzalloc(&rpdev->dev, sizeof(*idata), GFP_KERNEL);
    if (!idata)
    return -ENOMEM;
    dev_set_drvdata(&rpdev->dev, idata);
    /* send a message to our remote processor */
    ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG));
    if (ret) {
    dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
    return ret;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  •      Yes, You are right! Command "modprobe rpmsg_client_sample count=1000" and check dmesg no find any test logs!

    Thanks for the info.I am checking internally please allow me some time.

    rpmsg_client_sample is kind of broadcast message only, it sends message to all the cores and all the cores reply back to it.

  • Hi Tarun Mukesh:

        To build rpmsg_client_sample.ko, I use the yocto build process to build. And Add below item into kernel config.

    +CONFIG_SAMPLES=y
    +CONFIG_SAMPLE_RPMSG_CLIENT=m
    +CONFIG_RPMSG_NS=m
    +CONFIG_RPMSG_VIRTIO=m
    +CONFIG_RPMSG=m

  • Hello,

    Can you please keep all the "m" to "y'' ? 

    and later we can remove one by one.

    As mentioned in the above documentation URL

     Depends on: SAMPLES [=y] && RPMSG [=y] && m && MODULES [=y]

    RPMSG should not be a module but an inbuilt driver.


    Regards
    Tarun Mukesh