parent
61a0d69baa
commit
c563c987e1
@ -0,0 +1 @@
|
|||||||
|
Jump and stay in bootloader from firmware through SVC call reverse trampoline.
|
@ -0,0 +1 @@
|
|||||||
|
Jump and stay in bootloader from firmware through SVC call reverse trampoline.
|
@ -0,0 +1,17 @@
|
|||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from trezor import utils, wire
|
||||||
|
from trezor.messages import RebootToBootloader, Success
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from typing import NoReturn
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
async def reboot_to_bootloader(ctx: wire.Context, msg: RebootToBootloader) -> NoReturn:
|
||||||
|
await ctx.write(Success())
|
||||||
|
# writing synchronously twice makes USB flush properly before reboot
|
||||||
|
await ctx.write(Success())
|
||||||
|
utils.reboot_to_bootloader()
|
||||||
|
raise RuntimeError
|
@ -0,0 +1 @@
|
|||||||
|
Jump and stay in bootloader from firmware through SVC call reverse trampoline.
|
Loading…
Reference in new issue