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

reorganize boardloader code #4564

Merged
merged 5 commits into from
Feb 6, 2025
Merged

Conversation

TychoVrahe
Copy link
Contributor

This PR reorganizes boardloader code: mainly SD card update functionality is separated into its own file, which allows easier reading of the main code.

Lazy initialization of display driver is introduced, to allow faster boot times. However, this is now enabled only for some models, as some bootloaders rely on display already being initialized. This is now fixed, as bootloader should always reinitialize the driver (and bootloader should deinitiliaze it on exit, which it luckily does incompletely - otherwise such bootloaders woudn't work properly.

@TychoVrahe TychoVrahe self-assigned this Jan 31, 2025
Copy link

github-actions bot commented Jan 31, 2025

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@TychoVrahe TychoVrahe force-pushed the tychovrahe/boardloader/refactor branch from 8ac98ad to f77d5ed Compare January 31, 2025 12:41
@TychoVrahe TychoVrahe marked this pull request as ready for review January 31, 2025 13:20
@TychoVrahe TychoVrahe requested a review from prusnak as a code owner January 31, 2025 13:20
@TychoVrahe TychoVrahe requested review from cepetr and removed request for prusnak January 31, 2025 13:20
term_printf("\ndone\n\n");
term_printf("Unplug the device and remove the SD card\n");

return sectrue;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should conditionally deinitialize the display at the end of copy_sdcard.

#ifdef FIXED_HW_DEINIT
  display_deinit();
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for simplicity, i moved the init deinit to the caller, sd_update_check_and_update. Though we end up in reboot_or_halt_after_rsod in anyway.

@TychoVrahe TychoVrahe force-pushed the tychovrahe/boardloader/refactor branch from 11db11f to f08eb5e Compare February 6, 2025 11:38
@TychoVrahe TychoVrahe requested a review from cepetr February 6, 2025 11:38
@TychoVrahe TychoVrahe merged commit 85bbc89 into main Feb 6, 2025
94 checks passed
@TychoVrahe TychoVrahe deleted the tychovrahe/boardloader/refactor branch February 6, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤝 Needs QA
Development

Successfully merging this pull request may close these issues.

2 participants