[UPDATE: 17th May 2016] While the method below can still be used to build from source, PhracturedBlue has release a Docker container that contains the build environment with a GUI to ease the process. Find the wiki documentation about it here.
Alternatively, if you do not want to build from source yourself, compiled versions can be found on the Test Builds page on deviationtx.com.
Let’s walk through the process of building DeviationTX from source. You’ll need to do this if you have upgraded your Devo7e processor as outlined here. Again you will need to make sure you have installed the items that I listed here.
Setup and clone Git repository
First thing we need to do is to create an account on GitHub. From there we then have the choice to either
Clone the Deviation code. Forking allows us to maintain a copy of the code that we can edit for our own preferences, but we will need to deal with having to do upstream pull requests and potential merge conflicts as the main codebase is updated by the DeviationTX team. In this post we’ll talk about cloning only, which assumes that you are happy to take the default options as setup by the team, or if you make changes, you will need to set those options again the next time you pull the latest commit from GitHub.
In SourceTree, click on the “New Repository” button and select “Clone from URL”. Fill in “Source URL” with
https://github.com/DeviationTX/deviation.git. You can also choose to edit the paths and name or just accept the defaults. Once done, click on “Clone” and wait for everything to be copied to the path you specified.
Setup Docker build environment
When you installed Docker, it should have also installed their management tool “Kitematic”. Open this up and click on the “New” button then key in “deviation” into the search field. This will bring up the Docker container that Mike (a.k.a mwm) has nicely prepared for us. The one we want is “deviation”. He has other images, but I won’t be talking about them here. To find out more, go to his forum post here.
Click on the “Create” button for the “deviation” container and wait for the image to download and install. You will then have the “deviation” image available on the left hand side menu under “Containers”.
With the container installed we now need to configure the volume path to the source code that we cloned with Git earlier. Select the “deviation” container and click on “Settings -> Volumes -> Change”, then select the directory that you had cloned the source code into. Once done, hit the “RESTART” icon.
After the container has restarted, click on the “DOCKER CLI” button. This will bring up a terminal window that will allow you to access the command line for the deviation container. Type in
docker attach deviation and hit the “enter” key twice. You should now be inside the deviation container. Type in
make TARGET=devo7e-256 or one of the other targets that you need.
Wait for it to complete and you will have the
DFU file that you need sitting in the
src directory ready to be flashed to your transmitter. Note that if you have upgraded your processor in the 7e, you must use the Walkera Dfuse Tool and not Deviation-Uploader.
Updating to the latest commit and recompiling
When you wan to update to the latest commits by the team, you will need to first do a pull and merge into your cloned copy. Do this by clicking on “Pull”, select “origin” and “master”. Also check on “Commit merged changes immediately”, then click on “OK”.
Go back into your deviation container on Docker following the previous steps. Run
make clean and
make distclean before
Hope you’re having fun!