This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] DRA829J:用于&#39的 Linux Kernal 空间驱动程序;rpmsg'适用于 SDK 版本10的 SDK-J721E

Guru**** 2338860 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1512489/dra829j-linux-kernal-space-driver-for-rpmsg-sdk-j721e-for-sdk-version-10

器件型号:DRA829J

工具/软件:

您好团队:

我们正在尝试开发一个内核空间驱动程序、用于与 R5F 内核进行 rpmsg 通信。 我们能够使用默认端点发送/接收数据。 我们希望将数据发送到特定内核。 例如、如果我要将数据发送到内核 R5F_MAIN_0_0、如何为此内核创建端点并通过它发送数据?

我们尝试从用户空间运行 rpmsg-char-simple 示例、以确保与用户空间进行通信。 我们观察到只有 rproc_id 0和1正常工作。 对于其他内核、则遇到了错误。 附加日志以供参考。  

root@aptiv-ep2000:~# cd install/
root@aptiv-ep2000:~/install# ls
bin      include  lib
root@aptiv-ep2000:~/install# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/install/lib
root@aptiv-ep2000:~/install# cd bin/
root@aptiv-ep2000:~/install/bin# ks
-sh: ks: command not found
root@aptiv-ep2000:~/install/bin# ls
rpmsg_char_simple
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 0
Created endpt device rpmsg-char-0-1081, fd = 3 port = 1025
Exchanging 100 messages with rpmsg device rpmsg-char-0-1081 on rproc id 0 ...

Sending message #0: hello there 0!
Received message #0: round trip delay(usecs) = 194115
hello there 0!
Sending message #1: hello there 1!
Received message #1: round trip delay(usecs) = 90425
hello there 1!
Sending message #2: hello there 2!
Received message #2: round trip delay(usecs) = 84350
hello there 2!
.....
Sending message #98: hello there 98!
Received message #98: round trip delay(usecs) = 68700
hello there 98!
Sending message #99: hello there 99!
Received message #99: round trip delay(usecs) = 78575
hello there 99!

Communicated 100 messages successfully on rpmsg-char-0-1081

TEST STATUS: PASSED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 1
_rpmsg_char_find_rproc: 41400000.r5f is either not probed or not a remoteproc!
Can't create an endpoint device: No such file or directory
TEST STATUS: FAILED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 2
Created endpt device rpmsg-char-2-1084, fd = 3 port = 1025
Exchanging 100 messages with rpmsg device rpmsg-char-2-1084 on rproc id 2 ...

Sending message #0: hello there 0!
Received message #0: round trip delay(usecs) = 145075
hello there 0!
Sending message #1: hello there 1!
Received message #1: round trip delay(usecs) = 109470
hello there 1!
Sending message #2: hello there 2!
Received message #2: round trip delay(usecs) = 81365
.....
Sending message #96: hello there 96!
Received message #96: round trip delay(usecs) = 67280
hello there 96!
Sending message #97: hello there 97!
Received message #97: round trip delay(usecs) = 66460
hello there 97!
Sending message #98: hello there 98!
Received message #98: round trip delay(usecs) = 64750
hello there 98!
Sending message #99: hello there 99!
Received message #99: round trip delay(usecs) = 66710
hello there 99!

Communicated 100 messages successfully on rpmsg-char-2-1084

TEST STATUS: PASSED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 3
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio2.rpmsg_chrdev.-1.14
Can't create an endpoint device: Invalid argument
TEST STATUS: FAILED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 4
_rpmsg_char_find_rproc: 5e00000.r5f does not have any virtio devices!
Can't create an endpoint device: No such file or directory
TEST STATUS: FAILED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 5
_rpmsg_char_find_rproc: 5f00000.r5f does not have any virtio devices!
Can't create an endpoint device: No such file or directory
TEST STATUS: FAILED
root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 6
_rpmsg_char_find_rproc: 4d80800000.dsp is either not probed or not a remoteproc!
Can't create an endpoint device: No such file or directory
TEST STATUS: FAILED
root@aptiv-ep2000:~/install/bin#


root@aptiv-ep2000:~# ls /sys/bus/rpmsg/devices
virtio0.rpmsg_chrdev.-1.14       virtio1.rpmsg_chrdev.-1.14       virtio2.rpmsg_ctrl.0.0
virtio0.rpmsg_ctrl.0.0           virtio1.rpmsg_ctrl.0.0           virtio2.rpmsg_ns.53.53
virtio0.rpmsg_ns.53.53           virtio1.rpmsg_ns.53.53
virtio0.ti.ipc4.ping-pong.-1.13  virtio1.ti.ipc4.ping-pong.-1.13

请检查,提供您的建议。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    请问主域内核中有哪些固件?

    请运行命令 ls -l /lib/firmware 并与我分享屏幕截图

    此致

    Tarun Mukesh

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Tarun、

    这是上面附加的日志。

    root@aptiv-EP2000:~# ls -la /lib/firmware
    共计11172.
    drwxr-xr-x 3根根4096 Mar 9 2018 .
    drwxr-xr-x 29根根12288三月9 2018 ..
    -rw-r--r-- 1根根482664 2018年3月9日 bl32.bin
    -rw-r--r-- 1根根4433352 Mar 9 2018 bl32.elf
    drwxr-xr-x 2根根4096 Mar 9 2018 cadence
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5f0_0-fw -> mcu2_0_application_strip.xer5f
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5f0_1-fw -> mcu2_1_application_strip.xer5f
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5F1_0-FW -> mcu3_0_application_strip.xer5f
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5F1_1-fw -> mcu3_1_application_strip.xer5f
    -rw-r-r- 1根根88280 Mar 9 2018 MCU2_0_application_strip.xer5f
    -rw-r-r- 1根根88280 Mar 9 2018 MCU2_1_application_strip.xer5f
    -rw-r-r- 1根根88280 Mar 9 2018 mcu3_0_application_strip.xer5f
    -rw-r-r- 1根根88280 Mar 9 2018 mcu3_1_application_strip.xer5f
    rw-r--r-- 1根根根247469 Mar 9 2018 pvdec_full_bin.fw
    -rw-r--r-- 1根 root 2018年3月9日 tee-header_v2.bin
    -rw-r--r-- 1根根0 Mar 9 2018 tee-pageable_v2.bin
    -rw-r--r-- 1根根482664 2018年3月9日 tee-pager_v2.bin
    -rw-r--r-- 1根根482664 2018年3月9日 tee-raw.bin
    -rw-r--r-- 1根根482692 Mar 9 2018 tee.bin
    -rw-r--r-- 1根根4433352 Mar 9 2018 tee.elf

    /Subhan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    lrwxrwx 1根根根、2018年3月9日 j7-main-R5f0_0-fw -> mcu2_0_application_strip.xer5f
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5f0_1-fw -> mcu2_1_application_strip.xer5f
    lrwxrwxrwx 1根根目录2018年3月9日 j7-main-R5F1_0-FW -> mcu3_0_application_strip.xer5f
    lrwxrwxrwx 1根根根目录2018年3月9日 j7-main-R5F1_1-fw -> mcu3_1_application_strip.xer5f

    您能告诉我这些可执行文件是什么吗?

    Unknown 说:
    我们尝试从用户空间运行 rpmsg-char-simple 示例、以确保从用户空间进行通信。 我们观察到只有 rproc_id 0和1正常工作。 对于其他内核、我们收到了错误

    rpmsg_char_simple 仅与其他内核上的 ipc_ech_test 可执行文件进行通信。如果您刷写任何其他可执行文件 、则不会与 rpmsg_char_simple 应用程序进行任何通信。

    此致

    Tarun Mukesh

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Tarun、

    感谢您的澄清。 我们知道我们的固件是自定义的、这就是为什么回声测试对我们不起作用的原因。

    关于内核空间驱动程序、我们尝试使用 samples/rpmsg/文件夹中提供的 rpmsg_client_sample 驱动程序。 但此驱动程序无法正常工作。 那是一种很强烈的冲击。 为了使此驱动程序在我们的平台上正常工作、我们是否需要进行任何配置?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请参阅启用   rpmsg_client_sample  https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j721s2/10_00_00_08/exports/docs/linux/Foundational_Components_ ipc_J721S2.html#:~:text=build%20 the %20kernel%20module%20rpmsg_client_sample%3A

    此致

    Tarun Mukesh