aboutsummaryrefslogtreecommitdiff
path: root/docs/build_environment_setup.md
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2017-07-03 01:30:36 -0700
committerskullY <skullydazed@gmail.com>2017-07-03 01:30:36 -0700
commitd8e29b53fe5d57f2102b77f0ce9932cdb8b021b2 (patch)
tree14dd7d4c51a3d0bb046acb29ad96ca2b5f76f55b /docs/build_environment_setup.md
parentea8df568f23b79eba13ef9e914d8b1ce94688858 (diff)
downloadqmk_firmware-d8e29b53fe5d57f2102b77f0ce9932cdb8b021b2.tar.gz
qmk_firmware-d8e29b53fe5d57f2102b77f0ce9932cdb8b021b2.zip
Update a bunch of docs
Diffstat (limited to 'docs/build_environment_setup.md')
-rw-r--r--docs/build_environment_setup.md30
1 files changed, 18 insertions, 12 deletions
diff --git a/docs/build_environment_setup.md b/docs/build_environment_setup.md
index 442038a58..2282e9d13 100644
--- a/docs/build_environment_setup.md
+++ b/docs/build_environment_setup.md
@@ -1,19 +1,25 @@
1### Windows 10 1# Build Environment Setup
2 2
3#### Creators Update 3This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
4
5<!-- FIXME: We should have ARM instructions somewhere. -->
6
7# Windows 10
8
9## Creators Update
4If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). 10If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
5 11
6#### Windows Subsystem for Linux 12## Windows Subsystem for Linux
7In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. 13In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
8 14
9#### Git 15## Git
10If you already have cloned the repository on your Windows file system you can ignore this section. 16If you already have cloned the repository on your Windows file system you can ignore this section.
11 17
12You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. 18You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
13 19
14Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. 20Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
15 21
16#### Toolchain setup 22## Toolchain setup
17The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. 23The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
18 24
191. Open "Bash On Ubuntu On Windows" from the start menu. 251. Open "Bash On Ubuntu On Windows" from the start menu.
@@ -22,13 +28,13 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
224. Close the Bash command window, and re-open it. 284. Close the Bash command window, and re-open it.
235. You are ready to compile and flash the firmware! 295. You are ready to compile and flash the firmware!
24 30
25#### Some important things to keep in mind 31## Some important things to keep in mind
26* You can run `util/wsl_install.sh` again to get all the newest updates. 32* You can run `util/wsl_install.sh` again to get all the newest updates.
27* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. 33* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
28* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations 34* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
29* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. 35* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
30 36
31### Windows (Vista and later) 37# Windows (Vista and later)
321. If you have ever installed WinAVR, uninstall it. 381. If you have ever installed WinAVR, uninstall it.
332. 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**. 392. 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**.
343. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). 403. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
@@ -40,7 +46,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
40 46
41If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. 47If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
42 48
43### Mac 49# Mac
44If you're using [homebrew,](http://brew.sh/) you can use the following commands: 50If you're using [homebrew,](http://brew.sh/) you can use the following commands:
45 51
46 brew tap osx-cross/avr 52 brew tap osx-cross/avr
@@ -59,7 +65,7 @@ If you are going to flash Infinity based keyboards you will also need dfu-util
59 65
60 brew install dfu-util 66 brew install dfu-util
61 67
62### Linux 68# Linux
63 69
64To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** 70To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
65 71
@@ -91,7 +97,7 @@ Debian/Ubuntu example:
91 sudo apt-get update 97 sudo apt-get update
92 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 98 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
93 99
94### Docker 100# Docker
95 101
96If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap: 102If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
97 103
@@ -109,10 +115,10 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use
109 115
110This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash. 116This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
111 117
112### Vagrant 118# Vagrant
113If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). 119If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
114 120
115## Verify Your Installation 121# Verify Your Installation
1161. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 1221. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
1172. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 1232. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
1183. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 1243. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.