Relevant micropython commits:
01374d941f9d7398e35990b574769b20c6779457 py/mpconfig.h: Define initial templates for "feature levels".
7b89ad8dbf432ab51eea6d138e179bf51394c786 py/vm: Add a fast path for LOAD_ATTR on instance types.
68219a295c75457c096ac42dbe8411b84e1e1a51 stm32: Enable LOAD_ATTR fast path, and map lookup caching on >M0.
e0bf4611c3a8b23b3c52e6a7804aac341ac3a87d py: Only search frozen modules when '.frozen' is found in sys.path.
f2040bfc7ee033e48acef9f289790f3b4e6b74e5 py: Rework bytecode and .mpy file format to be mostly static data.
926b554dafffa1e9bd80aa12fea5c621221c9d79 extmod/moduos: Create general uos module to be used by all ports.
2b409ef8a46015f8f3bd20bc44e644637dbe9bd3 unix/moduos: Convert module to use extmod version.
47f634300c5572571816817f16836113c98814ae py: Change makemoduledefs process so it uses output of qstr extraction.
0e7bfc88c6ac6b5d64240f91183a3cfe2ab67ade all: Use mp_obj_malloc everywhere it's applicable.
2a6ba47110be88ff1e1f5abd1bd76c353447884c py/obj: Add static safety checks to mp_obj_is_type().
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.
On a cleanly wiped device, storage must be unlocked in order to create
and retrieve the serial number. However, storage unlocking happens in
boot.py, which is imported _after_ usb.py
We must therefore sidestep asking for the serial number.
This avoids problems with large timeouts causing the scheduler queue to
think the time counter has overflown, and ordering the autolock task before
immediate tasks.
The maximum reasonable time difference is 0x20000000, which in
microseconds is ~8 minutes, but in milliseconds a more reasonable ~6
days.
expose ff.c constants, raise them as arguments to FatFSError
introduce NotMounted and NoFilesystem as subclasses of FatFSError with
the appropriate error code set
ff.c has a lazy-mounting feature, where any filesystem call will mount
the volume if it can. This messes with predictability of the mounted
state, so all (except mount/unmount/mkfs) Python functions will first
check if the fs is mounted.
Instead of having possibly multiple FatFS objects, each with its own
`fs` struct, there is one global static fs_instance. This is to match
the mode of operation of ff.c, which assumes a global list of mounts,
and all functions operate on the global based on path.
Methods of FatFS were converted to functions on the fatfs module.
fatfs.unmount() does not call ff.c's unmount, but simply invalidates
fs_instance. This is basically what ff.c would do, except without
messing with ff.c's global list of mounts.