nerves_system_rpi4 icon indicating copy to clipboard operation
nerves_system_rpi4 copied to clipboard

Support VL805 firmware updates

Open fhunleth opened this issue 3 years ago • 2 comments

The Raspberry Pi firmware is stored on an EEPROM so it needs to be updated periodically. This is inconvenient right now with Nerves. It would be nice if there were an easy way to do this.

Information is at https://github.com/raspberrypi/rpi-eeprom.

fhunleth avatar Nov 08 '21 17:11 fhunleth

A naive implementation that I've done before is utilize recovery.bin. There are a few obvious downsides with this approach:

  • The updates of pieeeprom.bin and vl805.bin aren't versioned so this approach could end up back leveling the firmware.
  • The bin files are renamed after update. Potentially breaking signed boot images if implemented.
  • Wouldn't support fallback on bad firmware update

Since these file aren't really tied to buildroot, we took the approach of creating a custom fwup config in our app instead of in our nerves system. We add the files to a bootfs_overlay and included the following fragment in fwup:

file-resource recovery.bin {
    host-path = "${NERVES_APP}/bootfs_overlay/recovery.bin"
}

file-resource pieeprom.upd {
    host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.upd"
}

file-resource pieeprom.sig {
    host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.sig"
}

ericr3r avatar Nov 10 '21 22:11 ericr3r

@erauer Thanks for sharing this!

fhunleth avatar Nov 11 '21 16:11 fhunleth