cancel
Showing results for 
Search instead for 
Did you mean: 

rpmsg_client_sample linux kernel module loads automatically ?

debugging
Lead

STM32MP1Cube 1.1.0

Case:

  1. unload /remove the module rpmsg_client_sample 
  2. check lsmod the module is not loaded.
  3. start the M4 with OpenAMP raw example

4. the rpmsg_client_sample  is automatically loaded.

Questions:

  1. what is the mechanism behind how is this module loaded ?
  2. How prevent this and manual load rpmsg_client_sample 
  3. How to replace this module with a custom module to interact with the M4 code?
3 REPLIES 3
Olivier GALLIEN
ST Employee

Hi @debugging​ 

Find below answer from expert :

  1. what is the mechanism behind how is this module loaded ?
  2. How prevent this and manual load rpmsg_client_sample 

There are two mechanism involved

  • automatic module loading is based on modeprobe. You can have a look at https://wiki.gentoo.org/wiki/Kernel_Modules for details.
    • RPMG bus mechanism that probes drivers registered if the name service defined matches. The principle is that on an end-point creation the cortex-M4 sends a “name service announcement�? message to the Linux. The RPMsg bus ( in Linux Kernel) checks for a Linux driver that supports this service name. If yes it probes the driver.  
  1. How to replace this module with a custom module to interact with the M4 code?

I would suggest you to use the rpmsg_tty driver instead that creates a virtual UART communication between Linux application and the Cortex-M4

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
debugging
Lead

@OliverG,

Many thanks. So I the driver rpmsg_client_sample must be removed when when building the kernel., correct?

Is there an easy way to find the drivers that match a certain “name service announcement" before starting a kernel build or at runtime ?

Thanks

Hi @debugging​ 

registered drivers are listed in : /sys/bus/rpmsg/drivers

But to know associated services you need to dig into the code.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.