nerves_system_rpi4
nerves_system_rpi4 copied to clipboard
Support VL805 firmware updates
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.
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
andvl805.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"
}
@erauer Thanks for sharing this!