Skip to content

examples: linux: add rpmsg udev rules and scripts#101

Open
tnmysh wants to merge 1 commit intoOpenAMP:mainfrom
tnmysh:rpmsg_udev_rules
Open

examples: linux: add rpmsg udev rules and scripts#101
tnmysh wants to merge 1 commit intoOpenAMP:mainfrom
tnmysh:rpmsg_udev_rules

Conversation

@tnmysh
Copy link
Collaborator

@tnmysh tnmysh commented Mar 20, 2026

Linux userspace apps can't use rpmsg devices without root access. Introduce udev rules to modify rpmsg device permissions so that userspace apps can use these devices. Also, create symlink to rpmsg device with channel name, src ept and dest ept. Apps can use these symlinks directly without going through sysfs to find out which rpmsg device to use. This makes apps to use rpmsg devices very easy. It is also required to add current user to "rpmsg" group for apps to use rpmsg devices now. This also makes sure rpmsg communication is secure.

@tnmysh tnmysh requested review from arnopo, edmooring and wmamills March 20, 2026 03:28
Linux userspace apps can't use rpmsg devices without root access.
Introduce udev rules to modify rpmsg device permissions so that
userspace apps can use these devices. Also, create symlink to rpmsg
device  with channel name, src ept and dest ept. Apps can use these
symlinks directly without going through sysfs to find out which rpmsg
device to use. This makes apps to use rpmsg devices very easy. It is
also required to add current user to "rpmsg" group for apps to use rpmsg
devices now. This also makes sure rpmsg communication is secure.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
@tnmysh tnmysh force-pushed the rpmsg_udev_rules branch from f211025 to 572a775 Compare March 20, 2026 03:30
Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an udev expert, I need to play with it but look nice in a first approach.

In addition of the licensing, I wonder if it should not be a sub-folder of examples/linux/rpmsg-utils. Indeed there is a dependency with rpmsg_utils

what about putting it in examples/linux/rpmsg-utils/udev ?

# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use BSD-3-Clause license instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@tnmysh
Copy link
Collaborator Author

tnmysh commented Mar 26, 2026

I'm not an udev expert, I need to play with it but look nice in a first approach.

In addition of the licensing, I wonder if it should not be a sub-folder of examples/linux/rpmsg-utils. Indeed there is a dependency with rpmsg_utils

what about putting it in examples/linux/rpmsg-utils/udev ?

I am still unsure if these scripts will work only for xlnx platform or it will be vendor agnostic ?
Same for udev rules. I plan to make it work in vendor agnostic manner for all rpmsg_char devices and ttyRPMSG devices atleast, but need confirmation from other vendors.

If it works for all the vendors, then we can keep it under rpmsg-utils. If not, then probably create vendor directory and each vendor can have their own udev rules and directories.

Copy link

@edmooring edmooring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once @arnopo comment is resolved. It looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants