trezor-firmware
trezor-firmware copied to clipboard
New bootloader UI in rust
This PR implements new bootloader UI partially in rust.
There is a new menu, allows wiping device directly without suite and rust library allows interactive buttons.
I don't really like we are introducing Micropython stuff into the bootloader.
far as we're aware, nothing micropythonic gets into the build
oh, but some source files are added. huh. will need to investigate that.
There are some config files needed for the QSTR generation. We should get rid of it along with the whole qstr generation in bootloader, but it will probably require some restructuring of the whole rust part.
Rebased - since the #2332 has now been merged, i removed all the micropython stuff here.
rebased and implemented latest design updates.
rebased.
The rust bootloader takes about 104kB, which surprisingly is even less than current master (106kB). One reason is that this uses algorithmic loader instead of the data based one (cca 7kB savings).
I don't have screenshots (bootloader doesn't support it), can make some photos.
But its a good point: since we are now sharing UI code between firmware and bootloader it would be very wise to add the bootloader screens to fixtures somehow
Yeah, the code sharing may become problematic. Regarding UI perhaps we can expose the bootloader screens in PYOPT=0 emulator and write a device tests to cover them?
Rebased before next reviews. Includes fixed loader that was broken since the Icon type introduction - https://github.com/trezor/trezor-firmware/pull/2306/commits/e8bfaaf0ce8931678427c9ef304bce3f83feda70.
Device tests with exposure via PYOPT=0 seem reasonable. Lets do that in separate issue though?
rebased, implemented #71 and latest design changes
New designs of RSOD in linked issue.
related issue #2823
Can we wait with merging this for new designs?
I would prefer to merge this and do the design updates in next PR, as this has already been reviewed and its quite big already.
Can we then merge it?
fixed the StrBuffer issue in error screens by a dirty trick that is ok for error screens but not much else. we'll need lifetimes for StrBuffer to fix this properly
force-pushed to get the build working and fix conflicts (they were trivial except for a disagreement about what is "TOP_RIGHT", but there was only one correct answer)
rebased again to solve latest conflicts
one more force-push to squash the huge number of fixups
@mmilata a quick review of 7a110aa0b57c290610cab5b10f67f5884c6d7727 please? if you feel it's ok then please go ahead and merge this
Click tests got stuck at test_reset_slip39_advanced_16of16groups_16of16shares
, re-running the job.
QA OK
tested on bf27e4ebb5a58864ff02e1f7e5d5e624cd9bdbce version restart and wipe device buttons works as expected in BL mode