Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add firmware validation check and automatic revert #58

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

trarbr
Copy link
Collaborator

@trarbr trarbr commented Nov 3, 2019

An untested implementation of firmware validation as proposed here: nerves-project/nerves_runtime#169 . I expect it to have small errors since it's untested, but it should cover most bases. Let me know what you think.

@trarbr
Copy link
Collaborator Author

trarbr commented Nov 3, 2019

Hm... I just found an obvious issue with this. If the user upgrades the B partition with bad firmware, the system will reboot without marking firmware valid, and the bootloader will boot into the A partition. But the U-Boot variable nerves_fw_active will still point to B... 🤔

@trarbr
Copy link
Collaborator Author

trarbr commented Nov 3, 2019

I added a script that is executed by erlinit at boot which keeps U-Boot's nerves_fw_active in sync with Grub's nerves_fw_active

@fhunleth fhunleth changed the base branch from master to main June 17, 2020 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant