By default, the remoteproc device can only be accessible by root.
-
Create a group and add the user:
sudo groupadd remoteproc sudo usermod -aG remoteproc "$USER"Log out and log back in to refresh group membership
-
Use systemd-tmpfiles to set mode/owner on every boot:
Create /etc/tmpfiles.d/remoteproc.conf and add relevant remoteproc driver filesystem. Check the remoteproc name and make sure the correct remote processor is revealed to the group:
f /sys/class/remoteproc/remoteproc0/state 0664 root remoteproc - - f /sys/class/remoteproc/remoteproc0/firmware 0664 root remoteproc - - f /sys/class/remoteproc/remoteproc0/name 0664 root remoteproc - -Add similar lines for each additional remoteproc device (e.g., remoteproc1, remoteproc2, etc.) as needed. On each new boot, the remoteproc processor number may be different depending on the driver probe order. It is recommended that this file is checked on each boot to reveal correct processor to correct group of users before applying the configuration.
-
Apply the change in remoteproc.conf. This needs to be done on each boot:
sudo systemd-tmpfiles --create /etc/tmpfiles.d/remoteproc.conf
-
Log in as a user in the remoteproc group and test access to the remoteproc driver:
# read state cat /sys/class/remoteproc/remoteproc0/state # start/stop echo start | tee /sys/class/remoteproc/remoteproc0/state echo stop | tee /sys/class/remoteproc/remoteproc0/state
Remoteproc loads firmware by name from the Linux Firmware Search Path. By default, this will not be user accessible.
- Override the firmware search path to somewhere user accessible by writing to
/sys/module/firmware_class/parameters/path. You need root permission for this.echo <your firmware folder path> | sudo tee /sys/module/firmware_class/parameters/path