-
Notifications
You must be signed in to change notification settings - Fork 249
[DNM] [nrf mergeup] merge upsteram up to commit 9686e70 #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows the CI targets to be built if MCUBoot is a dependency of other repos as well as current local package only build support. Signed-off-by: Fabio Utzig <utzig@apache.org>
Add button 1 as default serial detect pin for nrf9160_pca10090 Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Follow the device name changes in Zephyr. Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
USB should be disabled if any usb func is enabled. fix nrfconnect#477 Signed-off-by: Jun Li <jun.r.li@intel.com>
Signed-off-by: Fabio Utzig <utzig@apache.org>
imgtool verify -k <some-key.(pub|sec)> <img-file> Allow imgtool to validate that an image has a valid sha256sum and that it was signed by the supplied key. NOTE: this does not yet support verifying encrypted images Signed-off-by: Fabio Utzig <utzig@apache.org>
Prior to this change, the scratch image trailer had a different format from a slot image trailer. Specifically: 1. The scratch trailer only contained a single set of status entries (three bytes); the slot trailer contained `BOOT_STATUS_MAX_ENTRIES` sets of status entries. 2. The scratch trailer did not contain the `copy_done` field. This inconsistency required some extra conditional logic in the trailer handling code. It is simpler to just use the same trailer format everywhere. This commit removes this inconsistency. Now, the scratch trailer structure is identical to that of the slot trailer. Signed-off-by: Christopher Collins <ccollins@apache.org>
Signed-off-by: Christopher Collins <ccollins@apache.org>
This fixes nrfconnect#480. When mcuboot rewrites image trailers during a swap, some information is lost. If a reset occurs before the swap completes, mcuboot may not be able to determine what which swap type to resume upon startup. Specifically, if a "revert" swap gets interupted, mcuboot will perform an extraneous swap on the subsequent boot. See mcu-tools/mcuboot#480 for details. This commit adds an additional field to the image trailer: `swap-type`. The new trailer structure is illustrated below: ``` 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ ~ ~ Swap status (BOOT_MAX_IMG_SECTORS * min-write-size * 3) ~ ~ ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Encryption key 0 (16 octets) [*] ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Encryption key 1 (16 octets) [*] ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Swap size | 0xff padding (4 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Swap type | 0xff padding (7 octets) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Copy done | 0xff padding (7 octets) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Image OK | 0xff padding (7 octets) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ MAGIC (16 octets) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ``` The `swap-type` field contains one of the `BOOT_SWAP_TYPE_[...]` constants. Every time a trailer is written, this field is written along with it. When resuming an interrupted swap, mcuboot uses this field alone to determine the type of swap being resumed. For new swap operations (non-resume case), this field is not read at all; instead, mcuboot consults the `boot_swap_tables` array to determine the swap operation to perform (as it did prior to this commit). Some additional changes were necessary to make all the simulated unit tests pass: * Before initiating a new swap operation, always write the image trailer to the scratch area. This step allows mcuboot to persist the `swap-type` field somewhere before erasing the trailer in the primary slot. If a reset occurs immediately after the erase, mcuboot recovers by using the trailer in the scratch area. * Related to the above: if the scratch area is being used to hold status bytes (because there are no spare sectors in the primary slot), erase the scratch area immediately after the trailer gets written to the primary slot. This eliminates ambiguity regarding the location of the current trailer in case a reset occurs shortly afterwards. Signed-off-by: Christopher Collins <ccollins@apache.org>
Make images slightly larger to allow more swap status metadata to be written to flash, to increase amount of debugging info and possibility of failures on random write fails. Signed-off-by: Fabio Utzig <utzig@apache.org> Signed-off-by: Christopher Collins <ccollins@apache.org>
This extends the test+revert case with an interruption on the revert stage, as it was previously only interrupted on the test stage. For simplicity the interruption happens on the same interruption point for both test and revert stages. Signed-off-by: Fabio Utzig <utzig@apache.org> Signed-off-by: Christopher Collins <ccollins@apache.org>
This adds ed25519 signature support using the "prehash" method. Instead of using the direct contents of the image and header payloads, a sha256 is generated and signed (SHA256-Ed25519). This allows for compatibility with already existing tools that use the sha256 hash, like mcumgr, etc. Signed-off-by: Fabio Utzig <utzig@apache.org>
This adds the boringssl version of fiat-crypto. The version bundled here had most if its non-used code removed, like signing, X25519 curve operations not required by verification, etc. Under boringssl tree, fiat can be found in third_party/fiat. The version included here comes from a boringssl tree where the last commit is f109f2087349712d3ac717d15fab48e130618110. Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Fabio Utzig <utzig@apache.org>
Since Ed25519 curve primitives are available since cryptography package version 2.6 need to bump its version. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
|
Found the following issues, please fix and resubmit: Gitlint issuesCommit 3c469bc: Commit 9771028: Commit 4876484: Commit a1e8e43: Commit 1171df9: Commit 705dfb3: Commit 8101d1f: Commit fc07eab: Commit 28d012c: Commit a1c1204: Commit 2c88e69: Commit 2adef70: Commit 4a5477a: Commit 05b594b: Commit 2dc9f8f: Commit 3929743: Commit 19fd79a: Commit 3501c01: Commit 105b59a: Commit 61f86fd: Commit e1727d9: Commit 63ae7de: |
|
cc @sigvartmh |
|
gitlint issues are inherited form the upsteram. |
rlubos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with http_application_update, seems to work fine.
Thanks to above head of nrfconnect/sdk-mcuboot#43 will be used. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Thanks to above head of nrfconnect/sdk-mcuboot#43 will be used. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Synch up to: mcu-tools/mcuboot@ce50334 merged by GitHub GUI nrfconnect#43 Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
reverted commits which were present in the upstream:
aebd4b9 [nrf fromlist] boot: serial recovery: Add pca10090 default detect pin
4ef858c [nrf toup] boot: zephyr: Update USB CDC ACM device name
content: