Anyone working with the new x86 Raspbian

root# dpkg -i --ignore-depends=init-system-helpers,adduser,lighttpd dump1090-fa_3.6.3_i386.deb

(Reading database ... 673 files and directories currently installed.)
Preparing to unpack dump1090-fa_3.6.3_i386.deb ...
Unpacking dump1090-fa (3.6.3) over (3.6.3) ...
Setting up dump1090-fa (3.6.3) ...
adduser: `/usr/sbin/useradd -d /usr/share/dump1090-fa -g nobody -s /bin/false -u 100 dump1090' returned error code 1. Exiting.
dpkg: error processing package dump1090-fa (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dump1090-fa
root# 

Ok you can do the following:
Execute:

usr/sbin/useradd -d /usr/share/dump1090-fa -g nobody -s /bin/false -u 100 dump1090

And check what exactly the problem is.

Maybe the binary is just at the wrong location then you might be able to create a symlink.
Anyway it seems that this system was made to be used as a livesystem only and not really made to be comaptible with a package install system :frowning:

While adapting/stripping Ubuntu Xanial to create Xenialpup, they have:

  1. Replaced Ubuntu’s “Synaptic Manager” by puppuy’s “Pet Package Manager”

  2. Removed apt and dpkg alongwith all their support infrastructure. I installed apt and dpkg and debhelper. I had to manually create and populate repository list /etc/apt/sources.list, but still neither apt-get install works, nor dpkg --install works unless workarounds are done.

Puppy-linux can be installed on USB flash or HD if a DVD is burned first and a PC is booted from DVD. The installed image has option to “change kernel”. I dont know what that means.

When I get time, I will burn a DVD, boot PC from DVD, then install xenialpup on a usb, then see if this gives any benefit in making & installing dump1090-fa. I will also explore what “change kernel” can do.

Xenialpup update Jan 14, 2019

  • Succeeded to install & run dump1090-fa
  • Succeeded to install lighttpd
  • Failed to configure and start lighttpd

Reason:
In “puppyizing” the Ubuntu Xenial, they have severely damaged infrastructure for following. Even though I installed all the stripped-out packages & dependencies, following faild to work:

  1. apt-get
  2. dpkg and dpkg-buildpackage
  3. systemd - command starting with systemctl returned command not found
  4. Commands starting with service give service not found
  5. adduser - failed miserably, gives error.

PREPARATIONS

  1. Clicked “Install” Icon on Desktop, clicked tab “Install apllications” then:

    • Clicked “Choose an SFS file from official repo” and downloaded module devx_xenialpup_7.5.sfs

    • Chose “Load and unload sfs packages using SFS load” and loaded module devx_xenialpup_7.5.sfs

  2. Updated PPM repository

  3. Installed following packages

MAKE BINARY

root# git clone https://github.com/flightaware/dump1090.git
Cloning into 'dump1090'...
... .... ....
Resolving deltas: 100% (5573/5573), done.
Checking connectivity... done.

root# cd dump1090
root# make BLADERF=no

cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -I/usr/include/ -c dump1090.c -o dump1090.o
... ... ....
... ... ....
cc -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o  -lpthread -lm -lrt -lncurses

TEST

root# cd dump1090
root# ./dump1090

Sun Jan 13 20:50:29 2019 +08  dump1090-fa  starting up.
rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000001)
Found Rafael Micro R820T tuner
rtlsdr: tuner gain set to 49.6 dB

CONFIGURE

configuration settings
Copied configuration settings from folder cloned from GitHub to xenialpup’s folder /etc/default/

cp ~/dump1090/debian/dump1090-fa.default /etc/default/dump1090-fa

Startup by init.d
Created a blank file
root# nano /etc/init.d/dump1090-fa.ini

copy-pasted following code in it:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          dump1090-fa
# Required-Start:    $remote_fs $network
# Required-Stop:     $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: dump1090 daemon (Flightaware variant)
# Description:       Receives ADS-B messages from a RTLSDR dongle and decodes it.
### END INIT INFO

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="dump1090-fa daemon"
NAME=dump1090-fa
DAEMON=/usr/bin/$NAME
ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME.ini
DUMP1090_USER=""
LOGFILE="/var/log/dump1090-fa.log"

# Read configuration variable file
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

#Combine arguments
ARGS=" \
    $RECEIVER_OPTIONS \
    $DECODER_OPTIONS \
    $NET_OPTIONS \
    $JSON_OPTIONS \
    $PIAWARE_DUMP1090_LOCATION_OPTIONS \
    --write-json /run/dump1090-fa \
    --quiet "


#Create directory if not existing
DIR="/run/dump1090-fa"
if [[ ! -e $DIR ]]; then
    mkdir $DIR
    chmod 0755 $DIR
fi


# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
	# Return
	#   0 if daemon has been started
	#   1 if daemon was already running
	#   2 if daemon could not be started


	start-stop-daemon --start --quiet --pidfile $PIDFILE  --exec $DAEMON --test > /dev/null \
		|| return 1

 
        # create logfile with the appropriate permissions if not already there
        touch $LOGFILE
        

	start-stop-daemon --start --quiet --pidfile $PIDFILE  --make-pidfile --background --no-close --exec $DAEMON -- \
		$ARGS >>$LOGFILE 2>&1 \
		|| return 2
        sleep 1
}

#
# Function that stops the daemon/service
#
do_stop()
{
	# Return
	#   0 if daemon has been stopped
	#   1 if daemon was already stopped
	#   2 if daemon could not be stopped
	#   other if a failure occurred
	start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON
	RETVAL="$?"
	[ "$RETVAL" = 2 ] && return 2
        sleep 1
	# Many daemons don't delete their pidfiles when they exit.
	rm -f $PIDFILE
	return "$RETVAL"
}

case "$1" in
  start)
	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
	do_start
	case "$?" in
		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
	esac
	;;
  stop)
	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
	do_stop
	case "$?" in
		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
	esac
	;;
  status)
	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
	;;
  restart|force-reload)
	log_daemon_msg "Restarting $DESC" "$NAME"
	do_stop
	case "$?" in
	  0|1)
		do_start
		case "$?" in
			0) log_end_msg 0 ;;
			1) log_end_msg 1 ;; # Old process is still running
			*) log_end_msg 1 ;; # Failed to start
		esac
		;;
	  *)
		# Failed to stop
		log_end_msg 1
		;;
	esac
	;;
  *)
	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
	exit 3
	;;
esac

:


#

.
.

Made file dump1090-fa.ini executable and updated rc.d

chmod +x /etc/init.d/dump1090-fa.ini

sudo update-rc.d dump1090-fa.ini defaults

.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE
CLICK AGAIN TO SEE FULL SIZE

.

LIGHTTPD NOT WORKING

Installed from PPM
lighttpd_1.4.35

Added to startup
lighttpd -f /etc/lighttpd/lighttpd.conf

Fails, user www-data and group www-data dont exist
Tried to add manually using adduser and addgroup, gives error messages

Manually made entries in files /etc/passwd and /etc/group no success.
Xenialpup has its own Webserver “Hiawatha”, but I could not figure-out how to configure it for dump1090-fa.

Details of Xenialpup’s Provided Web Server “Hiawatha”

https://en.wikipedia.org/wiki/Hiawatha_(web_server)

https://www.hiawatha-webserver.org/howto

Config file

root# cat /etc/hiawatha/hiawatha.conf

ServerId = webuser
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
	Port = 80
	Interface = 127.0.0.1
}

Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

#add this stuff to get a perl script working (pplog)...
#QUISP has a binary executable CGI named 'quisp.bin'...
MimetypeConfig = /etc/mime.types
#CGIhandler = /usr/bin/perl:pl
CGIextension = pl,bin
ExecuteCGI = yes
#QUISP puts %0D, %0A (carriage-return, line-feed) chars in the url
#(v128), to allow chars below ascii 32 need this...
SecureURL = no

.

List of files in folder /root/.packages/builtin_files/hiawatha

/etc/hiawatha/cgi-wrapper.conf
/etc/hiawatha/hiawatha.conf
/etc/hiawatha/httpd.confORIG
/etc/hiawatha/mimetype.conf
/etc/hiawatha/php-fcgi.conf
/root/Web-Server/hiawatha.htm
/root/Web-Server/index.html
/usr/bin/ssi-cgi
/usr/sbin/cgi-wrapper
/usr/sbin/hiawatha
/usr/sbin/hiawatha.run
/usr/sbin/newroot
/usr/sbin/php-fcgi
/usr/sbin/wigwam
/usr/share/doc/hiawatha.htm

Any progress on integration of dump1090-fa/SkyView Map with Xenialpup’s webserver “Hiawatha”?

@TomNJerry

This is the progress: :frowning_face: :rage:

spinny

.
.

UPDATE XENIALPUP - Jan 15

(1) Copied over folder public_html from cloned source to /usr/share/

root# mkdir  /usr/share/dump1090-fa
root# cp -r dump1090/public_html  /usr/share/dump1090-fa/html

.

(2) Downloaded rtl-sdr.rules from github/osmocom/rtl-sdr

root# wget -O  /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules"

.

(3) Created missing directory /run/dump1090-fa

root# ls /run/dump1090-fa
ls: cannot access '/run/dump1090-fa': No such file or directory

root# mkdir /run/dump1090-fa

#After one minute:
root# ls /run/dump1090-fa
aircraft.json  history_91.json  receiver.json

.

(4) Modified /etc/hiawatha/hiawatha.conf. as shown in red rectangle in screenshot below:

CLICK ON SCREENSHOT TO SEE LARGER SIZE

.

(5) Opened Browser and loaded page localhost .
SkyView is there, but with perpetual spinning wheel :angry: :rage:

.
CLICK ON SCREENSHOT TO SEE LARGER SIZE
CLICK AGAIN TO SEE FULL SIZE

You need the /data in the webserver root directory via an alias.
After short google i believe you need this line:
Alias = /data:/run/dump1090-fa

Also note that the run folder will need to be created again after restart.
I would recommend just using the dump1090-fa systemd service file, that creates a run directory i believe and takes care of starting.

The path to the service file is:

/lib/systemd/system/dump1090-fa.service

You just need to change the path in the ExecStart line. (or you copy the executable to where it normally is)
The rest should be good to go.
Basically you just create the file or copy it over from the git directory, it’s located in debian/dump1090-fa.service

then you run systemctl enable dump1090-fa so it is started automatically.

edit: why did the forum turn :angry: :rage: into :rage: :rage: when i quoted you? :slight_smile: curious.

Yes I created a symlink for dump1090-fa/data by command ln -s /run/dump1090-fa /dump1090-fa/data , but did it not help. Thanks for alternate solution, I will now add Alias = /data:/run/dump1090-fa in the file /etc/hiawatha/hiawatha.conf and see.

.

Yes I know that, and will finally add command mkdir /run/dump1090-fa in the init file of dump1090-fa, so that this folder will be created at every boot.

I have already tried using systemd and file dump1090-fa.service by copying over dump1090-fa.service file from cloned source-code to /lib/systemd/system/dump1090-fa.service, but this did NOT work in Xenialpup as it lacks systemd, and any returns “systemctl: command not found” . For that reason I have created an init file `/etc/init.d/dump1090-fa (see post #204 ). Now the dump1090-fa is atarted at boot by this init script.

1 Like

Webservers will generally not follow symlinks for security reasons.

Oh right no systemd.
Loads of fun.

THANK YOU.
That did the trick :smile:

CLICK ON SCREENSHOT TO SEE LARGER SIZE

.
.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE

Such good work done by all in this thread and forum and enjoy your continuous contributions @abcd567. Was given two old HP laptops. Thinking they would be great vehicle for dedicated x86 Raspbian box running dmp1090 and piaware. Problem: can’t boot from USB on laptop so my x86 Raspbian stick is useless. Tried removing my laptop drive and cloning my PC drive…like you do when adding a new SSD to a pc. Won’t boot and error is as described on the web. Anyone know what kind of image can i put on laptop hardrive that will boot on laptop?

To rephrase, anyone know how to get my x86 Raspbian bootable off the laptop drive.

Xenialpup update Jan 17:

(1) Following funtion was added to file /etc/init.d/dump1090-fa

dir="/run/dump1090-fa"
if [[ ! -e $dir ]]; then
    mkdir $dir
fi

.

CLICK ON SCREENSHOT TO SEE LARGER SIZE


.

(2) In file /etc/hiawatha/hiawatha.conf :

following chunck of code:

#WebsiteRoot = /root/Web-Server
WebsiteRoot = /usr/share/dump1090-fa/html
Alias = /data:/run/dump1090-fa

was changed to:

WebsiteRoot = /root/Web-Server
Alias = /dump1090-fa:/usr/share/dump1090-fa/html

and a symlink named data was created in folder /usr/share/dump1090-fa/html


root# ln -s /run/dump1090-fa /usr/share/dump1090-fa/html/data

Reason for Symlink:
After restoring Website root to original, the Alias = /data:/run/dump1090-fa stopped working. Tried following Alias, but Hiawatha wont accept an Alias with path or trailing slash in left part:
Alias = /dump1090-fa/data: /run/dump1090-fa/
Creation of Symlink in folder /usr/share/dump1090-fa/html to /run/dump1090-fa solved the problem

.
CLICK ON SCREENSHOT TO SEE LARGER SIZE

.

(3) Made webserver automatically start at boot.

The webserver “Hiawatha” by default does not start at boot, and is to be started manually. To start it at boot, creating its init script file in folder /etc/init.d failed to start it at boot, although the init file was made executable, and updated rc.d defaults.

Finally succeeded by creating a Symlink to the hiawatha’s executable file in folder /root/Startup.

ln -s /usr/sbin/hiawatha /root/Startup

.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE

.
.

CLICK ON SCREENSHOT TO SEE LARGER SIZE

Xenialpup: Attempt to Build Piaware .deb Package

FAILED :angry: :rage:

1 - Prepration

1.1 - Installed following packages via PPM (Puppy Package Manager)

  • systemd_229
  • devscripts_2.16.2ubuntu3
  • build-essential_12.1ubuntu2
  • debhelper_9.20160115
  • autoconf_2.69-9
  • python3-venv_3.5.1-3
  • virtualenv_15.0.1+ds
  • tclx8.4_8.4.1-1
  • tcllib_1.17-dfsg-1
  • tcl-tls_1.6.7+dfsg-1
  • itcl3_3.4.3-1
  • net-tools_1.60

1.2 - Following packages are not available in PPM. Downloaded from links given with each package.

2 - Cloning Source-code & Building Package

root# git clone https://github.com/flightaware/piaware_builder.git
root# cd piaware_builder
root# ./sensible-build.sh xenial

Retrieving v3.6.3 from https://github.com/flightaware/piaware.git
... ... ...
Ok, package is ready to be built in ./package-xenial
root# cd package-xenial
root# dpkg-buildpackage -b -d

dpkg-buildpackage: source package piaware
dpkg-buildpackage: source version 3.6.3~ubuntu1604+1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by FlightAware build automation <adsb-devs@flightaware.com>
dpkg-buildpackage: host architecture i386
 dpkg-source --before-build package-xenial
 debian/rules clean
dh clean --with=systemd
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/root/piaware_builder/package-xenial'
dh_auto_clean -D tcllauncher
dh_auto_clean -D dump1090
	cd dump1090
	make -j1 clean
make[2]: Entering directory '/root/piaware_builder/package-xenial/dump1090'
rm -f *.o compat/clock_gettime/*.o compat/clock_nanosleep/*.o dump1090 view1090 faup1090 cprtests crctests convert_benchmark
Package libbladeRF was not found in the pkg-config search path.
Perhaps you should add the directory containing `libbladeRF.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libbladeRF' found
make[2]: Leaving directory '/root/piaware_builder/package-xenial/dump1090'
	cd /root/piaware_builder/package-xenial
make[1]: py3versions: Command not found
cd mlat-client && /usr/bin/ setup.py clean -a
/bin/sh: /usr/bin/: Is a directory
debian/rules:70: recipe for target 'clean_mlat-client' failed
make[1]: *** [clean_mlat-client] Error 126
make[1]: Leaving directory '/root/piaware_builder/package-xenial'
debian/rules:88: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

root#

Don’t think it will make much difference but you had bladeRF enabled.

This is the only occurance of bladeRF in file “rules”
piaware_builder/package-xenial/debian/rules

.

There is the no occurance of bladeRF in file “control”
piaware_builder/package-xenial/debian/control

.
.

As I can guess from error messages, the problem which caused process to abort is with mlat-client

.

Hmm i see. Strange that it would still mention bladeRF.

py3versions is not installed which should come with python3 or python3.7

It found bladeRF in another file:
piaware_builder/package-xenial/dump1090/debian/control

What for dump1090 folder is existing inside piaware_builder/package-xenial/ folder???

I have already installed these packages before I issued dpkg-buildpackage command

  • python3-venv_3.5.1-3
  • python3-dev_3.5.1-3_i386.deb

No clue how piaware_builder works :slight_smile:
Anyway the real problem is the missing program py3versions which comes with python3 (or maybe you have python version that doesn’t have that assistance program and you just need to install py3versions)

Anyway without systemd it’s not gonna build i believe, probably a dependency.