Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU is not available (on Raspberry Pi5!) #17

Closed
roelbroersma opened this issue May 23, 2024 · 3 comments
Closed

QEMU is not available (on Raspberry Pi5!) #17

roelbroersma opened this issue May 23, 2024 · 3 comments

Comments

@roelbroersma
Copy link

roelbroersma commented May 23, 2024

Hello,

I am using a Raspberry Pi 5 8GB. (which has a ARMv8 CPU).
I installed DietPi on it, which is running Bookworm release (Debian v12 Bookworm)

uname -a
Linux DietPi 6.6.28+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux

uname -m
aarch64

I am running Docker version 26.1.3, build b72abbb

Log of the shipfeeder docker container:

2024-05-23T23:15:43.216631000Z s6-rc: info: service s6rc-oneshot-runner: starting
2024-05-23T23:15:43.220229000Z s6-rc: info: service s6rc-oneshot-runner successfully started
2024-05-23T23:15:43.220797000Z s6-rc: info: service fix-attrs: starting
2024-05-23T23:15:43.221132000Z s6-rc: info: service libseccomp2: starting
2024-05-23T23:15:43.221260000Z s6-rc: info: service 10-container-init: starting
2024-05-23T23:15:43.227114000Z s6-rc: info: service fix-attrs successfully started
2024-05-23T23:15:43.227849000Z s6-rc: info: service legacy-cont-init: starting
2024-05-23T23:15:43.227995000Z s6-rc: info: service libseccomp2 successfully started
2024-05-23T23:15:43.232221000Z s6-rc: info: service legacy-cont-init successfully started
2024-05-23T23:15:43.232429000Z [2024-05-24 01:15:43.232][10-container-init] Starting ShipExplorer version 20240523-165129_eacf09f_main
2024-05-23T23:15:43.233901000Z s6-rc: info: service 10-container-init successfully started
2024-05-23T23:15:43.234231000Z s6-rc: info: service 40-sxfeeder: starting
2024-05-23T23:15:43.247614000Z s6-rc: info: service 40-sxfeeder successfully started
2024-05-23T23:15:43.247744000Z s6-rc: info: service 50-update-plugins: starting
2024-05-23T23:15:43.921021000Z [2024-05-24 01:15:43.920][update-plugins] Plugins haven't changed on remote repository - no need to update
2024-05-23T23:15:43.923794000Z s6-rc: info: service 50-update-plugins successfully started
2024-05-23T23:15:43.923961000Z s6-rc: info: service 60-backup-aiscatcher_bin: starting
2024-05-23T23:15:43.932214000Z s6-rc: info: service 60-backup-aiscatcher_bin successfully started
2024-05-23T23:15:43.932471000Z s6-rc: info: service sxfeeder: starting
2024-05-23T23:15:43.932711000Z s6-rc: info: service check-plugin-updates: starting
2024-05-23T23:15:43.932993000Z s6-rc: info: service check-about-updates: starting
2024-05-23T23:15:43.933865000Z s6-rc: info: service aiscatcher: starting
2024-05-23T23:15:43.937558000Z s6-rc: info: service check-plugin-updates successfully started
2024-05-23T23:15:43.942868000Z s6-rc: info: service sxfeeder successfully started
2024-05-23T23:15:43.944471000Z s6-rc: info: service check-about-updates successfully started
2024-05-23T23:15:43.945593000Z s6-rc: info: service aiscatcher successfully started
2024-05-23T23:15:43.946125000Z s6-rc: info: service legacy-services: starting
2024-05-23T23:15:43.947924000Z [2024-05-24 01:15:43.947][sxfeeder] Waiting for AIS-catcher to start...
2024-05-23T23:15:43.957522000Z s6-rc: info: service legacy-services successfully started
2024-05-23T23:15:43.964753000Z [2024-05-24 01:15:43.964][aiscatcher] Starting: /usr/local/bin/AIS-catcher -N 80 FILE /data/aiscatcher.bin GEOJSON on PLUGIN_DIR /data/plugins BACKUP 5 HISTORY 3600 PROME on STATION _XXXXXXXX_ LAT _XXXXXXX_ LON _XXXXXXXX_ SHARE_LOC on MESSAGE on REALTIME on -u 127.0.0.1 34994 -u 127.0.0.1 34995 -q -v 60 -c AB -d  _XXXXXXXX_ -gr tuner auto rtlagc ON -a 192K -go AFC_WIDE on
2024-05-23T23:15:43.977222000Z [2024-05-24 01:15:43.977][aiscatcher] AIS-catcher (build May 23 2024) v0.59-44-g3109bd37
2024-05-23T23:15:43.977342000Z [2024-05-24 01:15:43.977][aiscatcher] (C) Copyright 2021-2023 jvde-github and other contributors
2024-05-23T23:15:43.977374000Z [2024-05-24 01:15:43.977][aiscatcher] This is free software; see the source for copying conditions.There is NO
2024-05-23T23:15:43.977402000Z [2024-05-24 01:15:43.977][aiscatcher] warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2024-05-23T23:15:44.001779000Z [2024-05-24 01:15:44.001][aiscatcher] Adding plugin (/data/plugins/marinetraffic_option.pjs). Description: "add option to look up vessel details in MarineTraffic", Author: "jvde-github", version 2
2024-05-23T23:15:44.001933000Z [2024-05-24 01:15:44.001][aiscatcher] Adding plugin (/data/plugins/google_option.pjs). Description: "add option to look up location in Google Maps", Author: "jvde-github", version 2
2024-05-23T23:15:44.001998000Z [2024-05-24 01:15:44.001][aiscatcher] Adding plugin (/data/plugins/vesselfinder_option.pjs). Description: "add option to look up vessel details in VesselFinder", Author: "jvde-github", version 2
2024-05-23T23:15:44.002049000Z [2024-05-24 01:15:44.001][aiscatcher] Adding plugin (/data/plugins/shipxplorer_option.pjs). Description: "add option to look up vessel details in ShipXplorer", Author: "jvde-github", version 2
2024-05-23T23:15:44.002096000Z [2024-05-24 01:15:44.001][aiscatcher] Searching for device with SN _XXXXXXXXX_.
2024-05-23T23:15:44.077702000Z [2024-05-24 01:15:44.077][aiscatcher] Detached kernel driver
2024-05-23T23:15:44.331492000Z [2024-05-24 01:15:44.331][aiscatcher] Found Rafael Micro R820T tuner
2024-05-23T23:15:44.468976000Z [2024-05-24 01:15:44.468][aiscatcher] UDP: open socket for host: 127.0.0.1, port: 34994, filter: OFF, JSON: OFF
2024-05-23T23:15:44.469167000Z [2024-05-24 01:15:44.468][aiscatcher] UDP: open socket for host: 127.0.0.1, port: 34995, filter: OFF, JSON: OFF
2024-05-23T23:15:44.469485000Z [2024-05-24 01:15:44.469][aiscatcher] Server: reading statistics from /data/aiscatcher.bin
2024-05-23T23:15:44.469769000Z [2024-05-24 01:15:44.469][aiscatcher] Statistics: cannot read file.
2024-05-23T23:15:44.469974000Z [2024-05-24 01:15:44.469][aiscatcher] TCP Server: start thread at port 80
2024-05-23T23:15:44.470085000Z [2024-05-24 01:15:44.469][aiscatcher] HTML Server running at port 80
2024-05-23T23:15:44.470169000Z [2024-05-24 01:15:44.469][aiscatcher] Server: starting backup service every 5 minutes.
2024-05-23T23:15:44.690804000Z [2024-05-24 01:15:44.690][aiscatcher] Device    : AIS
2024-05-23T23:15:44.690914000Z [2024-05-24 01:15:44.690][aiscatcher] Settings  : rate 1536K bw 192K format CU8 tuner AUTO rtlagc ON biastee OFF buffer_count 24
2024-05-23T23:15:44.690957000Z [2024-05-24 01:15:44.690][aiscatcher] Model #0 -> (Src: 1, Grp: 1): [AIS engine v0.59] ps_ema ON afc_wide ON droop ON fp_ds OFF dsk OFF 
**2024-05-23T23:15:48.998327000Z [2024-05-24 01:15:48.998][sxfeeder] Starting: /usr/bin/sxfeeder 
2024-05-23T23:15:49.003069000Z [2024-05-24 01:15:49.002][sxfeeder] FATAL: sxfeeder cannot be run natively, and QEMU is not available. You cannot use this container
2024-05-23T23:15:49.004680000Z [2024-05-24 01:15:49.004][sxfeeder] FATAL: on this system / architecture. Feel free to file an issue at https://github.com/sdr-enthusiasts/docker-shipxplorer/issues
2024-05-23T23:15:49.006086000Z [2024-05-24 01:15:49.005][sxfeeder] FATAL: Cannot initiate feeder to ShipXplorer.**
2024-05-23T23:16:44.708984000Z [2024-05-24 01:16:44.708][aiscatcher] [AIS engine v0.59 #0-0]                 received: 0 msgs, total: 0 msgs, rate: 0 msg/s
2024-05-23T23:17:44.734391000Z [2024-05-24 01:17:44.734][aiscatcher] [AIS engine v0.59 #0-0]                 received: 0 msgs, total: 0 msgs, rate: 0 msg/s
2024-05-23T23:18:44.768503000Z [2024-05-24 01:18:44.768][aiscatcher] [AIS engine v0.59 #0-0]                 received: 0 msgs, total: 0 msgs, rate: 0 msg/s

I think it is already going wrong in the DOCKERFILE, line 28 says:
if [ "${TARGETARCH:0:3}" != "arm" ]; then KEPT_PACKAGES+=(qemu-user-static); fi && \

And line 55, which says:

    if [ "$TARGETPLATFORM" != "linux/arm/v7" ]; then \
        dpkg --add-architecture armhf; \
    fi && \

While I have an ARM v8.

lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A76

tail /proc/cpuinfo
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1

Revision : d04170
Serial : XXXXXXXXXXX
Model : Raspberry Pi 5 Model B Rev 1.0

@kx1t
Copy link
Member

kx1t commented May 28, 2024

Hi @roelbroersma --

After doing some investigation, we suspect this to be the same issue as this one: sdr-enthusiasts/docker-planefinder#34 (comment)

The (potential) solution is to add the following to your /boot/config.txt file on your Pi5 and then reboot your Pi5:

kernel=kernel8.img

See also:

Please let us know if this works so we can close the issue!

@roelbroersma
Copy link
Author

roelbroersma commented May 29, 2024

I've set:

kernel=kernel8.img

to the /boot/config.txt, saved it and rebooted the Raspberry Pi5. Then it automatically started Docker and the shipfeeder container.

Seeing the logs, it still shows:

[2024-05-29 09:49:28.036][sxfeeder] FATAL: sxfeeder cannot be run natively, and QEMU is not available. You cannot use this container
[2024-05-29 09:49:28.038][sxfeeder] FATAL: on this system / architecture. Feel free to file an issue at https://github.com/sdr-enthusiasts/docker-shipxplorer/issues
[2024-05-29 09:49:28.040][sxfeeder] FATAL: Cannot initiate feeder to ShipXplorer.

ShipFeeder is working (at least, it is getting data from the USB dongle and exporting data via the udp port) but it also worked without the kernel=kernel8.img setting. The problem is that I can not do a:

/usr/bin/get-creds

because that seems to need QEMU in some way.. Is that the only function of shipfeeder which needs QEMU ?

@kx1t
Copy link
Member

kx1t commented May 30, 2024

I have documented the potential work-arounds here: https://github.com/sdr-enthusiasts/docker-shipfeeder/blob/main/README.md#working-around-shipxplorer-issues-on-raspberry-pi-5
(see this commit: 2633bba)

Closing this issue as there is not much else we can do until ShipXplorer fixes their binary to support 16k pages on RPi5

@kx1t kx1t closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants