piaware
piaware copied to clipboard
Exploring the possibility to run PiAware on FreeBSD
I am interested in trying PiAware on my Raspberry Pi which is running FreeBSD-arm, and exploring the possibility to port PiAware to FreeBSD. I would like to know if there's a more generic build tool, or the requirements of successfully building a standalone PiAware and the required dependencies. Thanks!
You might be happy (and surprised) to know Flight Aware uses FreeBSD to run many components of their system! Check out this edition of the FreeBSD journal regarding Flight Aware: https://www.freebsdfoundation.org/past-issues/globally-accessible-freebsd
Some really good points are made in there about how FreeBSD can be improved.
It would be awesome to have FreeBSD and piaware running together. I don't see much of an issue with it, as this is mostly a tcl app.
It's good to know that FlightAware loves my favourite system! :smiley:
From my understanding, piaware_builder is just for identifying the platform and setting up dependencies, and is not necessary for this circumstance, is that correct?
I will try building on FreeBSD then, and will post results and questions here.
hi @yzgyyang,
Not 100% certain, but by looking at that repo, that's my guess, too. Looks like it makes the actual 'binary' that would be used on the pi running debian.
Yes, piaware_builder
handles assembling the various bits needed when building the debian package (the source is spread over a few repositories)
In terms of what's needed there are three main parts:
-
piaware itself. This is the main tcl driver program. It assumes that it's being started from
tcllauncher
(thepiaware
binary is actually tcllauncher) so you'll want to build that too. https://github.com/flightaware/tcllauncher -
faup1090. This is a C program that receives the raw messages and turns them into summary reports. It is built from https://github.com/flightaware/dump1090/ ("make faup1090") and piaware expects it to be in
/usr/lib/piaware/helpers/faup1090
-
fa-mlat-client. This is a python program from https://github.com/mutability/mlat-client. The Debian packaging uses cxfreeze to build a self-contained binary of this to avoid system python version skew problems, but you don't have to do that. piaware expects it to be in
/usr/lib/piaware/helpers/fa-mlat-client
I guess you will want to build some rc scripts etc for it too.
There are likely to be debian- or linux-specific quirks in the code itself because it's not usually run on other things; let me know what you run into and I can fix those up.
Hi @mutability , thanks for the lengthy reply!
the piaware binary is actually tcllauncher
So both piaware and tcllauncher needs to be built, is that correct? Also I am not sure how to build piaware (make
?).
- faup1090
- fa-mlat-client
PS: Such tools seem to be already available in FreeBSD pkg/ports systems. I am building it manually anyways since piaware needs it to be inside helpers/
. (Been wondering if symlinks will work with the official pkgs, but will try that later)
piaware doesn't have a build step as such, since it's all tcl; you should be able to "make install" to put everything in the right place.
@mutability Your instruction is really helpful, I managed to build everything successfully. Some modifications need to be made since FreeBSD doesn't have iptables
equivalent (and similar issues). Will post the progress here soon.
FreeBSD doesn't have iptables equivalent (and similar issues)
In programs/piaware/helpers.tcl
, most of the Linux web commands are not available in FreeBSD, and since I am not really familiar with Linux and TCL, it could take a while until I figure out the equivalents and have a version of this code that could run on FreeBSD.
What "linux web commands"?
Sorry, posted the file wrong, it's all the commands in package/fa_sysinfo.tcl
.
Ah, yeah, those will all need reimplementing
None are really critical, they're mostly just health info, piaware can survive without it