FreeBSD / RaspBSD - Installation of dump1090 (fa or mut)


#1

Has any one experience to install dump1090-mutability/dump1090-fa on FreeBSD/RaspBSD?

This morning I visited following page to download FreeBSD image for RPi
https://www.freebsdfoundation.org/freebsd/how-to-guides/installing-freebsd-for-raspberry-pi/

Was redirected to this site:
http://www.raspbsd.org/raspberrypi.html

Downloaded, unzipped,and wrote following image to microSD card
FreeBSD-armv6-12.0-RPI2-310476.img

Slipped-in the microSD card in RPi Model2, powered up, SSH and logged-in
Checked date, was some date of year 2016.
Corrected date by following command:
~ # ntpdate pool.ntp.org

Set time zone by command:
~ # tzsetup

Setup Binary Package Management Utility “Ports”:
~ # portsnap fetch
~ # portsnap extract

Installed packages
~ # pkg install git … Installed
~ # pkg instal rtl-sdr … Installed
~ # pkg install librtlsdr-dev … No packages available to install matching ‘librtlsdr-dev’ have been found in the repositories
~ # pkg install libusb-1.0-0-dev … No packages available to install matching ‘libusb-1.0-0-dev’ have been found in the repositories
~ # pkg install lighttpd … Installed

Now tried to make binary package from source of dump1090-mutability. FAILED

root@rpi2: /usr/home/raspberry # mkdir install-dump
root@rpi2: /usr/home/raspberry # cd install-dump
root@rpi2: /usr/home/raspberry/install-dump # git clone github.com/mutability/dump1090.git
Cloning into ‘dump1090’…
remote: Counting objects: 5310, done.
remote: Total 5310 (delta 0), reused 0 (delta 0), pack-reused 5310
Receiving objects: 100% (5310/5310), 6.93 MiB | 1.42 MiB/s, done.
Resolving deltas: 100% (3556/3556), done.

root@rpi2: /usr/home/raspberry/install-dump # cd dump1090
root@rpi2: /usr/home/raspberry/install-dump/dump1090 # make

make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 7: Need an operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 9: Need an operator
make: “/usr/home/raspberry/ install-dump/dump1090/Makefile” line 11: Need an operator
make: “/usr/home/raspberry/ install-dump/dump1090/Makefile” line 15: Need an operator
make: “/usr/home/raspberry/ install-dump/dump1090/Makefile” line 25: Missing dependency operator
make: “/usr/home/raspberry/ install-dump/dump1090/Makefile” line 28: Need an operator
make: “/usr/home/raspberry/ install-dump/dump1090/Makefile” line 29: Missing dependency operator
make: Unknown modifier ’ '
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 31: Missing dependency operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 34: Need an operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 38: Need an operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 39: Need an operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 41: Missing dependency operator
make: “/usr/home/raspberry/install-dump/dump1090/Makefile” line 44: Need an operator
make: Fatal errors encountered – cannot continue
make: stopped in /usr/home/raspberry/install-dump/dump1090


#2

Try “gmake”


#3

No Luck!

root@rpi2:/usr/home/raspberry/install-dump/dump1090 # gmake
gmake: Command not found.

root@rpi2:/usr/home/raspberry/install-dump/dump1090 # pkg install gmake
Installing gmake-4.2.1_1…

root@rpi2:/usr/home/raspberry/install-dump/dump1090 # gmake

gcc -DMODES_DUMP1090_VERSION=“v1.15-dev-327-gb155fdb” -O2 -g -Wall -Werror -W pkg-config --cflags librtlsdr libusb-1.0 -c dump1090.c -o dump1090.o
/ bin / sh: pkg-config: not found
/ bin / sh: gcc: not found
gmake: *** [Makefile:49: dump1090.o] Error 127


#4

Well, you’re going to have to set CC (probably to clang) and explicitly pass LIBS_RTL etc. Have you built stuff on FreeBSD before?


#5

This is all Greek to me :confused:

Have you built stuff on FreeBSD before?

NO, NEVER.
This is first time I have installed FreeBSD, or any version of BSD. I never owned or used Mac, which I understand has an OS based on BSD.


#6

There are a bunch of variables defined in the makefile (CC, LIBS_RTL, etc) that will need adjustment for your freebsd environment.

one notable thing about recent freebsd is that it’ll have clang as the default compiler, not gcc, so you’ll need to set CC=clang


#7

Thanks Oliver for prompt help. Will give it a try. For me it is like sailing in unknown waters.


#8

I have previous played with piaware code on FreeBSD for x86/amd64. I wasn’t able to get it fully working. There seemed to be issues in the FreeBSD USB stack that prevented it from sampling the receiver fast enough or regularly enough to function.


#9

Some luck today - dump1090 installed and working

Noted that the command “pkg install [application_name]” has stopped working on the RaspBSD site’s “FreeBSD-armv6-12.0-RPI2-310476.img”.
Also noted RaspBSD distros have been removed (temporarily??) from RaspBSD site.
Downloaded “FreeBSD-11.1-RELEASE-arm-armv6-RPI2.img” from freebsd.org/where.html

Format microSD card, and wrote “FreeBSD-11.1-RELEASE-arm-armv6-RPI2.img”.
Slipped microSD card into RPi Model2 and powered up and SSH.

#Synchronized clock



root@rpi2:/home/freebsd # ntpdate pool.ntp.org


#Set time zone to Canada EST



root@rpi2:/home/freebsd # tzsetup


#Installed rtl-sdr pckage



root@rpi2:/home/freebsd # pkg install rtl-sdr
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Installing pkg-1.10.1...

New packages to be INSTALLED:
        rtl-sdr: 20140210_10
Proceed with this action? [y/N]: y
Installing rtl-sdr-20140210_10...


#Tested rtl-sdr, found OK



root@rpi2:~ # rtl_test -t
Found 1 device(s):
  0:  Realtek, RTL2832U, SN: 00001003

Using device 0: Generic RTL2832U
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.


#Tried to install dump1090-mutability package, NOT AVAILABLE



root@rpi2:/home/freebsd # pkg install dump1090-mutability
pkg: No packages available to install matching 'dump1090-mutability' have been found in the repositories


#Tried to install dump1090-fa package, NOT AVAILABLE



root@rpi2:/home/freebsd # pkg install dump1090-fa
pkg: No packages available to install matching 'dump1090-fa' have been found in the repositories


**#Tried to install dump1090 (Malcom Robson) package. Got installed dump1090 Salvatore Sanfilippo (antirez) **



root@rpi2:/home/freebsd # pkg install dump1090
New packages to be INSTALLED:
        dump1090: 20150225
Proceed with this action? [y/N]: y
Installing dump1090-20150225...


#Run dump1090



root@rpi2:~ # cd /usr/local/bin/
root@rpi2:/usr/local/bin # ./dump1090 --interactive --net --net-http-port 80

Found 1 device(s):
0: Realtek, RTL2832U, SN: 00001003 (currently selected)
Found Rafael Micro R820T tuner
Max available gain is: 49.60
Setting gain to: 49.60
Exact sample rate is: 2000000.052982 Hz
Gain reported by device: 49.60

Hex    Flight   Altitude  Speed   Lat       Lon       Track  Messages Seen   .
--------------------------------------------------------------------------------
a0ee32          0         0       0.000     0.000     0     1         0 sec
a24ef0          0         0       0.000     0.000     0     1         0 sec
ab4840          0         473     0.000     0.000     48    1         1 sec
ade18c          0         468     0.000     0.000     248   1         1 sec
c055ec          0         0       0.000     0.000     0     1         1 sec
ab20e7          0         0       0.000     0.000     0     1         1 sec
c0248c          0         0       0.000     0.000     0     1         1 sec
c01734          8325      279     0.000     0.000     105   2         1 sec
c02ec7          24575     444     0.000     0.000     240   3         0 sec
^C