Downloading Required Files

This tutorial is documented running Ubuntu 16.04

Before You Begin!

These steps will walk you through downloading and installing Ubuntu 14.04. We recommend Ubuntu for standard applications but there is also support for Petalinux with instructions for installing here.

Download/Install Toolchain

Begin by making sure that you have the required tool chains for the installation. Open a terminal and execute the following commands.

sudo apt-get update
  sudo apt-get install gcc-arm-linux-gnueabihf \
  g++-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf

Now we will download the necessary files for the file system and the autopilot.

Downloading PX4 Flight Stack

If you haven't run through the ArduPilot on OcPoC™ Zynq Mini guide, make sure you have the basic required tools by opening a terminal and executing the following commands:

sudo apt-get update
sudo apt-get install git
sudo apt-get install gtkterm

Now download the necessary files for the file system and the PX4 stack (of course, you may first make a new folder, and execute these commands from there):

git clone https://github.com/PX4/Firmware.git

Before building the PX4 software, you'll need to make your username a part of the group "dialout". From a terminal, execute the following command:

sudo usermod -a -G dialout $USER

Now we have to compile the PX4 code for the OcPoC-Mini, depending on which operating system you prefer the commands are slightly different. We'll start with a stable branch of PX4 which we know is tested and ready to fly; this is generally best practice for further development. In a terminal, navigate to the PX4 source code, and execute the following terminal commands to build the PX4 executable:

Build PX4 Executable

git checkout v1.8.2
git submodule update --init --recursive
make posix_ocpoc_ubuntu

Now the PX4 executable is built and ready to go onto the SD card.