mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-19 16:50:36 +00:00
Streamline udev rules
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
# CrOS_EC_Python udev rules
|
|
||||||
|
|
||||||
# LPC Access
|
|
||||||
KERNEL=="port", TAG+="uaccess"
|
|
||||||
|
|
||||||
# /dev/cros_ec Access
|
|
||||||
KERNEL=="cros_ec", TAG+="uaccess"
|
|
||||||
@@ -15,7 +15,9 @@ YAFI is also available on [Flathub](https://flathub.org/en/apps/au.stevetech.yaf
|
|||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
To allow YAFI to communicate with the EC, you need to copy the [`60-cros_ec_python.rules`](60-cros_ec_python.rules) file to `/etc/udev/rules.d/` and reload the rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`.
|
To allow YAFI to communicate with the EC, you will need to enable user access to the `/dev/cros_ec` device. You can do this by running `echo KERNEL=="cros_ec", TAG+="uaccess" | sudo tee /etc/udev/rules.d/60-yafi.rules`, and then reload the rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`.
|
||||||
|
|
||||||
|
You can also do this by running `curl -fL yafi.stevetech.au/udev.sh | sudo sh` which will run the [`add-udev-rules.sh`](add-udev-rules.sh) script.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
@@ -84,7 +86,7 @@ It is possible to run YAFI on Windows using [gvsbuild](https://github.com/wingtk
|
|||||||
|
|
||||||
### `[Errno 13] Permission denied: '/dev/cros_ec'`
|
### `[Errno 13] Permission denied: '/dev/cros_ec'`
|
||||||
|
|
||||||
This error occurs when the udev rules are not installed or not working. Make sure you have copied the `60-cros_ec_python.rules` file to `/etc/udev/rules.d/` and reloaded the rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`.
|
This error occurs when the udev rules are not installed or not working. Make sure you have installed the udev rules as described in the [Linux Installation](#linux) section.
|
||||||
|
|
||||||
### `Could not auto detect device, check you have the required permissions, or specify manually.`
|
### `Could not auto detect device, check you have the required permissions, or specify manually.`
|
||||||
|
|
||||||
|
|||||||
7
add-udev-rules.sh
Executable file
7
add-udev-rules.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
echo Installing udev rules for YAFI to /etc/udev/rules.d/60-yafi.rules
|
||||||
|
echo KERNEL=="cros_ec", TAG+="uaccess" > /etc/udev/rules.d/60-yafi.rules
|
||||||
|
udevadm control --reload-rules
|
||||||
|
udevadm trigger
|
||||||
|
echo udev rules installed successfully.
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
<p>You will need to install the udev rules to allow non-root access to the EC device. See the README for more information.</p>
|
<p>You will need to install the udev rules to allow non-root access to the EC device. See the README for more information.</p>
|
||||||
|
|
||||||
|
<p>Alternatively, you can run <code>curl -fL yafi.stevetech.au/udev.sh | sudo sh</code> to install the udev rules.</p>
|
||||||
|
|
||||||
<p>YAFI is not affiliated with Framework Computer Inc. in any way.</p>
|
<p>YAFI is not affiliated with Framework Computer Inc. in any way.</p>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user