RockPi 4B Experiments

Revised Installation aimed without a script which utilizes dump1090-fa, dump978-fa, skyaware978, piaware & precanned USB GPS support:

BASE IMAGE: Rock4/downloads - Radxa Wiki
#Armbian_5.67_Rockpi4b_Debian_stretch_default_4.4.154_desktop_20181210-gpt

sudo apt -y remove --purge bluez avahi-daemon x11-common cups
sudo apt -y autoremove
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
sudo dpkg --add-architecture armhf
sudo apt update
sudo sh -c "echo 'GOVERNOR=\"performance\"' > /etc/default/cpufrequtils"
sudo systemctl restart cpufrequtils
sudo apt -y dist-upgrade
sudo apt -y autoremove
sudo apt clean

## INSTALL 32-BIT AND GPS SUPPORT (w/GPSD BUG OVERRIDE) ##
sudo apt install -y libc6:armhf libstdc++6:armhf libusb-1.0-0:armhf gpsd gpsd-clients python-gps
sudo sed -i '/ListenStream=\[::1\]:2947/d' /lib/systemd/system/gpsd.socket  #IPV6 LOOPBACK BUG
sudo systemctl enable gpsd

## INSTALL DUMP1090-FA // DUMP978-FA ##
sudo apt install -y build-essential debhelper dh-systemd libboost-system-dev libboost-program-options-dev \
libboost-regex-dev libboost-filesystem-dev libsoapysdr-dev soapysdr-module-rtlsdr lighttpd git \
librtlsdr-dev pkg-config libncurses5-dev libbladerf-dev fakeroot
git clone --depth 1 https://github.com/flightaware/dump1090.git
git clone --depth 1 https://github.com/flightaware/dump978.git
cd dump1090
dpkg-buildpackage -b
cd ../dump978
dpkg-buildpackage -b
sudo dpkg -i ../dump1090-fa_*.deb ../dump978-fa_*.deb ../skyaware978_*.deb
cd

## INSTALL PIAWARE ##
sudo apt install -y git devscripts build-essential debhelper tcl8.6-dev autoconf \
python3-dev python3-venv virtualenv dh-systemd zlib1g-dev tclx8.4 tcllib tcl-tls \
itcl3 net-tools libboost-system-dev libboost-program-options-dev libboost-regex-dev \
libboost-filesystem-dev 
git clone https://github.com/flightaware/piaware_builder.git 
cd piaware_builder 
./sensible-build.sh stretch
cd package-stretch
rm -rf cx_Freeze-5.1.1
git clone https://github.com/anthony-tuininga/cx_Freeze.git cx_Freeze-5.1.1 && cd $_
git reset --hard 511f473
cd ../
sudo dpkg-buildpackage -b
sudo dpkg -i ../piaware_3.7.2_*.deb 
cd

sudo systemctl stop dump1090-fa dump978-fa piaware

## ENABLE DUMP978 ##
sudo piaware-config uat-receiver-type sdr 
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/install.sh)"
sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/graphs1090/master/install.sh)"

# Adjust config files to meet your goals
sudo nano /etc/default/dump1090-fa
sudo nano /etc/default/dump978-fa

< Reboot, Pray >

The RockPi 4B will handle this setup without a struggle using the above method (while running dump978 and gpsd), tested up to 2500 msg/sec:
sudo nano /etc/default/airspy_adsb

OPTIONS= -v -f 1 -e 9.0 -w 3
SAMPLE_RATE= 24
NET= -c localhost:30004:beast
1 Like

Most piaware-config options affecting things other than piaware itself work by generating config files for other packages. This is only done on the piaware sdcard image; if you’ve done a package install, the assumption is that you’re going to configure everything yourself directly.

1 Like

Yup, old dog, new tricks adage works well here. I came back to a helluva an advancement after a couple year siesta. :yum:

Cut me some slack as I’m here to help push the limits again, in hopes some benefit in the process and learn to think outside the box.

Bear with me, as the last thing I worked with in this realm was mutability. You’ve done great, all caught up now for the most part with ya’ll’s help, thank you.

Time for me to go back under the rock I crawled out from I guess.

Thanks for the sharing.

This is tom from the Radxa team. If you have any other questions about ROCK Pi 4B. I can reply here.

Been playing around with the RockPi4, seems to have lots of power to spare.
Does anyone know how to get chip info /processor, etc?
/proc/cpuinfo doesn’t provide the usual Hardware/Revision/Model, but gives the serial, but I can’t figure out how to decode it.
I also see vcgencmd isn’t present, is there some other equiv command for getting voltages? Does throttling even apply on this board?

$ cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 1
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 2
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 3
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 4
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 2

processor	: 5
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 2

Serial		: 1fe31943b08a90d0

The RockPi 4 uses a Rockchip RK3399 with 6 cores - 2 big, 4 little.

You might be able to get cpu stats from querying sysfs:

cat /sys/class/thermal/thermal_zone0/temp

should give you cpu temperature.

cat /sys/class/regulator/regulator.7/microvolts

should give you the cpu voltage.

From what I can gather only the 2 big cores are thermally throttled. I have no idea whether it throttles for voltage. You’ll probably have better luck asking in the rock pi forum for more hardware specific stuff.

Please do share if you get it figured out. I’ve been running the RockPi 4 solid since I wrote the initial thread and it’s been running perfect.

This does work, however I haven’t been able to figure out the correct voltage capture method yet. That said, very little time invested trying.

Solid little board this has been thus far. Still running Airspy (24SR, OPTIONS= -v -f 2 -e 9.92 -w 3 -x -t 600) on 1090, RTL-SDR v3 for 978 along with GPS unit all on the same board feeding FA, FR24, Airnav, PF and ADSBExchange no issues whatsoever with MLAT or other hiccups.

Well I found dmidecode, but it doesn’t work on the RockPi.
I found some others, lshw, hwinfo, lscpu, lspci, and the craziest, inxi.
All can be installed with apt-get, inxi has a bunch of requirements (inxi --recommends will show them).

$ inxi -fFx
System:    Host: rockpi Kernel: 4.4.154-107-rockchip-g30bda5feca56 aarch64 bits: 64 compiler: gcc v: 7.3.1 Console: tty 0 
           Distro: Debian GNU/Linux 10 (buster) 
Machine:   Type: ARM Device System: ROCK PI 4B details: N/A serial: 1fe31943b08a90d0 
CPU:       Topology: 6-Core (2-Die) model: N/A variant-1: cortex-a53 variant-2: cortex-a72 bits: 64 type: MCP MCM arch: ARMv8 
           rev: 4 bogomips: 0 
           Speed: 1800 MHz min/max: 408/1416:1800 MHz Core speeds (MHz): 1: 1416 2: 1416 3: 1416 4: 1416 5: 1800 6: 1800 
           Features: aes asimd crc32 evtstrm fp pmull sha1 sha2 
Graphics:  Device-1: display-subsystem driver: rockchip_drm v: N/A bus ID: N/A 
           Device-2: rk3399-dw-hdmi driver: dwhdmi_rockchip v: N/A bus ID: N/A 
           Device-3: malit860 driver: mali v: N/A bus ID: N/A 
           Display: tty server: X.org 1.20.4 driver: modesetting tty: 164x24 
           Message: Advanced graphics data unavailable in console. Try -G --display 
Audio:     Device-1: simple-audio-card driver: asoc_simple_card bus ID: N/A 
           Device-2: rk3399-dw-hdmi driver: dwhdmi_rockchip bus ID: N/A 
           Device-3: simple-audio-card driver: asoc_simple_card bus ID: N/A 
           Sound Server: ALSA v: k4.4.154-107-rockchip-g30bda5feca56 
Network:   Device-1: rk3399-gmac driver: rk_gmac_dwmac v: N/A port: N/A bus ID: N/A 
           Device-2: wlan-platdata driver: wlan_platdata v: N/A bus ID: N/A 
           IF-ID-1: eth0 state: down mac: 1e:e9:e4:45:cb:57 
           IF-ID-2: wlan0 state: up mac: 6c:21:a2:14:c9:4a 
Drives:    Local Storage: total: 133.82 GiB used: 11.04 GiB (8.3%) 
           ID-1: /dev/mmcblk1 model: SOD16G size: 14.58 GiB 
           ID-2: /dev/nvme0n1 model: N/A size: 119.24 GiB 
Partition: ID-1: / size: 13.79 GiB used: 10.96 GiB (79.5%) fs: ext4 dev: /dev/mmcblk1p5 
           ID-2: /boot size: 499.7 MiB used: 80.3 MiB (16.1%) fs: vfat dev: /dev/mmcblk1p4 
Sensors:   Message: No sensors data was found. Is sensors configured? 
Info:      Processes: 260 Uptime: 11h 49m Memory: 3.72 GiB used: 599.8 MiB (15.7%) Init: systemd runlevel: 5 Compilers: 
           gcc: 8.3.0 Shell: bash v: 5.0.3 inxi: 3.0.32

Any local shops in the USA selling the RockPi?

I ordered mine from China. Took a couple weeks.

Got a rockpi4B yesterday from Amazon. They have them in stock with two day delivery.

The current image provided by Radxa is now rockpi4-debian-stretch-desktop-arm64-20190730_2022-gpt.img.gz

Using that image and the instructions in post 20 resulted in an “error code 1” message while running
“apt dist-upgrade”. The last few lines are listed below. Any help with resolving this would be appreciated.

BTW how do you put text in the scrolled text box?


Preparing to unpack …/44-libgl1_1.1.0-1_arm64.deb …
Unpacking libgl1:arm64 (1.1.0-1) …
Preparing to unpack …/45-libgles2-mesa_18.3.6-2+deb10u1_arm64.deb …
Unpacking libgles2-mesa:arm64 (18.3.6-2+deb10u1) over (13.0.6-1+b2) …
Selecting previously unselected package libgles2:arm64.
Preparing to unpack …/46-libgles2_1.1.0-1_arm64.deb …
Unpacking libgles2:arm64 (1.1.0-1) …
dpkg: error processing archive /tmp/apt-dpkg-install-pzuayk/46-libgles2_1.1.0-1_arm64.deb (–unpack):
trying to overwrite ‘/usr/lib/aarch64-linux-gnu/libGLESv2.so.2’, which is also in package libmali-rk-midgard-t86x-r14p0:arm64 1.6-2
Preparing to unpack …/47-libglapi-mesa_18.3.6-2+deb10u1_arm64.deb …
Unpacking libglapi-mesa:arm64 (18.3.6-2+deb10u1) over (13.0.6-1+b2) …
Errors were encountered while processing:
/tmp/apt-dpkg-install-pzuayk/46-libgles2_1.1.0-1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
19:12:52 linaro@rock:~$

Put 3 “backticks” on a line by themselves before and after the text that you want to show as code. -```

looks like this, in practice

It’s the key below the ESC key on most US keyboards - the one with the tilde (~).

@ca249
@jafrank

An alternate to placing 3 backticks ``` above and 3 backticks ``` below the chunk of code, place [code] above and [/code] below the chunk of code.

## this is comment
sudo nano /etc/fr24feed.ini 

did you try sudo by chance?

Thanks guys “plus > 20 chars”

Many times.

After booting to the distro image:
changed password
changed hostname
edited /etc/hosts
set timezone
set locale
edited .bashrc
reboot
Then started your commands.
I did not change the governor because I do not have a heatsink/fan yet. This thing runs warm.

I did all this several times with the distro image and also an image that seems to be the same version
you used originally, but it has a slightly different filename. I found it out on a 3rd party mirror site.
I also tried staying with stretch with each image. All these attempts end with ‘error code 1’ from
‘sudo apt dist-upgrade.’

18:01:52 linaro@rock:~$ sudo apt -y dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  dh-python libcryptsetup4 libdns-export162 libegl1-mesa libgbm1 libgcr-3-common libgdbm3 libgl1-mesa-glx libgles2-mesa libglew2.0 libicu57
  libisc-export160 libjim0.76 liblogging-stdlog0 libpcre16-3 libperl5.24 libprocps6 libpython3.5-minimal libpython3.5-stdlib libsodium18
  libssl1.0.2 libvte-common libvte9 libwayland-egl1-mesa libwayland-server0 libxcb-xfixes0 pkg-config python3-distutils python3-lib2to3
  python3.5 python3.5-minimal x11proto-dri2-dev x11proto-dri3-dev x11proto-gl-dev x11proto-present-dev x11proto-randr-dev x11proto-render-dev
  x11proto-resource-dev x11proto-scrnsaver-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86bigfont-dev x11proto-xf86dri-dev
  x11proto-xinerama-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libcurl3 libllvm3.9 libsensors4 libxatracker2
The following NEW packages will be installed:
  dirmngr fdisk fonts-glyphicons-halflings fonts-quicksand gcc-8-base gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server

.....

Selecting previously unselected package libglx-mesa0:arm64.
Preparing to unpack .../39-libglx-mesa0_18.3.6-2+deb10u1_arm64.deb ...
Unpacking libglx-mesa0:arm64 (18.3.6-2+deb10u1) ...
Preparing to unpack .../40-mesa-utils_8.4.0-1+b1_arm64.deb ...
Unpacking mesa-utils (8.4.0-1+b1) over (8.3.0-3) ...
Preparing to unpack .../41-libglu1-mesa_9.0.0-2.1+b3_arm64.deb ...
Unpacking libglu1-mesa:arm64 (9.0.0-2.1+b3) over (9.0.0-2.1) ...
Preparing to unpack .../42-libgl1-mesa-glx_18.3.6-2+deb10u1_arm64.deb ...
Unpacking libgl1-mesa-glx:arm64 (18.3.6-2+deb10u1) over (13.0.6-1+b2) ...
Selecting previously unselected package libglx0:arm64.
Preparing to unpack .../43-libglx0_1.1.0-1_arm64.deb ...
Unpacking libglx0:arm64 (1.1.0-1) ...
Selecting previously unselected package libgl1:arm64.
Preparing to unpack .../44-libgl1_1.1.0-1_arm64.deb ...
Unpacking libgl1:arm64 (1.1.0-1) ...
Preparing to unpack .../45-libgles2-mesa_18.3.6-2+deb10u1_arm64.deb ...
Unpacking libgles2-mesa:arm64 (18.3.6-2+deb10u1) over (13.0.6-1+b2) ...
Selecting previously unselected package libgles2:arm64.
Preparing to unpack .../46-libgles2_1.1.0-1_arm64.deb ...
Unpacking libgles2:arm64 (1.1.0-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-pzuayk/46-libgles2_1.1.0-1_arm64.deb (--unpack):
 trying to overwrite '/usr/lib/aarch64-linux-gnu/libGLESv2.so.2', which is also in package libmali-rk-midgard-t86x-r14p0:arm64 1.6-2
Preparing to unpack .../47-libglapi-mesa_18.3.6-2+deb10u1_arm64.deb ...
Unpacking libglapi-mesa:arm64 (18.3.6-2+deb10u1) over (13.0.6-1+b2) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-pzuayk/46-libgles2_1.1.0-1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
19:12:52 linaro@rock:~$ 

[spoiler][/spoiler] makes 19 characters and is invisible when posted. Try it. :slight_smile:

1 Like

These are the real life hacks

Interesting. I’m out of town, but when I get back after a few days I’ll dig my spare RockPi out with the latest Radxa release and see where it goes and post back. I still have my original (built using the instructions I pasted above) in full production and havent had to touch it since…It’s been as solid as they come using an Airspy R2 on Dump1090-fa, Dump978-fa using and RTL-SDR radio and the USB GPS without issue. Hopefully I can reproduce and we’ll work through it. Impossible to guess without plowing through it myself.

Thanks for the input - so far I couldn’t be happier with this SBC since I know the RPI 4 cant handle the USB throughput that this thing does with dual controllers - but… it takes a little work to get there obviously.

For cooling, I nabbed one of these heatsinks, but not sure if they still sell them:

This is a packaging error (or perhaps an incompatible combination of package repositories); short of waiting for an upstream fix or fixing the packaging yourself, there’s not much that you can do other than try removing one or the other of those packages (libgles2 and libmali-rk-midgard-t86x-r14p0) if they’re not needed on your install.