-
Notifications
You must be signed in to change notification settings - Fork 7
docs: Include instructions on enable Remoteproc Runtime in userspace #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7a087ad
docs: Mention the necesssity of root permissions
yejseo01 433e6af
feat: Enable remoteproc-runtime to be runnable in user space
yejseo01 acacd72
docs: Add inst on enabling non-root usr to use Remoteproc Runtime
yejseo01 0c19349
docs: Fix misalignment
yejseo01 ff8941c
docs: Add documentation to enable Remoteproc Runtime in user space
yejseo01 7cbcf52
feat: Make fetching of the firmware more stable
yejseo01 93084df
feat: revert error message return fix so it would be merged as differ…
yejseo01 4121ddf
docs: Divide the permission settings into chunks of steps
yejseo01 4991294
docs: Reword the introduction to user permissions guidance
yejseo01 d6133b7
fix: Fix lint issue
yejseo01 e38ae7f
fix: Fix markdown lint
yejseo01 54650ed
docs: remove to much emphasis on systemd dependency in title wording
yejseo01 58e7de2
docs: specify code block's language
yejseo01 4ff03b3
lint: remove unused package
yejseo01 06be4f8
docs: Remove kernel specific instructions
yejseo01 880a533
Update docs/PERMISSION_SETTING.md
yejseo01 87298c7
Update docs/PERMISSION_SETTING.md
yejseo01 25c156e
Merge branch 'main' into userspace_enable
yejseo01 cb16b80
Update docs/PERMISSION_SETTING.md's wording
yejseo01 8e48c68
Update docs/PERMISSION_SETTING.md
yejseo01 12b31e5
Update docs/PERMISSION_SETTING.md
yejseo01 b1be820
docs: remove mention of userspace run in USAGE.md
yejseo01 84d41ba
lint: Remove lint error
yejseo01 289a342
docs: State the volatility of remote processor number
yejseo01 c8b9270
docs: indicate volatility of the remoteproc processor number
yejseo01 8035486
docs: reword
yejseo01 41194b4
docs: Simplify introduction
yejseo01 3ad69d8
Update wording of docs/PERMISSION_SETTING.md
yejseo01 d7c159a
Update docs/PERMISSION_SETTING.md
yejseo01 d4d1946
lint: Remove excess whitespace
yejseo01 0f6dacb
Merge branch 'main' into userspace_enable
yejseo01 17a1da0
docs: Fix incorrect wording
yejseo01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Permission setting for non-root users' usage of Remoteproc Runtime | ||
|
|
||
| For non-root users to use Remoteproc Runtime, the remoteproc driver and the container engine must be accessible for this user. | ||
|
|
||
| ## How to set Remoteproc Runtime to be accessible by non-root users | ||
|
|
||
| ### 1. Make remoteproc driver accessible to the user | ||
|
|
||
| Usually, remoteproc driver can only be accessible to root. To change this setting, follow the below instructions: | ||
|
yejseo01 marked this conversation as resolved.
Outdated
yejseo01 marked this conversation as resolved.
Outdated
|
||
|
|
||
| 1. Create a group and add your user: | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```sh | ||
| sudo groupadd remoteproc | ||
| sudo usermod -aG remoteproc "$USER" | ||
| ``` | ||
|
|
||
| Log out and log back in to refresh group membership | ||
|
|
||
| 2. Use systemd-tmpfiles to set mode/owner on every boot (and re-apply easily): | ||
|
|
||
| Create /etc/tmpfiles.d/remoteproc.conf with following: | ||
|
|
||
| ``` | ||
| 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. | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
|
|
||
| 3. Apply the change in remoteproc.conf using root permission. This needs to be done on each boot.: | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
| ```sh | ||
| sudo systemd-tmpfiles --create /etc/tmpfiles.d/remoteproc.conf | ||
| ``` | ||
| 4. Log in as a user in the remoteproc group and try the following commands to make sure that you can access the remoteproc driver as this user: | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
| ```sh | ||
| # 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 | ||
| ``` | ||
|
|
||
| ### 2. Set the firmware path to somewhere accessible by the user | ||
|
|
||
| 1. Ensure that the path of the folder that contains your firmware is written to `/sys/module/firmware_class/parameters/path`. You need root permission for this. | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
| ```sh | ||
| sudo echo <your firmware folder path> > /sys/module/firmware_class/parameters/path | ||
|
yejseo01 marked this conversation as resolved.
Outdated
|
||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.