diff --git a/docs/common/ai/qualcomm/_fastrpc_setup.mdx b/docs/common/ai/qualcomm/_fastrpc_setup.mdx index 85f1b2174..37728f32e 100644 --- a/docs/common/ai/qualcomm/_fastrpc_setup.mdx +++ b/docs/common/ai/qualcomm/_fastrpc_setup.mdx @@ -74,6 +74,31 @@ NPU 环境配置清单 {/* */} +检查 /dev/fastrpc* 设备节点 + +安装软件包后,可先确认设备节点已正常创建,再运行测试: + +```bash +ls /dev/fastrpc* +``` + +若看到 `/dev/fastrpc-cdsp` 等设备节点,说明驱动已加载,可继续运行验证步骤。 + +若设备节点不存在(`ls: /dev/fastrpc*: No such file or directory`),通常为内核 FastRPC 驱动未加载所致,可尝试: + +```bash +# 查看驱动是否已加载 +lsmod | grep fastrpc + +# 如未加载,尝试手动加载驱动 +sudo modprobe qcom_fastrpc +ls /dev/fastrpc* +``` + +:::tip 使用 RadxaOS 官方镜像 +RadxaOS 镜像(Debian)已预置 FastRPC 内核驱动。若在使用第三方 Ubuntu 镜像或自行编译的内核,驱动可能缺失。请确认设备运行的是 Radxa 官方镜像。 +::: + 验证 fastrpc 状态 diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/common/ai/qualcomm/_fastrpc_setup.mdx b/docs/i18n/en/docusaurus-plugin-content-docs/current/common/ai/qualcomm/_fastrpc_setup.mdx new file mode 100644 index 000000000..d88c49de3 --- /dev/null +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/common/ai/qualcomm/_fastrpc_setup.mdx @@ -0,0 +1,193 @@ +NPU Environment Configuration Checklist + +- [fastrpc](https://github.com/qualcomm/fastrpc) +- /dev/fastrpc-adsp +- /dev/fastrpc-cdsp +- /dev/fastrpc-cdsp-secure +- /usr/lib/dsp libraries + +Install using radxa apt source + +:::note Prerequisite +These packages depend on the Radxa APT source included in the official RadxaOS images. Before following the steps below, make sure the device is running the official RadxaOS image for the target board. If you are using a third-party Ubuntu/Debian image or have replaced the package sources, `fastrpc` / `fastrpc-test` may not be available. +::: + + + + + + + ```bash + sudo apt update + sudo apt install fastrpc libcdsprpc1 + ``` + + + + + + + + + + + ```bash + sudo apt update + sudo apt install fastrpc libcdsprpc1 + ``` + + + + + + + +Check /dev/fastrpc* device nodes + +After installing the packages, verify that the device nodes have been created before running the test: + +```bash +ls /dev/fastrpc* +``` + +If you see `/dev/fastrpc-cdsp` and other device nodes, the kernel driver is loaded and you can proceed to the verification step. + +If the devices do not exist (`ls: /dev/fastrpc*: No such file or directory`), the FastRPC kernel driver is likely not loaded. Try loading it manually: + +```bash +# Check if the driver is loaded +lsmod | grep fastrpc + +# If not loaded, try loading the driver manually +sudo modprobe qcom_fastrpc +ls /dev/fastrpc* +``` + +:::tip Use official RadxaOS image +The RadxaOS (Debian) image includes the FastRPC kernel driver by default. If you are using a third-party Ubuntu image or a self-built kernel, the driver may be missing. Make sure the device is running the official RadxaOS image. +::: + +Verify fastrpc status + + + + + + + ```bash + sudo apt install fastrpc-test + fastrpc_test -a v68 + ``` + + + + ```bash + rock@radxa-dragon-q6a:~$ fastrpc_test -a v68 + + Demonstrating FARF run-time logging + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + + Demonstrating HAP_mem.h APIs + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + + Demonstrating HAP_perf.h APIs + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + [PASS] libhap_example.so + + Test PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + [PASS] libmultithreading.so + + + Allocate 4000 bytes from ION heap + Creating sequence of numbers from 0 to 999 + Compute sum on domain 3 + + Call calculator_sum on the DSP + Sum = 499500 + + Call calculator_max on the DSP + Max value = 999 + [PASS] libcalculator.so + + + ======================================== + Test Summary: + Total tests run: 3 + Passed: 3 + Failed: 0 + Skipped: 0 + ======================================== + + RESULT: All applicable tests PASSED + ``` + + + + + + + + ```bash + sudo apt install fastrpc-test + fastrpc_test -a v75 + ``` + + + + ```bash + rock@radxa-airbox-q900:~$ fastrpc_test -a v75 + + Allocate 4000 bytes from ION heap + Creating sequence of numbers from 0 to 999 + Compute sum on domain 3 + + Call calculator_sum on the DSP + Sum = 499500 + + Call calculator_max on the DSP + Max value = 999 + [PASS] libcalculator.so + + Test PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + [PASS] libmultithreading.so + + + Demonstrating FARF run-time logging + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + + Demonstrating HAP_mem.h APIs + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + + Demonstrating HAP_perf.h APIs + + hap_example function PASSED + Please look at the mini-dm logs or the adb logcat logs for DSP output + [PASS] libhap_example.so + + + ======================================== + Test Summary: + Total tests run: 3 + Passed: 3 + Failed: 0 + Skipped: 0 + ======================================== + + RESULT: All applicable tests PASSED + ``` + + + +