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

fwidgen: Add tool to generate FWID for the image in a hubris archive. #38

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

flihp
Copy link
Contributor

@flihp flihp commented Mar 18, 2025

This is an attempt to replace the img/final.fwid file generated by hubris xtask in the archive with a tool that can calculate t he value on demand. If we like the approach I'd like to extend this tool (or add another) to check the signature over the firmware image as a mechanism to establish trust in the FWID value.

@flihp flihp requested review from lzrd and labbott March 18, 2025 16:10
@flihp flihp linked an issue Mar 18, 2025 that may be closed by this pull request
@flihp
Copy link
Contributor Author

flihp commented Mar 18, 2025

The FWID value generated by hubris xtask is still present in hubris archives. Testing this is as simple as comparing the value generated by fwidgen against the value in img/final.fwid from the archive.

};

// may already be in lpc55_support?
pub const LPC55_FLASH_PAGE_SIZE: usize = 512;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working to resolve this now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lpc55_support doesn't seem to expose a constant w/ the flash page size in bytes so leaving this as-is

Copy link
Contributor

@labbott labbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly style things but the fundamentals LGTM and it matches the current hubris implementation

@flihp flihp mentioned this pull request Mar 18, 2025
@flihp flihp merged commit 17c61c9 into main Mar 18, 2025
1 check passed
@flihp flihp deleted the fwidgen branch March 18, 2025 21:46
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.

FWID generation tool
2 participants