-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
bootloader production mode fix #4195
Conversation
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.
utACK
core/embed/bootloader/main.c
Outdated
#ifdef TREZOR_MODEL_T3T1 | ||
// on T3T1, tester needs to run without touch, so making an exception | ||
// until unit variant is written in OTP | ||
if (unit_variant_present()) { | ||
ensure(touch_init(), "Touch screen panel was not loaded properly."); | ||
secbool production_mode = unit_variant_present() ? secfalse : sectrue; |
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.
How about something like this:
#ifdef USE_TOUCH
secbool touch_initialized = secfalse;
#ifdef TREZOR_MODEL_T3T1
secbool manufacturing_mode = unit_variant_present() ? secfalse : sectrue;
secbool allow_touchless_mode = manufacturing_mode;
touch_initialized = touch_init();
if (allow_touchless_mode != sectrue) {
ensure((touch_initialized, "Touch panel...");
}
#endif // TREZOR_MODEL_T3T1
#endif // USE_TOUCH
..
..
..
if (touch_initialized != secfalse) {
while (touch_ready() != sectrue) {
hal_delay(1);
}
}
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.
yeah its a bit better. Adjusted a bit to allow touch initialization for other models too, see 6187233
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.
utACK
[no changelog]
6187233
to
ce47da9
Compare
Fixes stuck bootloader when in production mode and touch is not present.
(some touch related typos fixed too)