Tested on Pi 4B, with “ubuntu-20.04-preinstalled-server-arm64+raspi.img”
CREDITS:
@obj
@abcd567
@postl
@mikkyo
NOTE:
(1) The packages librtlsdr0
and librtlsdr-dev
are available in ubuntu repository and can be installed by command apt install
. However these have a bug which kills the dump1090-fa. For this reason we will not use repository supplied packages, and build these from source code.
(2) Ubuntu considers the packages built from source-code as out dated, and during any upgrading, replaces these with those from repository. This results in failure of dump1090-fa.
I have therefore include command (sudo apt-mark hold librtlsdr0 librtlsdr-dev) at the end of step 2.1.2 to block their upgrade. However in case these get upgraded somehow, then reinstall them using the .deb
packages you have built.
1 - Install tools needed to build packages from source code.
NOTE: The command below will install large number of packaes and will take considerable time to finish. Please be patient.
$ sudo apt install cmake pkg-config debhelper dh-systemd devscripts
2 - DUMP1090-FA
2.1 - Build librtlsdr0 and librtlsdr-dev from source code
2.1.1 - Install dependencies
$ sudo apt install libusb-1.0-0-dev
2.1.2 - Clone source code, build and install librtlsdr0 & librtlsdr-dev packages
$ cd ~/
$ git clone https://github.com/steve-m/librtlsdr
$ cd librtlsdr
$ mkdir build && cd build
$ cmake ../
$ make
$ cd ../
$ dpkg-buildpackage -b
## Install librtlsdr0 and librtlsdr-dev
$ cd ../
$ sudo dpkg -i librtlsdr0_0.6_arm64.deb
$ sudo dpkg -i librtlsdr-dev_0.6_arm64.deb
## Issue following command to prevent Ubuntu from replacing above
## installed packages by packages from repository during any unattended upgrade.
$ sudo apt-mark hold librtlsdr0 librtlsdr-dev
2.2 - Build & Install dump1090-fa from source code
2.2.1 - Install dump1090-fa dependencies:
$ sudo apt install libncurses5-dev lighttpd
2.2.2 - Clone source code, build and install dump1090-fa package
$ git clone https://github.com/flightaware/dump1090
## Workaround for non-available bladeRF package
$ cd dump1090
$ sudo sed -i 's/BLADERF=yes/BLADERF=no/' debian/rules
$ sudo sed -i 's/, libbladerf-dev//' debian/control
$ sudo sed -i 's/libbladerf1 (>= 0.2016.06), //' debian/control
## Build dump1090-fa package
sudo dpkg-buildpackage -b --no-sign
## Install dump1090-fa
$ cd ../
$ sudo dpkg -i dump1090-fa_3.8.1_arm64.deb
$ sudo reboot
3 - PIAWARE
3.1 - Install dependencies
$ sudo apt install tcl8.6-dev python3-dev libz-dev
$ sudo apt install libboost-system-dev libboost-program-options-dev
$ sudo apt install libboost-regex-dev libboost-filesystem-dev
$ sudo apt install net-tools tclx8.4 tcllib itcl3
3.2 - Build & Install dependency tcl-tls
from source code.
## Install dependencies
$ sudo apt install libssl-dev tcl-dev chrpath
## Clone source code, build & Install tcl-tls
$ cd ~/
$ git clone http://github.com/flightaware/tcltls-rebuild.git
$ cd tcltls-rebuild
$ ./prepare-build.sh buster
$ cd package-buster
$ sudo dpkg-buildpackage -b --no-sign
$ cd ../
$ sudo dpkg -i tcl-tls_1.7.16-1+fa1_arm64.deb
## Issue following command to prevent Ubuntu from replacing above
## installed packages by packages from repository during any unattended upgrade.
$ sudo apt-mark hold tcl-tls
3.3 - Clone piaware source code, build package, and install package.
$ cd ~/
$ git clone http://github.com/flightaware/piaware_builder
$ cd piaware_builder
$ sudo ./sensible-build.sh bionic
## Workaround for pyvenv:
$ cd package-bionic
$ sudo sed -i 's/pyvenv $(VENV) --without-pip/$(PYTHON3) -m venv $(VENV) --without-pip/' debian/rules
$ sudo sed -i 's/python3-venv, //' debian/control
## After above Workaround, build the piaware package
$ sudo dpkg-buildpackage -b --no-sign
$ cd ../
$ sudo dpkg -i piaware_3.8.1~ubuntu1804+1_arm64.deb