Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: move to old
Section
Column
width70%

Introduction

This page describes how to setup a build environment, using a Ubuntu 14.04.3 LTS 64 bit (Trusty Tahr). The same method can apply to others GNU/Linux dist like Debian or Fedora.

 


Since Qt5.6, Qt do not provides the Linux32 prebuild binaries or Linux32 Qt installer. See Linux32(i686) Qt5.6 issue part.

Column
width30%
Panel
titleIn this page
 
Table of Contents

...

Setup a build environment

Install all tools, dependencies, compiler and more which are needed for building:

...

Warning

For x86_64 architecture you still need libc6 32bits compatible for ARM toolchain use or it fails silently!

Code Block
languagepowershell
themeEmacs
sudo apt-get install libc6-i386

...

Linux32 (i686) - Qt5.6 issue

Qt5.6 is not available for download anymore, you can use the Qt5.6 packages that comes from you system:

Code Block
languagepowershell
themeEmacs
sudo add-apt-repository ppa:librepilot/tools -y
sudo apt-get update -q
sudo apt-get install -y libudev-dev \
libusb-1.0-0-dev \
libsdl1.2-dev \
python \
libopenscenegraph-dev \
qt56-meta-minimal \
qt56svg \
qt56script \
qt56serialport \
qt56multimedia \
qt56translations \
qt56tools \
qt56quickcontrols

make  arm_sdk_install

source /opt/qt56/bin/qt56-env.sh
make opfw_resource
make gcs GCS_EXTRA_CONF=osg

./build/librepilot-gcs_release/bin/librepilot-gcs

 

...




...

Get the code using Git

Choose/create a dir where you want LibrePilot code:

...

Code Block
languagepowershell
themeEmacs
git checkout next

...

Dev Tools Installation

Install development libraries and tools, these will be downloaded and automatically installed using root Makefile:

...

Code Block
languagepowershell
themeEmacs
make osg_install
make osgearth_install

...


...

Connecting your hardware

If you don't install a package previously you cannot access the hardware connected to Usb port as a normal user because access rights are missing.

...

Code Block
sudo cp package/linux/45-uav.rules /etc/udev/rules.d/45-uav.rules
sudo udevadm control --reload-rules
sudo usermod -a -G plugdev your_username

...

...


Build - Run software locally

Code Block
make opfw_resource
make gcs
./build/librepilot-gcs_release/bin/librepilot-gcs
Info

Take also a look to the Make Basics page.

...

Build package

Build a .deb package:

Tip: set after make -j(numbers of cores/threads)

...

Code Block
languagepowershell
themeEmacs
make package

Updating your local source of Librepilot

Go to the location where you have your source files ( if its the same as above it will be ~/code/librepilot )

...

Code Block
languagepowershell
themeEmacs
git pull
make package

 

 

...


...