summaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rwxr-xr-xlib/python/qmk/cli/doctor.py62
1 files changed, 49 insertions, 13 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py
index 4d7ba52181..5341159dac 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor.py
@@ -10,6 +10,7 @@ from pathlib import Path
from milc import cli
from qmk import submodules
+from qmk.constants import QMK_FIRMWARE
from qmk.questions import yesno
from qmk.commands import run
@@ -149,25 +150,58 @@ def check_udev_rules():
ok = True
udev_dir = Path("/etc/udev/rules.d/")
desired_rules = {
- 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")},
- 'input_club': {_udev_rule("1c11", "b007")},
- 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")},
- 'bootloadhid': {_udev_rule("16c0", "05df")},
+ 'atmel-dfu': {
+ _udev_rule("03EB", "2FEF"), # ATmega16U2
+ _udev_rule("03EB", "2FF0"), # ATmega32U2
+ _udev_rule("03EB", "2FF3"), # ATmega16U4
+ _udev_rule("03EB", "2FF4"), # ATmega32U4
+ _udev_rule("03EB", "2FF9"), # AT90USB64
+ _udev_rule("03EB", "2FFB") # AT90USB128
+ },
+ 'kiibohd': {
+ _udev_rule("1C11", "B007")
+ },
+ 'stm32': {
+ _udev_rule("1EAF", "0003"), # STM32duino
+ _udev_rule("0483", "DF11") # STM32 DFU
+ },
+ 'bootloadhid': {
+ _udev_rule("16C0", "05DF")
+ },
+ 'usbasploader': {
+ _udev_rule("16C0", "05DC")
+ },
+ 'massdrop': {
+ _udev_rule("03EB", "6124")
+ },
'caterina': {
- _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'),
- _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'),
- _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'),
- _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"')
+ # Spark Fun Electronics
+ _udev_rule("1B4F", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz
+ _udev_rule("1B4F", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz
+ _udev_rule("1B4F", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones)
+ # Pololu Electronics
+ _udev_rule("1FFB", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4
+ # Arduino SA
+ _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo
+ _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro
+ # Adafruit Industries LLC
+ _udev_rule("239A", "000C", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4
+ _udev_rule("239A", "000D", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz
+ _udev_rule("239A", "000E", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz
+ # dog hunter AG
+ _udev_rule("2A03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo
+ _udev_rule("2A03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro
}
}
# These rules are no longer recommended, only use them to check for their presence.
deprecated_rules = {
- 'dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")},
- 'input_club': {_deprecated_udev_rule("1c11")},
+ 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")},
+ 'kiibohd': {_deprecated_udev_rule("1c11")},
'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")},
'bootloadhid': {_deprecated_udev_rule("16c0", "05df")},
- 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}
+ 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'},
+ 'tmk': {_deprecated_udev_rule("feed")}
}
if udev_dir.exists():
@@ -193,7 +227,7 @@ def check_udev_rules():
if deprecated_rule and deprecated_rule.issubset(current_rules):
cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader)
else:
- cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader)
+ cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader)
return ok
@@ -291,6 +325,8 @@ def doctor(cli):
cli.log.error('Unsupported OS detected: %s', platform_id)
ok = False
+ cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE)
+
# Make sure the basic CLI tools we need are available and can be executed.
bin_ok = check_binaries()
@@ -327,4 +363,4 @@ def doctor(cli):
cli.log.info('{fg_green}QMK is ready to go')
else:
cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.')
- # FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something
+ # FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something \ No newline at end of file