-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Align MBRBlockDevice writes to underlying BlockDevice write size #8262
Align MBRBlockDevice writes to underlying BlockDevice write size #8262
Conversation
To next patch release, please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks perfect to me 👍
Thanks for this
/morph build |
Build : SUCCESSBuild number : 3184 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2779 |
Test : FAILUREBuild number : 2985 |
/morph test |
Test : FAILUREBuild number : 2986 |
sigh /morph test |
Test : SUCCESSBuild number : 2987 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
When writing MBR the write buffer was allocated such that it would not align with BlockDevice write size resulting in failure of the write operation.
It would happen here:
err = bd->program(buffer, 512-buffer_size, buffer_size);
Now the buffer_size is calculated so that the writes will be properly aligned.
Tested with STM32L486 using internal flash as storage. Without fix it is not possible to initialise partition in the internal flash.
Pull request type