Skip to content

Commit b54f9ac

Browse files
committed
synch with upstream d2122bc
Synchronized up to: mcu-tools/mcuboot@d2122bc - Added 'revert' support to direct-xip mode. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2 parents c71d218 + d2122bc commit b54f9ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2334
-95
lines changed

.github/workflows/imgtool.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: imgtool
7+
8+
jobs:
9+
environment:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Install packages
16+
run: |
17+
export PATH="$HOME/.local/bin:$PATH"
18+
./ci/imgtool_install.sh
19+
- name: Publish
20+
env:
21+
TWINE_TOKEN: ${{ secrets.TWINE_TOKEN }}
22+
run: |
23+
export PATH="$HOME/.local/bin:$PATH"
24+
./ci/imgtool_run.sh

.github/workflows/mynewt.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# For development, trigger this on any push.
2-
on: [pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
name: Mynewt
39

410
jobs:
511
environment:
6-
name: Mynewt build
712
runs-on: ubuntu-latest
813
steps:
914
- uses: actions/checkout@v2
@@ -16,6 +21,7 @@ jobs:
1621
free
1722
pwd
1823
- name: Signed commit check
24+
if: ${{ github.event_name == 'pull_request' }}
1925
run: |
2026
./ci/check-signed-off-by.sh
2127
- name: Mynewt install

.github/workflows/sim.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# For development, trigger this on any push.
2-
on: [pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
name: Sim
39

410
jobs:
511
environment:
@@ -20,7 +26,6 @@ jobs:
2026
- "sig-rsa validate-primary-slot overwrite-only large-write"
2127
- "sig-ecdsa enc-ec256 validate-primary-slot"
2228
- "sig-rsa validate-primary-slot overwrite-only downgrade-prevention"
23-
name: Sim
2429
runs-on: ubuntu-latest
2530
env:
2631
MULTI_FEATURES: ${{ matrix.features }}
@@ -36,6 +41,7 @@ jobs:
3641
free
3742
pwd
3843
- name: Signed commit check
44+
if: ${{ github.event_name == 'pull_request' }}
3945
run: |
4046
./ci/check-signed-off-by.sh
4147
- name: Install stable Rust

.mbedignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
boot/boot_serial/*
2+
boot/mynewt/*
3+
boot/zephyr/*
4+
boot/cypress/*
5+
ci/*
6+
docs/*
7+
ptest/*
8+
samples/*
9+
scripts/*
10+
sim/*
11+
testplan/*
12+
ext/cddl_gen/*
13+
ext/fiat/*
14+
ext/mbedtls/*
15+
ext/mbedtls-asn1/*
16+
ext/nrf/*
17+
ext/tinycrypt/tests/*
18+
ext/tinycrypt/*
19+
ext/tinycrypt-sha512/*

.travis.yml

+49-48
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,59 @@
1-
# Travis configuration. Build the simulator and run its tests.
1+
# Travis configuration. Run FI hardening tests.
22

3-
addons:
4-
apt:
5-
packages:
6-
- "python3-pip"
3+
language: minimal
74

8-
language: rust
9-
10-
cache:
11-
directories:
12-
- $HOME/TOOLCHAIN
13-
- cargo
5+
services:
6+
- docker
147

158
matrix:
169
include:
17-
# Runs each value defined in $SINGLE_FEATURES by itself in the order
18-
# the were defined.
19-
# - os: linux
20-
# env: SINGLE_FEATURES="sig-ecdsa sig-ed25519 enc-kw bootstrap" TEST=sim
21-
# - os: linux
22-
# env: SINGLE_FEATURES="none sig-rsa sig-rsa3072 overwrite-only validate-primary-slot swap-move" TEST=sim
23-
# - os: linux
24-
# env: SINGLE_FEATURES="enc-rsa enc-ec256 enc-x25519" TEST=sim
25-
26-
# Values defined in $MULTI_FEATURES consist of any number of features
27-
# to be enabled at the same time. The list of multi-values should be
28-
# separated by ',' and each list of values is run sequentially in the
29-
# defined order.
30-
# - os: linux
31-
# env: MULTI_FEATURES="sig-rsa overwrite-only large-write,sig-ecdsa overwrite-only large-write,multiimage overwrite-only large-write" TEST=sim
32-
# - os: linux
33-
# env: MULTI_FEATURES="sig-rsa validate-primary-slot,sig-ecdsa validate-primary-slot,sig-rsa multiimage validate-primary-slot" TEST=sim
34-
# - os: linux
35-
# env: MULTI_FEATURES="enc-kw overwrite-only large-write,enc-rsa overwrite-only large-write" TEST=sim
36-
# - os: linux
37-
# env: MULTI_FEATURES="sig-rsa enc-rsa validate-primary-slot,swap-move enc-rsa sig-rsa validate-primary-slot" TEST=sim
38-
# - os: linux
39-
# env: MULTI_FEATURES="sig-rsa enc-kw validate-primary-slot bootstrap,sig-ed25519 enc-x25519 validate-primary-slot" TEST=sim
40-
# - os: linux
41-
# env: MULTI_FEATURES="sig-ecdsa enc-kw validate-primary-slot" TEST=sim
42-
# - os: linux
43-
# env: MULTI_FEATURES="sig-rsa validate-primary-slot overwrite-only large-write,sig-ecdsa enc-ec256 validate-primary-slot" TEST=sim
44-
# - os: linux
45-
# env: MULTI_FEATURES="sig-rsa validate-primary-slot overwrite-only downgrade-prevention" TEST=sim
46-
47-
# - os: linux
48-
# language: go
49-
# env: TEST=mynewt
50-
# go:
51-
# - "1.12"
10+
- os: linux
11+
language: minimal
12+
env: BUILD_TYPE=RELEASE SKIP_SIZE=2,4,6,8,10 TEST=fih-tests DAMAGE_TYPE=SIGNATURE
13+
14+
- os: linux
15+
language: minimal
16+
env: BUILD_TYPE=RELEASE SKIP_SIZE=2,4,6,8,10 FIH_LEVEL=LOW TEST=fih-tests DAMAGE_TYPE=SIGNATURE
17+
18+
- os: linux
19+
language: minimal
20+
env: BUILD_TYPE=RELEASE SKIP_SIZE=2,4,6,8,10 FIH_LEVEL=MEDIUM TEST=fih-tests DAMAGE_TYPE=SIGNATURE
21+
22+
- os: linux
23+
language: minimal
24+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=2,4,6 TEST=fih-tests DAMAGE_TYPE=SIGNATURE
25+
26+
- os: linux
27+
language: minimal
28+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=2,4,6 FIH_LEVEL=LOW TEST=fih-tests DAMAGE_TYPE=SIGNATURE
29+
30+
- os: linux
31+
language: minimal
32+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=2,4,6 FIH_LEVEL=MEDIUM TEST=fih-tests DAMAGE_TYPE=SIGNATURE
33+
34+
- os: linux
35+
language: minimal
36+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=8,10 TEST=fih-tests DAMAGE_TYPE=SIGNATURE
5237

5338
- os: linux
54-
language: python
55-
env: TEST=imgtool
39+
language: minimal
40+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=8,10 FIH_LEVEL=LOW TEST=fih-tests DAMAGE_TYPE=SIGNATURE
41+
42+
- os: linux
43+
language: minimal
44+
env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=8,10 FIH_LEVEL=MEDIUM TEST=fih-tests DAMAGE_TYPE=SIGNATURE
45+
46+
## Corrupt image hash is not tested as it is in the unprotected TLV section
47+
## and is easy to calculate a valid hash for a changed image
48+
#- os: linux
49+
# language: minimal
50+
# env: BUILD_TYPE=MINSIZEREL SKIP_SIZE=2,4,6 TEST=fih-tests DAMAGE_TYPE=IMAGE_HASH
51+
52+
## Max profile is not tested as it requires HW entropy source which is not
53+
## present in the QEMU system being used for the tests.
54+
#- os: linux
55+
# language: minimal
56+
# env: FIH_LEVEL=MAX TEST=fih-tests
5657

5758
before_install:
5859
- |

README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
# [mcuboot](http://mcuboot.com/)
22

3+
[![Package on PyPI](https://img.shields.io/pypi/v/imgtool.svg)][pypi]
34
[![Coverity Scan Build Status](https://scan.coverity.com/projects/12307/badge.svg)][coverity]
4-
[![Build/Test](https://img.shields.io/travis/JuulLabs-OSS/mcuboot/master.svg?label=travis-ci)][travis]
5+
[![Build Status (Sim)](https://github.com/mcu-tools/mcuboot/workflows/Sim/badge.svg)][sim]
6+
[![Build Status (Mynewt)](https://github.com/mcu-tools/mcuboot/workflows/Mynewt/badge.svg)][mynewt]
7+
[![Publishing Status (imgtool)](https://github.com/mcu-tools/mcuboot/workflows/imgtool/badge.svg)][imgtool]
8+
[![Build Status (Travis CI)](https://img.shields.io/travis/mcu-tools/mcuboot/master.svg?label=travis-ci)][travis]
9+
[![Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)][license]
510

11+
[pypi]: https://pypi.org/project/imgtool/
612
[coverity]: https://scan.coverity.com/projects/mcuboot
7-
[travis]: https://travis-ci.org/JuulLabs-OSS/mcuboot
13+
[sim]: https://github.com/mcu-tools/mcuboot/actions?query=workflow:Sim
14+
[mynewt]: https://github.com/mcu-tools/mcuboot/actions?query=workflow:Mynewt
15+
[imgtool]: https://github.com/mcu-tools/mcuboot/actions?query=workflow:imgtool
16+
[travis]: https://travis-ci.org/mcu-tools/mcuboot
17+
[license]: https://github.com/mcu-tools/mcuboot/blob/master/LICENSE
818

9-
This is mcuboot version 1.6.0
19+
This is mcuboot version 1.7.0-rc2
1020

1121
MCUboot is a secure bootloader for 32-bit MCUs. The goal of MCUboot is to
1222
define a common infrastructure for the bootloader, system flash layout on
@@ -25,14 +35,15 @@ Instructions for different operating systems can be found here:
2535
- [Zephyr](docs/readme-zephyr.md)
2636
- [Mynewt](docs/readme-mynewt.md)
2737
- [RIOT](docs/readme-riot.md)
38+
- [Mbed-OS](docs/readme-mbed.md)
2839
- [Simulator](sim/README.rst)
2940

3041
## Roadmap
3142

3243
The issues being planned and worked on are tracked using GitHub issues. To
3344
participate please visit:
3445

35-
[MCUBoot GitHub Issues](https://github.com/JuulLabs-OSS/mcuboot/issues)
46+
[MCUBoot GitHub Issues](https://github.com/mcu-tools/mcuboot/issues)
3647

3748
~~Issues were previously tracked on [MCUboot JIRA](https://runtimeco.atlassian.net/projects/MCUB/summary)
3849
, but it is now deprecated.~~

boot/bootutil/include/bootutil/image.h

+10
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ struct flash_area;
8989
#define IMAGE_TLV_DEPENDENCY 0x40 /* Image depends on other image */
9090
#define IMAGE_TLV_SEC_CNT 0x50 /* security counter */
9191
#define IMAGE_TLV_BOOT_RECORD 0x60 /* measured boot record */
92+
/*
93+
* vendor reserved TLVs at xxA0-xxFF,
94+
* where xx denotes the upper byte
95+
* range. Examples:
96+
* 0x00a0 - 0x00ff
97+
* 0x01a0 - 0x01ff
98+
* 0x02a0 - 0x02ff
99+
* ...
100+
* 0xffa0 - 0xfffe
101+
*/
92102
#define IMAGE_TLV_ANY 0xffff /* Used to iterate over all TLV */
93103

94104
struct image_version {

0 commit comments

Comments
 (0)