summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquare2019-05-20 01:42:15 +0200
committerSquare2019-05-20 01:42:15 +0200
commit1b4d5ca7d3a091e8159e4ace7eb4ea89d6bf0532 (patch)
tree871f4aeb5b5928687ff16b0decd61c806425d638
downloadaur-1b4d5ca7d3a091e8159e4ace7eb4ea89d6bf0532.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--70-solokeys-access.rules19
-rw-r--r--PKGBUILD20
-rw-r--r--solokeys-udev.install12
4 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2fca404e0302
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = solokeys-udev
+ pkgdesc = Official SoloKey udev rules.
+ pkgver = 20190308
+ pkgrel = 1
+ url = https://github.com/solokeys/solo/tree/master/udev
+ install = solokeys-udev.install
+ arch = any
+ license = Apache
+ depends = udev
+ provides = solokeys-udev
+ conflicts = solokeys-udev
+ source = 70-solokeys-access.rules
+ sha256sums = 09134a1f4d97f5a1e591194a24595f966edf5d5f0c6ae45e2bef32d710535c6b
+
+pkgname = solokeys-udev
+
diff --git a/70-solokeys-access.rules b/70-solokeys-access.rules
new file mode 100644
index 000000000000..0243401793a7
--- /dev/null
+++ b/70-solokeys-access.rules
@@ -0,0 +1,19 @@
+# Notify ModemManager this device should be ignored
+ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
+SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
+ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_end"
+
+ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", ENV{ID_MM_DEVICE_IGNORE}="1"
+
+LABEL="mm_usb_device_blacklist_end"
+
+
+# Solo bootloader + firmware access
+SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess"
+SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess"
+
+# ST DFU access
+SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
+
+# U2F Zero
+SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..59f879096ec3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+# Maintainer: Square252 <square@0xfc.de>
+
+pkgname='solokeys-udev'
+pkgver='20190308'
+pkgrel=1
+pkgdesc='Official SoloKey udev rules.'
+arch=('any')
+url='https://github.com/solokeys/solo/tree/master/udev'
+license=('Apache')
+depends=('udev')
+provides=("$pkgname")
+conflicts=("$pkgname")
+sha256sums=('09134a1f4d97f5a1e591194a24595f966edf5d5f0c6ae45e2bef32d710535c6b')
+source=('70-solokeys-access.rules')
+install='solokeys-udev.install'
+
+package() {
+ install -m755 -d "${pkgdir}/usr/lib/udev/rules.d"
+ install -m644 "${srcdir}/70-solokeys-access.rules" "${pkgdir}/usr/lib/udev/rules.d/"
+}
diff --git a/solokeys-udev.install b/solokeys-udev.install
new file mode 100644
index 000000000000..394c51ce0534
--- /dev/null
+++ b/solokeys-udev.install
@@ -0,0 +1,12 @@
+post_install() {
+ udevadm control --reload-rules
+ udevadm trigger
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}