Hello!
I have been trying to get Nerves on a Pi 5B together with the 7" Display sold by RaspberryPi working and only had mild successes.
First of all, I made sure the setup works with vanilla Raspberry Pi OS (the screen is picked up, DM starts, touch works).
I also managed to flash a nerves livebook image to the SD card and build one myself based on the livebook example repo, including modifications to the code like adding extra processes to the supervision tree. The display gets picked up and is used for iex.
I cannot start a project created with mix nerves.new <name>
. The Pi is never reachable from the network, or does the screen light up, nothing. The status LED switches between long phases of solid green, to a short phase of solid red, which I assume means it is restarting after failing to start for some reason I have not figured out how to debug. (I did set up wifi in the config using vintagenet so it should be connecting fine)
Now, in this local livebook project I swapped out the regular rpi5 system for GitHub - nerves-web-kiosk/kiosk_system_rpi5: Experimental web kiosk for the RPi5
it boots fine, some poking around in iex reveals that i do have access to weston etc. Trying to execute weston however leads to an error that I am unable to figure out with my limited embedded linux experience.
iex(livebook@nerves-bcc1.local)8> cmd("XDG_RUNTIME_DIR=/run weston --shell=kiosk --continue-without-input &")
Date: 2025-01-30 UTC
[16:11:42.820] weston 13.0.3
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 13.0.3
[16:11:42.820] Command line: weston --shell=kiosk --continue-without-input
[16:11:42.820] OS: Linux, 6.6.64-v8-16k, #1 SMP PREEMPT Mon Jan 20 14:16:05 UTC 2025, aarch64
[16:11:42.820] Flight recorder: enabled
[16:11:42.820] warning: XDG_RUNTIME_DIR "/run" is not configured
correctly. Unix access mode must be 0700 (current mode is 0755),
and must be owned by the user UID 0 (current owner is UID 0).
Refer to your distribution on how to get it, or
http://www.freedesktop.org/wiki/Specifications/basedir-spec
on how to implement it.
[16:11:42.820] Starting with no config file.
[16:11:42.820] Output repaint window is 7 ms maximum.
[16:11:42.820] Loading module '/usr/lib/libweston-13/drm-backend.so'
[16:11:42.821] initializing drm backend
[16:11:42.821] Trying libseat launcher...
[16:11:42.822] [seatd/seat.c:39] Created VT-bound seat seat0
[16:11:42.822] [seatd/server.c:145] New client connected (pid: 301, uid: 0, gid: 0)
[16:11:42.822] [libseat/backend/seatd.c:633] Started embedded seatd
[16:11:42.822] [seatd/seat.c:170] Added client 1 to seat0
[16:11:42.822] [seatd/seat.c:480] Opened client 1 on seat0
[16:11:42.822] [libseat/libseat.c:73] Seat opened with backend 'builtin'
[16:11:42.822] [libseat/backend/seatd.c:212] Enabling seat
[16:11:42.822] libseat: session control granted
[16:11:42.823] using /dev/dri/card0
[16:11:42.823] DRM: supports atomic modesetting
[16:11:42.823] DRM: supports GBM modifiers
[16:11:42.823] DRM: does not support async page flipping
[16:11:42.823] DRM: supports picture aspect ratio
MESA-LOADER: failed to open drm-rp1-dsi: /usr/lib/dri/drm-rp1-dsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
[16:11:42.825] failed to initialize egl
[16:11:42.825] [seatd/seat.c:418] No clients on seat0 to activate
[16:11:42.860] [seatd/seat.c:524] Closed client 1 on seat0
[16:11:42.860] [seatd/seat.c:192] Removed client 1 from seat0
[16:11:42.860] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
[16:11:42.861] [seatd/client.c:471] Client disconnected
[16:11:42.861] [libseat/backend/seatd.c:645] Stopped embedded seatd
I have also tried this with different XDG_RUNTIME_DIRs and by passing weston a configuration file to make sure it isn’t related to either of those.
Is weston/mesa supposed to look for those drivers and should i have them? Are they not supposed to be around and it should try to load something else entirely?
How could I go about debugging something like this myself in the future? I tried looking around online and found a lot of random discussions, none of them fruitful. Some pointed towards building mesa in a different way, or updating mesa. Others sent me on a goose chase trying to load different overlays, changing my config and cmdline in small ways, but nothing led me anywhere.
If anyone has experienced this before or has any insights on what I might be doing wrong I would greatly appreciate any form of contact.
Thank you very much in advance, and have a great day.