1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
Commit Graph

8776 Commits

Author SHA1 Message Date
matejcik
b24411b900 core/sdcard: unmount instance when powering off sdcard 2020-02-27 10:56:23 +01:00
matejcik
c81be584fb core/fatfs: ensure functions can only be called on a mounted filesystem
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.
2020-02-27 10:56:23 +01:00
matejcik
fa746e2990 core/fatfs: rework low-level FatFS API
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.
2020-02-26 14:18:41 +01:00
matejcik
6722215c66 tests: update SD-protect test after randomization change 2020-02-24 15:38:28 +01:00
matejcik
61fa00731a tests: write UI report if tests fail 2020-02-24 15:38:02 +01:00
matejcik
f3f0f507d9 git subrepo push common
subrepo:
  subdir:   "common"
  merged:   "e8ef868cf"
upstream:
  origin:   "git+ssh://git@github.com/trezor/trezor-common"
  branch:   "master"
  commit:   "e8ef868cf"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "5d6aba9"
2020-02-24 15:16:05 +01:00
matejcik
b916072389 common: restore PassphraseAck.state 2020-02-24 15:15:09 +01:00
matejcik
d7b9582386 core/sdcard: add ensure_filesystem option (fixes #868)
It is possible to call `ensure_sdcard` in a way that requires only SD
card be inserted, but not necessarily formatted.

This is useful for SD-protect and possibly other use-cases where the SD
card is read-only, and "not formatted" is identical to "not containing
the right files".
2020-02-24 13:28:44 +01:00
matejcik
e9c275c24f core/sdcard: fix invalid state when filesystem mounting fails 2020-02-24 13:28:44 +01:00
matejcik
f9097b16e6 tests: make ui-check-missing more resilient for nonstandard exits 2020-02-24 13:28:44 +01:00
Tomas Susanka
c418e628ac ci: omit unix/emu label in test jobs 2020-02-24 11:47:06 +00:00
Tomas Susanka
cd90d2b792 docs: add link to ui tests doc 2020-02-24 11:17:47 +00:00
Pavol Rusnak
39ce100608
Merge pull request #864 from trezor/prusnak/bootloader-text-break
core/bootloader: split long vendor string
2020-02-21 18:39:20 +01:00
Tomas Susanka
e568faa862
Merge pull request #852 from trezor/tsusanka/multiple-passphrases
Allow multiple sessions/passphrases
2020-02-21 16:34:23 +01:00
Tomas Susanka
703a13eb00 tests/ui: fix ui fixtures 2020-02-21 14:07:33 +00:00
matejcik
8fed67de08 tests: expand on multi-session tests 2020-02-21 14:40:42 +01:00
Tomas Susanka
f93f6e445b legacy: store multiple sessions/caches at the same time 2020-02-21 14:40:42 +01:00
Tomas Susanka
6c47bf8230 core: store multiple sessions/caches at the same time 2020-02-21 14:40:42 +01:00
Pavol Rusnak
562671401e
Merge pull request #860 from trezor/prusnak/multisig-show-yours-others
core: show yours/others in get_address for multisig
2020-02-20 13:49:13 +01:00
matejcik
918603ad5c core: add unit test for sdcard wrapper 2020-02-20 12:51:48 +01:00
matejcik
7983fd34d6 core: fix unit tests 2020-02-20 12:51:48 +01:00
matejcik
d88540f2e0 tests: do not error out when fixtures fail to download 2020-02-20 12:51:48 +01:00
matejcik
42c4eb6341 tests: add SD format test fixtures 2020-02-20 12:51:48 +01:00
matejcik
4ed6487a19 core/sdcard: add out-of-bounds checks to emulator 2020-02-20 12:51:48 +01:00
matejcik
5523c7bbef tests: add SD card format feature tests 2020-02-20 12:51:48 +01:00
matejcik
ddee77ecb6 core: add SD clearing via debuglink 2020-02-20 12:51:48 +01:00
matejcik
d0b1b171f1 core/sdcard: ensure emulator initializes the SD card when first needed 2020-02-20 12:51:48 +01:00
matejcik
5bd8d9b5bb core/sdcard: make allocating new SD card for emulator fast 2020-02-20 12:51:48 +01:00
matejcik
1e9352b9e0 core: add SD format dialog, generalize sdcard usage 2020-02-20 12:51:48 +01:00
matejcik
5bac85f260 core: use filesystem wrapper instead of the ensure_filesystem decorator 2020-02-20 12:51:48 +01:00
matejcik
d08942be4a core: introduce filesystem wrapper 2020-02-20 12:51:48 +01:00
matejcik
b2084a19be core/trezorio: move sdcard functions to a submodule 2020-02-20 12:51:48 +01:00
matejcik
30529d218d core/sdcard: change SDCard methods to plain functions 2020-02-20 12:51:48 +01:00
matejcik
06b89c57c5 core/sdcard: return proper disk status flags to fatfs 2020-02-20 12:51:48 +01:00
matejcik
d98bbebf5e tests: add UI test for multisig+xpub feature 2020-02-20 12:47:29 +01:00
Tomas Susanka
ff1bb67abc common: return the PasshraseType button request 2020-02-20 08:04:35 +00:00
Pavol Rusnak
dc66bbe3d5
core/bootloader: split long vendor string 2020-02-19 21:40:28 +00:00
Pavol Rusnak
74802a107e
core/modtrezorui: add display_text_split 2020-02-19 21:40:28 +00:00
Pavol Rusnak
c4babd3c0b
Merge pull request #846 from trezor/bootloader-read-retry
core/bootloader: make read more benevolent and read error more helpful
2020-02-19 19:45:34 +01:00
Pavol Rusnak
d2bcccf0ae
Merge pull request #847 from trezor/prusnak/bootloader-restart
legacy/bootloader: soft reset after firmware upload
2020-02-19 18:20:49 +01:00
Pavol Rusnak
581e46ff87
Merge pull request #845 from trezor/prusnak/webusb-popup
Don't show WebUSB popup in firmware, in bootloader only if no firmware present
2020-02-19 18:18:01 +01:00
Pavol Rusnak
23ffc87236
legacy/bootloader: soft reset after firmware upload
originally submitted by @kedoubitcoin
2020-02-19 17:14:36 +00:00
Pavol Rusnak
efbb7aed80
Merge pull request #863 from trezor/prusnak/monero-unlock_time
core/monero: add confirmation dialog for unlock_time
2020-02-19 17:33:08 +01:00
Tomas Susanka
3d91a0643d legacy: add comment to startup.S 2020-02-19 14:51:29 +00:00
Pavol Rusnak
7944c1a837
core/monero: add confirmation dialog for unlock_time 2020-02-19 14:31:45 +00:00
Pavol Rusnak
a808cc9190
core/apps: await require_confirm should be called without return 2020-02-19 14:31:45 +00:00
Pavol Rusnak
b9486c0b33
core: show yours/others in get_address for multisig 2020-02-18 22:39:55 +00:00
Tomas Susanka
2e2f5fd421 docs/legacy: MEMORY_PROTECT needs to be 0 for custom built 2020-02-18 14:28:44 +00:00
Tomas Susanka
394fad9d6d docs/common: add note on session id / state size 2020-02-18 13:55:55 +00:00
Tomas Susanka
cfa14dcca0 legacy: improve script/setup
I believe the files were not cleared properly and switching between
emulator and firmware builds may have been troublesome.

Two changes:

1. `git clean` cleans only in the working tree and subdirectories.
We need to clear the related projects as well.

2. `vendor/QR-Code-generator/c/qrcodegen.{o,d}` are not git ignored
and since we use the `X` flag they are not removed. Changing to `x`,
which also removes untracked files.
2020-02-18 13:39:24 +00:00