Features `micropython` and `protobuf` are defined. Protobuf implies micropython
because our protobuf impl is pretty much _for_ micropython.
The respective subdirs are included only if the matching feature is defined.
util.rs is moved to micropython because it mostly concerns micropython interop
ResultExt, useful only for ui_debug, is moved to ui::util.
A new module `trezorhal::time` is provided. It mirrors functionality of
`micropython::time` via stmlib functions. The intended use is to always use
functions from `trezorhal::time`. The right micropython variants are used when
micropython is available, otherwise the pure stmlib versions are called.
ui::*::layout is conditional for micropython feature, because it only concerns
micropython layouts. If we want to reuse layouts defined there, we will need to
export them to not depend on Objs and Qstrs etc.
Can be built by `TREZOR_MODEL=R make build_unix`, `make build_unix_frozen` does not work yet.
All the dialogs are not very pretty, they are just meant to work.
This implements:
- ZIP-225: Version 5 Transaction Format
- ZIP-244: Transaction Identifier Non-Malleability
BREAKING CHANGE: Zcash prevouts are not verified (as in Taproot). Zcash replacement transactions are not supported.
to re-enable build of Emulator for Raspberry Pi with a display
related to commit daf0d77 which removed the functionality from the makefile
but we missed that there is now no way how to pass the flag to emit the #define
[no changelog]
Otherwise "cargo test" fails with errors like:
Compiling trezor_lib v0.1.0 (embed/rust)
error: linking with `cc` failed: exit status: 1
|
= note: ld: build/unix/rust/debug/build/trezor_lib-a046f8e3db087595/out/libcore_lib.a(obj.o): relocation R_X86_64_32S against `.rodata.types.1' can not be used when making a PIE object; recompile with -fPIE
Relevant micropython commits:
d1bfb271d7686708fe8711a177629c8bf6e7f6a6 lib/uzlib: Move uzlib code from extmod to lib.
4d546713ec8858cbf908de45de11cbfc46a20971 shared: Introduce new top-level dir and move 1st party lib code there.
ca920f72184c50f61002aa9d5cd01555b1e28b7b py/mpstate: Make exceptions thread-local.
- properly exclude in the trezor/enums folder
- generate Rust protobuf blobs in scons
Split from "tools: Generate special Protobuf blobs for the Rust codec"
core: Remove dangling module decls
core: Use new Cargo feature resolver, use external MacOS debug info
core: Rust docs improvements
core: Upgrade bindgen
core: Add test target to Rust
ci: build rust sources
build(core): .ARM.exidx.text.__aeabi_ui2f in t1 firmware size
It's an unwind table for softfloat function inserted by rustc, probably
can be removed to save 8 bytes:
599c58db70/link.x.in (L175-L182)
scons: Remove dead code
core: Move Rust target to build/rust
core: Replace extern with a FFI version
core: Add some explanatory Rust comments
core: Use correct path for the Rust lib
core: Remove Buffer::as_mut()
Mutable buffer access needs MP_BUFFER_WRITE flag. TBD in the Protobuf PR.
core: Improve docs for micropython::Buffer
core: Minor Rust docs changes
core: Rewrite trezor_obj_get_ll_checked
core: Fix incorrect doc comment
core: Remove cc from deps
fixup! core: Rewrite trezor_obj_get_ll_checked
core: update safety comments
Layouts can be used by the application code to interact with user using
small number of dialogs or other groups of UI components. Each layout is
identified by name and takes some parameters. Most layouts will have an
implementation for each hardware model, mechanism is provided to import
the correct version so that application code can be oblivious to the
model.
This commit introduces the layout concept and converts a couple of
dialogs to use it.
They now live under trezor.ui.components.tt. Later
trezor.ui.components.t1 will be added and application code will be
rewritten to not use them directly in order to work on both TT and T1.
- core/bitcoin: move common files to the app's root
- core/bitcoin: use require_confirm instead of confirm
- core: move bitcoin unrelated functions from 'bitcoin' to a new 'misc' app
- core/bitcoin: use relative imports inside the app
- core: rename wallet app to bitcoin
- core/wallet: replace SigningErrors and the other exception classes with wire.Errors
Changes in firmware/mpconfigport.h are minimal:
* $VFS_FAT is dropped because it is irrelevant without $VFS
* $REVERSE_SPECIAL_METHODS is added, to push down on code size
* $THREAD is disabled unconditionally
unix/mpconfigport.h is reordered and modified to match
firmware/mpconfigport.h as much as possible, while selectively enabling
some needed features.
Notably, $USE_READLINE is enabled unconditionally
SConstruct includes SConscript.unix even for the firmware builds,
which resuls in error if SDL2 is not installed.
This commit workarounds the issue.
Is there a better way how to NOT include SConscript.unix via
SConstruct for firmware only builds?