From f6ff3c1b8756844eb6ce2b58710ed782095cff6d Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Tue, 19 Feb 2019 00:32:07 +0100 Subject: [PATCH] Fetch tags in docker build script. More robust udev rules in docs --- docs/solo/udev.md | 13 ++++++++----- in-docker-build.sh | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/solo/udev.md b/docs/solo/udev.md index 6bac736..ddf8350 100644 --- a/docs/solo/udev.md +++ b/docs/solo/udev.md @@ -1,13 +1,16 @@ # tl;dr -Create [`/etc/udev/rules.d/99-solo.rules`](https://github.com/solokeys/solo/blob/master/99-solo.rules) and add the following (which assumes your user is in group `plugdev`): +Create a file like [`/etc/udev/rules.d/99-solo.rules`](https://github.com/solokeys/solo/blob/master/99-solo.rules), for instance the following rules should cover access in all cases: ``` -# Solo -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess", GROUP="plugdev", SYMLINK+="solokey" +# Solo bootloader + firmware +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess", GROUP="plugdev" + +# ST DFU bootloader +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", GROUP="plugdev" # U2F Zero -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess", GROUP="plugdev", SYMLINK+="u2fzero" +ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess", GROUP="plugdev" ``` Then run @@ -50,7 +53,7 @@ This contains rules for Yubico's keys, the U2F Zero, and many others. The releva ``` KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess" ``` -It matches on the correct vendor/product IDs of 10c4/8acf, and adds the TAG `uaccess`. Older versions of udev use rules such as +It matches on the correct vendor/product IDs of 10c4/8acf, and adds the TAG `uaccess`. Older versions of udev use rules such as ``` KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", MODE="0644", GROUP="plugdev" ``` diff --git a/in-docker-build.sh b/in-docker-build.sh index 3b17ebd..d726ac0 100755 --- a/in-docker-build.sh +++ b/in-docker-build.sh @@ -5,7 +5,7 @@ version=${1:-master} export PREFIX=/opt/gcc-arm-none-eabi-8-2018-q4-major/bin/ cd /solo/targets/stm32l432 -git fetch +git fetch --tags git checkout ${version} version=$(git describe)