Browser in Nerves (kiosk-mode)

Hi all
We’d like to use a raspi3 as a host for a full screen browser app.
Theres a project on github with just this intention:

But I just get it running. It fails with the error

Trying https://github.com/nerves-web-kiosk/kiosk_system_rpi3/releases/download/v1.10.0/kiosk_system_rpi3-portable-1.10.0-0095F22.tar.gz
Status 404 Not Found

This seems to be a problem, which was solved in nerves already, so I changed the nerves dependency to the newest version. It didn’t solve the problem though.
Latest commit is from jan 22, so it seems to be maintained, but an open issue wasn’t resolved by the maintainer.
Anybody has a hint, where I could get a functioning example or find an experienced person, who could help?
Thanks in advance!

Did you checkout the v1.10.0 tag?
It looks like the checksum for the download doesn’t match the one in the releases.
Take a look at Nerves Package Configuration (especially 2 and 7).

Thanks a lot for your input!
What I saw the is module Mix.Tasks.Nerves.Artifact.Get, which calculates the checksum out of the list of package files provided in mix.exs.
But I don’t know yet, how the checksum on github is built and why it differs from the calculated checksum. Maybe the list of files has changed?
Is there a standard-method which github uses?
I don’t know and have to check this out.

If you checked out the master branch, the checksum differs, because the files used for the checksum changed since the v1.10.0 release.

The checksum calculation has nothing to do with GitHub. It is done by Nerves.

Just run git checkout v1.10.0 and try again!

@moogle19 : You’re my hero! Thanks a lot!
It’s so obvious but I didn’t get it before you pointed me to it.

I still can’t build the example from GitHub - nerves-web-kiosk/kiosk_system_rpi3: Nerves QtWebEngine Kiosk system for Raspberry Pi 3, but this seems to be an issue already reported by someone else.
It hangs now when trying to download the artifacts.

When I try to bump the version of the nerves dependency myself from 1.6.0 to 1.7.11 I’m changing the mix.exs and then the checksum doesn’t match any more :crazy_face: .
I tried to rebuild the dependencies of KioskSystemRpi3 which resulted in a 3 hour build of buildroot which then finally failed on my Mac.
What would be the the path to successfully upgrading the dependencies of nerves?
Because a mix deps.get after changing the version will always fail (different checksum).

@daniel_frey Do you have access to a Linux machine? Building the kiosk code is very time consuming. When I did it, I used a 32-core Linux machine and it still took a while. I think it was around 30-40 minutes for a full build.

There has been some recent work on Raspberry Pi 4-based kiosks if that’s an option. @elcritch presented his work on it at NervesConf last week. I’m hoping he’s on the forum so that he can give an update here.

@fhunleth We have a build server with 16 cores. We use it with docker images only though. So installing the needed packages for building the kiosk is not really an option I’d prefer.
I have some VM’s, but rather low cores. But if I’d know the build runs through I wouldn’t mind if it takes several hours. If it fails after 4 hours it is a bit more annoying :wink:

A Raspberry Pi 4-based kiosk would definitely be great!

You could run mix deps.update —all which gives you the newest version which match the requirements in your mix.exs (e.g the newest 1.6 of nerves). This only changes the mix.lock so the checksum stays the same.

I tried to build GitHub - nerves-web-kiosk/kiosk_system_rpi3: Nerves QtWebEngine Kiosk system for Raspberry Pi 3 from scatch, but failed.
What I did: I pulled the repository above on an Ubuntu 20.04.
I went into the “example” directory and made a

export MIX_TARGET=rpi3
mix deps.clean 
mix deps.compile

To install the build infrastructure I installed the following packages:

build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk 
 gcc-multilib automake libwxgtk3.0-gtk3-dev qtwebengine5-dev qtmultimedia5-dev qt5-default

I got errors though but managed the get further with the ENV set FORCE_UNSAFE_CONFIGURE=1

It finally fails with an error message from ninja. The last message is this

ninja: error: WriteFile(__services_network_public_mojom_mutable_network_traffic_annotation_interface_shared_cpp_sources__jumbo_merge__root_dev_kiosk_system_rpi3_example_deps_kiosk_system_rpi3_.nerves_artifacts_kiosk_system_rpi3-portable-1.10.0_build_qt5webengine-5.15.0_src_toolchain_target__rule.rsp): Unable to create file. File name too long
ninja: build stopped: .

I tried various different approaches. My goal is to compile kiosk_system_rpi3 with the latest release of nerves, then push it to my clone repository on github as an artifact.

I’m somehow stuck. As I understand the nerves project generates their precompiled packages with buildroot included, so that the build process for depending projects don’t take that long.

Is there a somewhere description how I can build an artifact for kiosk_system_rpi3 from scratch?
Any help is appreciated!

I can successfully build kiosk for rpi3.
Ubunut 20.04 LTS.

asdf install erlang 22.3.4.6
asdf global erlang 22.3.4.6
asdf install elixir 1.11.4-otp-22
asdf global elixir 1.11.4-otp-22
mix local.rebar
mix local.hex
mix archive.install hex nerves_bootstrap

create a project with mix nerves.new and to export MIX_TARGET=rpi3.

diff --git a/mix.exs b/mix.exs
index d8481f7..7bd212d 100644
--- a/mix.exs
+++ b/mix.exs
@@ -45,15 +45,7 @@ defmodule Kiosk.MixProject do
       # bumps to Nerves systems. Since these include Linux kernel and Erlang
       # version updates, please review their release notes in case
       # changes to your application are needed.
-      {:nerves_system_rpi, "~> 1.17", runtime: false, targets: :rpi},
-      {:nerves_system_rpi0, "~> 1.17", runtime: false, targets: :rpi0},
-      {:nerves_system_rpi2, "~> 1.17", runtime: false, targets: :rpi2},
-      {:nerves_system_rpi3, "~> 1.17", runtime: false, targets: :rpi3},
-      {:nerves_system_rpi3a, "~> 1.17", runtime: false, targets: :rpi3a},
-      {:nerves_system_rpi4, "~> 1.17", runtime: false, targets: :rpi4},
-      {:nerves_system_bbb, "~> 2.12", runtime: false, targets: :bbb},
-      {:nerves_system_osd32mp1, "~> 0.8", runtime: false, targets: :osd32mp1},
-      {:nerves_system_x86_64, "~> 1.17", runtime: false, targets: :x86_64}
+      {:kiosk_system_rpi3, "~> 1.0"}
     ]
   end
mix deps.update --all
mix firmware
mix firmware.burn

EDIT: hangs at boot :frowning:

Thank a lot @Sebb. Your instructions lead me finally to a working sample!
Great help in this forum.
I had to compile it under Ubuntu, on my Mac it wouldn’t work.
Before your post I tried to use a newer erlang, but this forced me the compile the
kiosk_system_rpi3 myself, which I failed.

At last I have now a working sample. QTWebengine looks a bit old fashioned though, so I don’t know if I could use it for production.
But I’m still curious how I could build from scratch a nerves_system :slight_smile:
Again, thanks a lot for your help!

Thats odd … did you try with the exact same versions on the Mac?

QTWebengine is always up-to-date with Chromium when Qt is released, so it depends on Qt-Version, see:

https://wiki.qt.io/QtWebEngine/ChromiumVersions

You won’t find anything better in the embedded world.

I dug out a rpi3 and followed the process. Yes, it does hang at boot. Any clues on how to get past that?

No, sorry. It worked once, all I can say right now.