lawik

lawik

Nerves Core Team

Supporting more robust recovery on Raspberry Pi

Nerves provides a lot of functionality in service of robustness. One of the big ones is the mechanism for recovering from a bad firmware. Essentially if you have made a firmware update using the default fwup-based mechanism the device would attempt a boot from the new partition and if it was validated within X minutes it would write the change to make it permanent. If it failed for any reason, including rebooting before the system comes up it would fall back to the old one.

Except for the Raspberry Pi, sometimes. The Raspberry Pi does not have the same mechanisms as a BeagleBone Black or other commercially focused boards. And it did not have a solid special mechanism for this for quite some time. This meant that there were limitations to what Nerves could recover on the RPi compared to some other platforms.

This is close to being fixed. A while back they shipped tryboot, you can read about it here. Suffice to say it is a mechanism for performing this type of updates with a flag that will last for only one reboot unless properly persisted.

If you are using RPi devices in production or have seen these types of problems I strongly recommend trying this branch and shipping some broken firmware to confirm it does what you expect.

You can see the changes in this branch and try it yourself on the RPi4:
https://github.com/nerves-project/nerves_system_rpi4/pull/285

Or you can do it with the Pi Zero 2 (also the RPi3A+):
https://github.com/fhunleth/nerves_system_rpi0_2/pull/69

You also need to run the main branch of nerves_runtime as it exposes some important API to make this work.

Where Next?

Popular in Discussions Top

PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
Jayshua
I recently came across the javascript library htmx. It reminded me a lot of liveview so I thought the community here might be interested....
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
Qqwy
Looking at the stacks that existing large companies have used, WhatsApp internally uses Mnesia to store the messages, while Discord uses ...
New
WolfDan
After doing a port from a c++ library to my project in phoenix I’ve seen that I need a faster way to run this algorithm and I found this ...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
AstonJ
I’ve just started the Phoenix part of the utterly brilliant online course by @pragdave. On generating the Phoenix app he uses the --no-ec...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement