aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-05-08 20:56:07 -0700
committerGitHub <noreply@github.com>2021-05-08 20:56:07 -0700
commit7a25dcacffcadf541da5107a35856b66e770bcaf (patch)
treecdb3ee8542ae68b61708f3cab99bbd921e2b8b76 /util
parentd0a3bca9ecc6ccdc75218524b97b9cfb8a681baf (diff)
downloadqmk_firmware-7a25dcacffcadf541da5107a35856b66e770bcaf.tar.gz
qmk_firmware-7a25dcacffcadf541da5107a35856b66e770bcaf.zip
New command: qmk console (#12828)
* stash poc * stash * tidy up implementation * Tidy up slightly for review * Tidy up slightly for review * Bodge environment to make tests pass * Refactor away from asyncio due to windows issues * Filter devices * align vid/pid printing * Add hidapi to the installers * start preparing for multiple hid_listeners * udev rules for hid_listen * refactor to move closer to end state * very basic implementation of the threaded model * refactor how vid/pid/index are supplied and parsed * windows improvements * read the report directly when usage page isn't available * add per-device colors, the choice to show names or numbers, and refactor * add timestamps * Add support for showing bootloaders * tweak the color for bootloaders * Align bootloader disconnect with connect color * add support for showing all bootloaders * fix the pyusb check * tweaks * fix exception * hide a stack trace behind -v * add --no-bootloaders option * add documentation for qmk console * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * pyformat * clean up and flesh out KNOWN_BOOTLOADERS Co-authored-by: zvecr <git@zvecr.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/install/arch.sh10
-rwxr-xr-xutil/install/debian.sh7
-rwxr-xr-xutil/install/fedora.sh7
-rwxr-xr-xutil/install/gentoo.sh7
-rwxr-xr-xutil/install/msys2.sh9
-rw-r--r--util/udev/50-qmk.rules3
6 files changed, 22 insertions, 21 deletions
diff --git a/util/install/arch.sh b/util/install/arch.sh
index 7442e2f13..eac4ad64e 100755
--- a/util/install/arch.sh
+++ b/util/install/arch.sh
@@ -4,13 +4,13 @@ _qmk_install() {
4 echo "Installing dependencies" 4 echo "Installing dependencies"
5 5
6 sudo pacman --needed --noconfirm -S \ 6 sudo pacman --needed --noconfirm -S \
7 base-devel clang diffutils gcc git unzip wget zip \ 7 base-devel clang diffutils gcc git unzip wget zip python-pip \
8 python-pip \ 8 avr-binutils arm-none-eabi-binutils arm-none-eabi-gcc \
9 avr-binutils \ 9 arm-none-eabi-newlib avrdude dfu-programmer dfu-util
10 arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib \
11 avrdude dfu-programmer dfu-util
12 sudo pacman --needed --noconfirm -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz 10 sudo pacman --needed --noconfirm -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz
13 sudo pacman --needed --noconfirm -S avr-libc # Must be installed after the above, or it will bring in the latest avr-gcc instead 11 sudo pacman --needed --noconfirm -S avr-libc # Must be installed after the above, or it will bring in the latest avr-gcc instead
14 12
13 sudo pacman --needed --noconfirm -S hidapi # This will fail if the community repo isn't enabled
14
15 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt 15 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
16} 16}
diff --git a/util/install/debian.sh b/util/install/debian.sh
index 0ae9764a3..ef87c41b5 100755
--- a/util/install/debian.sh
+++ b/util/install/debian.sh
@@ -13,10 +13,9 @@ _qmk_install() {
13 13
14 sudo apt-get -yq install \ 14 sudo apt-get -yq install \
15 build-essential clang-format diffutils gcc git unzip wget zip \ 15 build-essential clang-format diffutils gcc git unzip wget zip \
16 python3-pip \ 16 python3-pip binutils-avr gcc-avr avr-libc binutils-arm-none-eabi \
17 binutils-avr gcc-avr avr-libc \ 17 gcc-arm-none-eabi libnewlib-arm-none-eabi avrdude dfu-programmer \
18 binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi \ 18 dfu-util teensy-loader-cli libhidapi-hidraw0
19 avrdude dfu-programmer dfu-util teensy-loader-cli libusb-dev
20 19
21 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt 20 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
22} 21}
diff --git a/util/install/fedora.sh b/util/install/fedora.sh
index 44b71b98b..10fc7c8ad 100755
--- a/util/install/fedora.sh
+++ b/util/install/fedora.sh
@@ -5,11 +5,10 @@ _qmk_install() {
5 5
6 # TODO: Check whether devel/headers packages are really needed 6 # TODO: Check whether devel/headers packages are really needed
7 sudo dnf -y install \ 7 sudo dnf -y install \
8 clang diffutils git gcc glibc-headers kernel-devel kernel-headers make unzip wget zip \ 8 clang diffutils git gcc glibc-headers kernel-devel kernel-headers \
9 python3 \ 9 make unzip wget zip python3 avr-binutils avr-gcc avr-libc \
10 avr-binutils avr-gcc avr-libc \
11 arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-newlib \ 10 arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-newlib \
12 avrdude dfu-programmer dfu-util libusb-devel 11 avrdude dfu-programmer dfu-util hidapi
13 12
14 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt 13 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
15} 14}
diff --git a/util/install/gentoo.sh b/util/install/gentoo.sh
index 97eb5df07..604d07bf8 100755
--- a/util/install/gentoo.sh
+++ b/util/install/gentoo.sh
@@ -22,9 +22,10 @@ _qmk_install() {
22 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null 22 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
23 sudo emerge -auN sys-devel/gcc 23 sudo emerge -auN sys-devel/gcc
24 sudo emerge -au --noreplace \ 24 sudo emerge -au --noreplace \
25 app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang sys-devel/crossdev \ 25 app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang \
26 \>=dev-lang/python-3.7 \ 26 sys-devel/crossdev \>=dev-lang/python-3.7 dev-embedded/avrdude \
27 dev-embedded/avrdude dev-embedded/dfu-programmer app-mobilephone/dfu-util 27 dev-embedded/dfu-programmer app-mobilephone/dfu-util sys-apps/hwloc \
28 dev-libs/hidapi
28 29
29 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr 30 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
30 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi 31 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
diff --git a/util/install/msys2.sh b/util/install/msys2.sh
index c8598a60f..9b8343aed 100755
--- a/util/install/msys2.sh
+++ b/util/install/msys2.sh
@@ -9,11 +9,10 @@ _qmk_install() {
9 9
10 pacman --needed --noconfirm --disable-download-timeout -S pactoys-git 10 pacman --needed --noconfirm --disable-download-timeout -S pactoys-git
11 pacboy sync --needed --noconfirm --disable-download-timeout \ 11 pacboy sync --needed --noconfirm --disable-download-timeout \
12 base-devel: toolchain:x clang:x git: unzip: \ 12 base-devel: toolchain:x clang:x git: unzip: python3-pip:x \
13 python3-pip:x \ 13 avr-binutils:x avr-gcc:x avr-libc:x arm-none-eabi-binutils:x \
14 avr-binutils:x avr-gcc:x avr-libc:x \ 14 arm-none-eabi-gcc:x arm-none-eabi-newlib:x avrdude:x bootloadhid:x \
15 arm-none-eabi-binutils:x arm-none-eabi-gcc:x arm-none-eabi-newlib:x \ 15 dfu-programmer:x dfu-util:x teensy-loader-cli:x hidapi:x
16 avrdude:x bootloadhid:x dfu-programmer:x dfu-util:x teensy-loader-cli:x
17 16
18 _qmk_install_drivers 17 _qmk_install_drivers
19 18
diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules
index acaa7dcc5..679fe4ced 100644
--- a/util/udev/50-qmk.rules
+++ b/util/udev/50-qmk.rules
@@ -60,3 +60,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uacc
60SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" 60SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
61### Micro 61### Micro
62SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" 62SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
63
64# hid_listen
65KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"