Skip to content

Instantly share code, notes, and snippets.

@0x4a
Last active October 7, 2020 20:40
Show Gist options
  • Save 0x4a/b6f97a69d08e5bde158e51f967506828 to your computer and use it in GitHub Desktop.
Save 0x4a/b6f97a69d08e5bde158e51f967506828 to your computer and use it in GitHub Desktop.

QMK setup on Windows 10 using WSL 2

To run QMK under Windows using the Windows Subsystem for Linux with Fish-Shell, follow these steps:

  • do a sudo apt install git python3 python3-pip
  • add to path via set -Ua fish_user_paths $HOME/.local/bin
  • install qmk: python3 -m pip install --user qmk
  • clone repository from windows and to windows filesystem: git clone https://github.com/0x4a/qmk_firmware.git
  • there will be some packages missing, so do: sudo apt install gcc-avr avrdude gcc-arm-none-eabi dfu-util
  • the dfu-programmer won't work because USB support is missing in WSL, so I just symlinked dfu-util to dfu-programmer with sudo ln -s /usr/bin/dfu-util /usr/bin/dfu-programmer. Yes, that will not work how it is intended, but it satisfies qmk's check for dfu-programmer. As we will never use it, and flash via mdloader instead, that should not be a problem. Just remember to not use dfu-programmer or try to flash the board from WSL. As an alternative you could install dfu-programmer for Windows and symlink that executable to /usr/bin/dfu-programmer instead. That should run from WSL giving you a working dfu-programmer - but I could not get it to run in Windows, so I opted for the easy way out ;-)
  • set udev rules: https://docs.qmk.fm/#/faq_build?id=linux-udev-rules
  • run wsl_install.sh from the util/ directory in the repository
  • run qmk setup -H /mnt/c/path/tp/repo
  • voila: you can build the default keymap with qmk compile -kb massdrop/alt -km default without error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment