Skip to content

Commit 283c806

Browse files
committed
[nrf mergeup] Merge commit 'e86f575f68fdac2cab1898e0a893c8c6d8fd0fa1' into upmerge-branch
Signed-off-by: Dominik Ermel <[email protected]>
2 parents 2baa417 + e86f575 commit 283c806

File tree

108 files changed

+3569
-800
lines changed

Some content is hidden

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

108 files changed

+3569
-800
lines changed

.github/workflows/espressif.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ on:
1010

1111
name: Espressif
1212

13+
concurrency:
14+
group: espressif-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
environment:
1519
strategy:
1620
matrix:
17-
targets: [esp32, esp32s2, esp32c3]
21+
targets: [esp32, esp32s2, esp32s3, esp32c3]
22+
features:
23+
- "sign-rsa2048,sign-rsa3072,sign-ec256,sign-ed25519"
1824
runs-on: ubuntu-latest
1925
env:
20-
MCUBOOT_TARGET: ${{ matrix.targets }}
26+
MCUBOOT_TARGETS: ${{ matrix.targets }}
27+
MCUBOOT_FEATURES: ${{ matrix.features }}
2128
steps:
2229
- uses: actions/checkout@v2
2330
with:

.github/workflows/fih_tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
name: FIH hardening
88

9+
concurrency:
10+
group: fih-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
config:
1115
strategy:

.github/workflows/imgtool.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
name: imgtool
88

9+
concurrency:
10+
group: imgtool-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
environment:
1115
runs-on: ubuntu-latest

.github/workflows/mynewt.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77

88
name: Mynewt
99

10+
concurrency:
11+
group: mynewt-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
environment:
1216
runs-on: ubuntu-latest

.github/workflows/sim.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,33 @@ on:
77

88
name: Sim
99

10+
concurrency:
11+
group: sim-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
environment:
1216
strategy:
1317
matrix:
1418
features:
1519
- "sig-ecdsa,sig-ecdsa-mbedtls,sig-ed25519,enc-kw,bootstrap"
1620
- "sig-rsa,sig-rsa3072,overwrite-only,validate-primary-slot,swap-move"
17-
- "enc-rsa"
18-
- "enc-aes256-rsa"
19-
- "enc-ec256"
20-
- "enc-aes256-ec256"
21-
- "enc-x25519"
22-
- "enc-aes256-x25519"
23-
- "sig-rsa overwrite-only large-write,sig-ecdsa overwrite-only large-write,sig-ecdsa-mbedtls overwrite-only large-write,multiimage overwrite-only large-write"
21+
- "enc-rsa,enc-rsa max-align-32"
22+
- "enc-aes256-rsa,enc-aes256-rsa max-align-32"
23+
- "enc-ec256,enc-ec256 max-align-32"
24+
- "enc-aes256-ec256,enc-aes256-ec256 max-align-32"
25+
- "enc-x25519,enc-x25519 max-align-32"
26+
- "enc-aes256-x25519,enc-aes256-x25519 max-align-32"
27+
- "sig-rsa overwrite-only,sig-ecdsa overwrite-only,sig-ecdsa-mbedtls overwrite-only,multiimage overwrite-only"
2428
- "sig-rsa validate-primary-slot,sig-ecdsa validate-primary-slot,sig-ecdsa-mbedtls validate-primary-slot,sig-rsa multiimage validate-primary-slot"
25-
- "enc-kw overwrite-only large-write,enc-rsa overwrite-only large-write"
26-
- "enc-aes256-kw overwrite-only large-write,enc-rsa overwrite-only large-write"
29+
- "enc-kw overwrite-only,enc-kw overwrite-only max-align-32"
30+
- "enc-rsa overwrite-only,enc-rsa overwrite-only max-align-32"
31+
- "enc-aes256-kw overwrite-only,enc-aes256-kw overwrite-only max-align-32"
2732
- "sig-rsa enc-rsa validate-primary-slot,swap-move enc-rsa sig-rsa validate-primary-slot bootstrap"
2833
- "sig-rsa enc-kw validate-primary-slot bootstrap,sig-ed25519 enc-x25519 validate-primary-slot"
2934
- "sig-ecdsa enc-kw validate-primary-slot"
3035
- "sig-ecdsa-mbedtls enc-kw validate-primary-slot"
31-
- "sig-rsa validate-primary-slot overwrite-only large-write"
36+
- "sig-rsa validate-primary-slot overwrite-only,sig-rsa validate-primary-slot overwrite-only max-align-32"
3237
- "sig-ecdsa enc-ec256 validate-primary-slot"
3338
- "sig-ecdsa-mbedtls enc-ec256-mbedtls validate-primary-slot"
3439
- "sig-ecdsa-mbedtls enc-aes256-ec256 validate-primary-slot"
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Copyright (c) 2022 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Build Zephyr samples with Twister
5+
6+
# Workflow triggers on PRs, pushes to main, once per day at midnight and can be started manually.
7+
on:
8+
# By default, pull_request includes: opened, synchronize, or reopened
9+
pull_request:
10+
branches:
11+
- main
12+
push:
13+
branches:
14+
- main
15+
schedule:
16+
- cron: 0 0 * * *
17+
# When triggered manually, ask for Zephyr and MCUBoot versions to check out
18+
workflow_dispatch:
19+
inputs:
20+
version_zephyr:
21+
description: 'Which Zephyr version to checkout?'
22+
required: true
23+
default: 'main'
24+
version_mcuboot:
25+
description: 'Which MCUBoot version to checkout?'
26+
required: true
27+
default: 'main'
28+
29+
env:
30+
ZEPHYR_VERSION: 'main'
31+
MCUBOOT_VERSION: 'main'
32+
33+
# Only cancel ongoing runs for PRs
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
build_zephyr_with_twister:
40+
runs-on: ubuntu-latest
41+
# Docker image from the zephyr upstream. Includes SDK and other required tools
42+
container:
43+
image: zephyrprojectrtos/ci:v0.21.0
44+
options: '--entrypoint /bin/bash'
45+
volumes:
46+
- /home/runners/zephyrproject:/github/cache/zephyrproject
47+
env:
48+
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
49+
50+
steps:
51+
- name: Set versions when workflow_dispatch
52+
if: github.event_name == 'workflow_dispatch'
53+
run: |
54+
echo "ZEPHYR_VERSION=${{ github.event.inputs.version_zephyr }}" >> $GITHUB_ENV
55+
echo "MCUBOOT_VERSION=${{ github.event.inputs.version_mcuboot }}" >> $GITHUB_ENV
56+
57+
- name: Set versions when pull_request
58+
if: github.event_name == 'pull_request'
59+
run: |
60+
echo "MCUBOOT_VERSION=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
61+
62+
- name: Checkout Zephyr
63+
uses: actions/checkout@v2
64+
with:
65+
repository: 'zephyrproject-rtos/zephyr'
66+
ref: ${{ env.ZEPHYR_VERSION }}
67+
path: 'repos/zephyr'
68+
69+
- name: Setup Zephyr
70+
working-directory: repos/zephyr
71+
run: |
72+
west init -l .
73+
west update
74+
75+
- name: Checkout MCUBoot
76+
uses: actions/checkout@v2
77+
with:
78+
repository: 'mcu-tools/mcuboot'
79+
ref: ${{ env.MCUBOOT_VERSION }}
80+
path: 'repos/bootloader/mcuboot'
81+
82+
- name: Run Twister tests
83+
working-directory: repos/zephyr
84+
env:
85+
test_paths: >
86+
-T ../bootloader/mcuboot/boot/zephyr
87+
-T ./tests/subsys/dfu
88+
-T ./samples/subsys/mgmt/mcumgr/smp_svr
89+
run: |
90+
export ZEPHYR_BASE=${PWD}
91+
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
92+
echo "Using Zephyr version: ${{ env.ZEPHYR_VERSION }}"
93+
echo "Using Mcuboot version: ${{ env.MCUBOOT_VERSION }}"
94+
./scripts/twister --inline-logs -v -N -M --integration --overflow-as-errors --retry-failed 2 ${test_paths}
95+
96+
- name: Upload Tests Results
97+
uses: actions/upload-artifact@v2
98+
if: always()
99+
with:
100+
name: Tests Results
101+
if-no-files-found: ignore
102+
path: |
103+
repos/zephyr/twister-out/twister.xml

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
[submodule "boot/espressif/hal/esp-idf"]
2626
path = boot/espressif/hal/esp-idf
2727
url = https://github.com/espressif/esp-idf.git
28-
branch = release/v4.3
28+
branch = release/v4.4

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
[travis]: https://travis-ci.org/mcu-tools/mcuboot
1717
[license]: https://github.com/mcu-tools/mcuboot/blob/main/LICENSE
1818

19-
This is MCUboot version 1.8.0
19+
This is MCUboot version 1.10.0-dev
2020

2121
MCUboot is a secure bootloader for 32-bits microcontrollers. It defines a
2222
common infrastructure for the bootloader and the system flash layout on
@@ -31,7 +31,7 @@ Currently, MCUboot works with the following operating systems and SoCs:
3131
- [Apache NuttX](https://nuttx.apache.org/)
3232
- [RIOT](https://www.riot-os.org/)
3333
- [Mbed OS](https://os.mbed.com/)
34-
- [Espressif IDF](https://idf.espressif.com/)
34+
- [Espressif](https://www.espressif.com/)
3535
- [Cypress/Infineon](https://www.cypress.com/)
3636

3737
RIOT is supported only as a boot target. We will accept any new
@@ -46,7 +46,7 @@ operating systems and SoCs:
4646
- [Apache NuttX](docs/readme-nuttx.md)
4747
- [RIOT](docs/readme-riot.md)
4848
- [Mbed OS](docs/readme-mbed.md)
49-
- [Espressif IDF](docs/readme-espressif.md)
49+
- [Espressif](docs/readme-espressif.md)
5050
- [Cypress/Infineon](boot/cypress/readme.md)
5151

5252
There are also instructions for the [Simulator](sim/README.rst).

boot/boot_serial/include/boot_serial/boot_serial.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ struct boot_uart_funcs {
4343
*/
4444
void boot_serial_start(const struct boot_uart_funcs *f);
4545

46+
/**
47+
* Start processing newtmgr commands for uploading image0 over serial.
48+
* Assumes serial port is open and waits for download command.
49+
* This function will return if there is no mcumgr command received within
50+
* the given timeout. If a command is received within this timeout, the
51+
* function is similar to boot_serial_start
52+
*/
53+
void boot_serial_check_start(const struct boot_uart_funcs *f, int timeout_in_ms);
54+
4655
#ifdef __cplusplus
4756
}
4857
#endif

0 commit comments

Comments
 (0)