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

make product string in HID descriptor and the platform value in the REQ_INFO dynamic, not hardcoded #1371

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

benma
Copy link
Collaborator

@benma benma commented Feb 12, 2025

Builds on #1370

Allows us to have one firmware (per edition) for both bb02 and bb02-plus while still allowing the client to differentiate between them.

Keep the main usb_desc.h smaller, with the goal if copy/pasting it
once per platform (BitBox02 and BitBox02 Plus) to add new product
strings for BitBox02 Plus.
For the time being we intend to have one firmware per edition
targetting both BB02 and BB02-Plus. For this reason we add a memory
flag to store which platform it is (BB02 vs BB02-Plus), and make the
USB HID descriptor product string dynamic dependent on that.

Since our descriptor bytes are built from macros, this commit does a
quick solution by copy pasting the descriptor and changing only the
product string. In the future we can consider building the descriptor
bytes in normal code which would make setting the product string
easier.
Based on the newly added memory flag.
@benma benma force-pushed the bb02p-product-string branch from cf65558 to 98a2142 Compare February 12, 2025 09:59
This also introduces new signed firmware magic headers, chosen randomly.
@benma benma force-pushed the bb02p-product-string branch from 98a2142 to 574d85b Compare February 12, 2025 10:12
@benma benma changed the title Bb02p product string make product string in HID descriptor and the platform value in the REQ_INFO dynamic, not hardcoded Feb 12, 2025
@benma benma marked this pull request as ready for review February 12, 2025 12:33
@benma benma requested a review from NickeZ February 12, 2025 12:33
Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

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

utACK

@benma benma merged commit c356473 into BitBoxSwiss:master Feb 12, 2025
6 checks passed
@benma benma deleted the bb02p-product-string branch February 12, 2025 13:30
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.

2 participants