Skip to content

nxboot/loader: Fix boot progress calculation. #3145

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

Conversation

TimJTi
Copy link
Contributor

@TimJTi TimJTi commented Jul 28, 2025

Summary

This patch corrects a mathematical error in the progress reporting function which caused incorrect percentage progress calculations.

This problem was discovered while testing #3136.

Impact

None. Just fixes a problem where the reported % went negative and then misbehaved. Schoolboy maths error!

Testing

On my custom SAMA5D27C-D1G board using NXboot and an 800x480 nLCD with NXboot progress display enabled to view the percentage complete of various NXboot flash operations.

@cederom
Copy link
Contributor

cederom commented Jul 28, 2025

Thanks @TimJTi :-) How about git commit subject nxboot/loader: Fix boot progress calculation. ? :-)

@TimJTi TimJTi force-pushed the boot/nxboot/loader/boot.c-Incorrect-maths-for-percent-remaining-progress-display branch from 368097b to 6d2600b Compare July 28, 2025 17:15
@TimJTi TimJTi marked this pull request as ready for review July 29, 2025 10:29
@xiaoxiang781216
Copy link
Contributor

@TimJTi please drop the merge patch

@TimJTi
Copy link
Contributor Author

TimJTi commented Jul 29, 2025

@TimJTi please drop the merge patch

It failed CI for whatever reason. So in theory I rebased and pushed. I'll take a look as in practice who knows what I did!

@TimJTi
Copy link
Contributor Author

TimJTi commented Jul 29, 2025

I have zero idea what's going on. I will use a big hammer and close this PR then start again when I get a chance.

@TimJTi TimJTi force-pushed the boot/nxboot/loader/boot.c-Incorrect-maths-for-percent-remaining-progress-display branch from 47adeae to 6d2600b Compare July 29, 2025 21:29
@TimJTi
Copy link
Contributor Author

TimJTi commented Jul 29, 2025

I have zero idea what's going on. I will use a big hammer and close this PR then start again when I get a chance.

Think I worked out how to do it...

This patch corrects a mathematical error in the progress reporting function which
caused incorrect percentage progress calculations.

Signed-off-by: Tim Hardisty <[email protected]>
@TimJTi TimJTi force-pushed the boot/nxboot/loader/boot.c-Incorrect-maths-for-percent-remaining-progress-display branch from 6d2600b to 56e5af8 Compare July 29, 2025 21:34
@cederom cederom changed the title nxboot/boot/nxboot/loader/boot.c: Correct mathematical error. nxboot/loader: Fix boot progress calculation. Jul 30, 2025
Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

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

CI check passed this time, thank you @TimJTi :-)

@xiaoxiang781216 xiaoxiang781216 merged commit 7506c02 into apache:master Jul 30, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants