aboutsummaryrefslogtreecommitdiffstats
path: root/readme.md
diff options
context:
space:
mode:
authorGravatar Fred Sundvik <fsundvik@gmail.com>2016-08-20 18:59:01 +0300
committerGravatar Fred Sundvik <fsundvik@gmail.com>2016-08-20 19:02:19 +0300
commit704cbd1d2b7e6361faf88272b6c4423ee43aeb81 (patch)
tree9b6920511b947c87bcd923ce9d16fa3963886581 /readme.md
parenta3a312f8f4f4d836de494fe3502ea3175ba2a22c (diff)
downloadqmk_firmware-704cbd1d2b7e6361faf88272b6c4423ee43aeb81.tar.gz
Add instructions for Windows 10 subsystem for Linux
Also simplify the linux instructions
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md49
1 files changed, 47 insertions, 2 deletions
diff --git a/readme.md b/readme.md
index 37f140839..2a5354d7f 100644
--- a/readme.md
+++ b/readme.md
@@ -43,6 +43,27 @@ Before you are able to compile, you'll need to install an environment for AVR de
## Build Environment Setup
+### Windows 10
+
+It's still recommended to use the method for Vista and later below. The reason for this is that the Windows 10 Subsystem for Linux lacks [USB support](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13355724-unable-to-access-usb-devices-from-bash), so it's not possible to flash the firmware to the keyboard. Please add your vote to the link!
+
+That said, it's still possible to use it for compilation. And recommended, if you need to compile much, since it's much faster than at least Cygwin (which is also supported, but currently lacking documentation). I haven't tried the method below, so I'm unable to tell.
+
+Here are the steps
+
+1. Install the Windows 10 subsystem for Linux, following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/).
+2. If you have previously cloned the repository using the normal Git bash, you will need to clean up the line endings. If you have cloned it after 20th of August 2016, you are likely fine. To clean up the line endings do the following
+ 1. Make sure that you have no changes you haven't committed by running `git status`, if you do commit them first
+ 2. From within the Git bash run īgit rm --cached -r .`
+ 3. Followed by `git reset --hard`
+3. Start the "Bash On Ubuntu On Windows" from the start menu
+4. With the bash open, navigate to your git checkout. The harddisk can be accessed from `/mnt` for example `/mnt/c` for the `c:\` drive.
+5. Run `sudo util/install_dependencies.sh`.
+6. After a while the installation will finish, and you are good to go
+
+**Note** From time to time, the dependencies might change, so just run `install_dependencies.sh` again if things are not working.
+
+
### Windows (Vista and later)
1. If you have ever installed WinAVR, uninstall it.
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
@@ -68,12 +89,36 @@ You can also try these instructions:
3. Install [DFU-Programmer][dfu-prog].
### Linux
-Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
+
+To ensure you are always up to date, you can just run `sudo utils/install_dependencies.sh`. That should always install all the dependencies needed.
+
+You can also install things manually, but this documentation might not be always up to date with all requirements.
+
+The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
+
+```
+build-essential
+gcc
+unzip
+wget
+zip
+gcc-avr
+binutils-avr
+avr-libc
+dfu-programmer
+dfu-util
+gcc-arm-none-eabi
+binutils-arm-none-eabi
+libnewlib-arm-none-eabi
+git
+```
+
+Install the dependencies with your favorite package manager.
Debian/Ubuntu example:
sudo apt-get update
- sudo apt-get install gcc-avr avr-libc dfu-programmer
+ sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
### Docker