Skip to content

Upmerge 2025.04.23 #425

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

Open
wants to merge 205 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
c0bb133
boot: zephyr: boards: Add frdm-mcxn236 configuration
butok Mar 7, 2025
4535ad9
boot: Additional flash_area_open removals
de-nordic Mar 11, 2025
a01ca4c
bootutil: Fix ASN1 bypass not building
de-nordic Mar 12, 2025
ec86244
zephyr: Do not compile ASN1 code when bypassed
de-nordic Mar 12, 2025
0ba80ff
zephyr: Prevent selecting MBEDTLS_ASN1_PARSE_C when not needed
de-nordic Mar 12, 2025
f523c60
zephyr: Fix ED25519 compilation with mbedTLS
de-nordic Mar 12, 2025
b0c7df9
boot: bootutil: Fix usage of flash_area object
nordicjm Mar 13, 2025
e5d8640
zephyr: Add missing selection for allowed SHA algorithms
de-nordic Mar 13, 2025
1ead4a6
boot: zephyr: kconfig: Remove superflous default n lines
nordicjm Mar 14, 2025
2a2b562
bootutil: Add support for devices without erase and reduced erases
de-nordic Nov 11, 2024
2346d69
zephyr: Add support for devices without erase and reduced erases
de-nordic Nov 12, 2024
2f294d1
zephyr: Use flash_area_flatten in bs_custom_storage_erase
de-nordic Nov 12, 2024
c8470fb
boot: Enable MCUBOOT_DEV_WITH_ERASE in other systems
de-nordic Dec 10, 2024
2d681da
bootutil: Fix ed25519 pure signature verification
de-nordic Mar 18, 2025
9fa0c6b
zephyr: Fix translation of PSA Kconfig to MCUboot config
de-nordic Mar 18, 2025
b92d4dd
boot: zephyr: Only supply MBEDTLS config file path if set
nordicjm Mar 26, 2025
8b7c7cc
zephyr: flash map: fix comparison signedness
rbrscoleman Mar 26, 2025
b671a8f
docs: compression_format: Fix tags
nordicjm Mar 26, 2025
639a1ec
sim: Make TLV size for ECDSA signature constant
taltenbach Feb 23, 2025
66c21af
sim: Generate smallest possible oversized image
taltenbach Feb 23, 2025
88294be
sim: Fix incorrect trailer size computation for overwrite-only
taltenbach Feb 23, 2025
993c2ff
boot/bootutil/ram_load: Add flash area pointer to bootloader state
edersondisouza Mar 25, 2025
881608e
boot/zephyr: Use MCUBOOT_RAM_LOAD instead of CONFIG_BOOT_RAM_LOAD
edersondisouza Mar 25, 2025
33ad497
boot: zephyr: add support for mcx_n9xx_evk
DerekSnell Mar 27, 2025
ed434f3
boot: bootutil: Fix clash of STRUCT_PACKED definition
nordicjm Mar 31, 2025
091af82
boot/zephyr: nrf54h20dk adaptations
nordic-mik7 Mar 28, 2025
6678c37
imgtool: dumpinfo: Avoid exit and use return
Mar 17, 2025
572b8fb
boot: zephyr: flash_map_extended: Add pointless workaround for clang
nordicjm Apr 4, 2025
6b272e2
mynewt: Start watchdog when enable by syscfg
kasjer Apr 6, 2025
f2b076c
boot/mynewt: remove redundant mbedtls flag and enable CTR
m-gorecki Mar 24, 2025
454c033
bootutil: swap-scratch: Fix conflicts after support of devices w/o erase
taltenbach Apr 8, 2025
5aed424
swap_move: correct appsize calcs and warning
bobwolff68 Apr 9, 2025
de7a9dc
zephyr: Disable SPI_NOR by default for nrf7002dk/nrf5340/cpuapp
de-nordic Apr 9, 2025
8a9627d
boot/zephyr/boards: nrf54h20dk 'iron' board configuration
nordic-mik7 Apr 10, 2025
7a33bca
boot: bootutil: loader: Add include for flash function
nordicjm Apr 11, 2025
20f98e0
Updates for 2.2.0-rc1 release
d3zd3z Apr 4, 2025
efa3039
boot: bootutil: swap_move: Fix maximum application size
nordicjm Apr 17, 2025
6cbea0a
boot: boot_serial: Fix swap using offset
nordicjm Apr 17, 2025
f9e4e52
zephyr: Fix TLV area was included in trailer size when rounding up
taltenbach Apr 20, 2025
d5d3359
zephyr: Fix trailer size computation for swap-scratch
taltenbach Apr 20, 2025
47d826e
boot: bootutil: swap_offset: Fix maximum application size
nordicjm Apr 17, 2025
8131548
Revert "zephyr: arm: Update reading the flash image reset vector"
nordicjm Apr 23, 2025
bc18d7d
boot: boot_serial: Fix issue with CBOR and setting image state
nordicjm Apr 25, 2025
5ef87c7
boot: zephyr: kconfig: Fix BOOT_SWAP_USING_MOVE description
butok Apr 29, 2025
f6e8e88
boot: bootutil: Move erase function location
nordicjm Apr 28, 2025
15b36f9
boot: zephyr: kconfig: enable dependencies of Mbed TLS Kconfig option
tomi-font Apr 29, 2025
413eb38
boot: zephyr: flash_map: Fix missing include
nordicjm Apr 30, 2025
1b2d261
boot: zephyr: flash_map: Fix unused argument
nordicjm May 1, 2025
a98bff9
boot: zephyr: kconfig: Fix issues and re-order
nordicjm May 1, 2025
7253f01
boot: bootutil: Refactor erase functionality to fix watchdog feeding
nordicjm Apr 23, 2025
f76fba7
boot: bootutil: swap_scratch: Fix issue with bricking device
nordicjm Apr 30, 2025
990b1fc
docs: release-notes: Add additional fixes
nordicjm Apr 30, 2025
14667a5
Revert "[nrf noup] nrf_cleanup: nRF54h: fix missing peripheral cleanup"
nordicjm May 2, 2025
7cca08d
Revert "[nrf noup] boot: bootutil: key revocation fix"
nordicjm May 2, 2025
bf73335
Revert "[nrf noup] boot: zephyr: boards: nrf54lm20apdk"
nordicjm Apr 28, 2025
f1119aa
Revert "[nrf noup] zephyr: Fix issue with unpadded encrypted updates"
nordicjm Apr 28, 2025
638332e
Revert "[nrf noup] nrf_cleanup: nRF54l: disable cleanup on UARTE pins"
nordicjm Apr 28, 2025
bd1014a
Revert "[nrf fromlist] zephyr: Disable SPI_NOR by default for nrf7002…
nordicjm Apr 28, 2025
c41aad6
Revert "[nrf noup] boot/zephyr/Kconfig: fix MBEDTLS_CFG_FILE value"
nordicjm Apr 28, 2025
b463825
Revert "[nrf fromlist] boot: zephyr: flash_map_extended: Add pointles…
nordicjm Apr 28, 2025
fff8be2
Revert "[nrf noup] boot/zephyr/nrf_cleanup: cleanup uarte pins"
nordicjm Apr 28, 2025
2b3b1ef
Revert "[nrf noup] bootutil: key revocation"
nordicjm Apr 28, 2025
85e1a34
Revert "[nrf noup] boot: bootutil: loader: Fix monotomic counter upda…
nordicjm Apr 28, 2025
57db302
Revert "[nrf noup] zephyr: Allow hash only for nrf54l devices"
nordicjm Apr 28, 2025
0e99cc3
Revert "[nrf noup] boot/zephyr: nrf54h20dk cleanup adaptations"
nordicjm Apr 28, 2025
b7fa281
Revert "[nrf noup] boot/zephyr: nrf54h20dk board support"
nordicjm Apr 28, 2025
3bda233
Revert "[nrf fromlist] boot/zephyr: nrf54h20dk adaptations"
nordicjm Apr 28, 2025
a0266e6
Revert "[nrf fromtree] boot: bootutil: Fix clash of STRUCT_PACKED def…
nordicjm Apr 28, 2025
082d339
Revert "[nrf fromlist] docs: compression_format: Fix tags"
nordicjm Apr 28, 2025
91f14f2
Revert "[nrf fromtree] boot: zephyr: Only supply MBEDTLS config file …
nordicjm Apr 28, 2025
bf8f264
Revert "[nrf noup] zephyr: Use mbedTLS specific C functions with RSA"
nordicjm Apr 28, 2025
caf6384
Revert "[nrf noup] boot: bootutil: Allow configuring number of KMU keys"
nordicjm Apr 28, 2025
e30e27c
Revert "[nrf noup] boot: zephyr: Add experimental selection to compre…
nordicjm Apr 28, 2025
ecce880
Revert "[nrf noup] bootutil: Add support for KMU stored ED25519 signa…
nordicjm Apr 28, 2025
32286a1
Revert "[nrf noup] zephyr: Add support for compressed image updates"
nordicjm Apr 28, 2025
92e4d33
Revert "[nrf noup] zephyr: Fix path variables"
nordicjm Apr 28, 2025
016b73f
Revert "[nrf noup] zephyr: sdk-nrf specific overrides on PSA Kconfigs"
nordicjm Apr 28, 2025
24273bb
Revert "[nrf fromtree] bootutil: Fix ed25519 pure signature verificat…
nordicjm Apr 28, 2025
3f6391a
Revert "[nrf fromtree] zephyr: Add missing selection for allowed SHA …
nordicjm Apr 28, 2025
bdfe4e7
Revert "[nrf fromtree] zephyr: Fix ED25519 compilation with mbedTLS"
nordicjm Apr 28, 2025
1e8ff8f
Revert "[nrf fromtree] zephyr: Prevent selecting MBEDTLS_ASN1_PARSE_C…
nordicjm Apr 28, 2025
06f53ae
Revert "[nrf fromtree] zephyr: Do not compile ASN1 code when bypassed"
nordicjm Apr 28, 2025
ae3f5ed
Revert "[nrf fromtree] bootutil: Fix ASN1 bypass not building"
nordicjm Apr 28, 2025
10b64c4
Revert "[nrf noup] partition_manager: Add support for internal flash …
nordicjm Apr 28, 2025
68795c9
Revert "[nrf noup] boot: zephyr: boards: Disabled NCS boot banner for…
nordicjm Apr 28, 2025
78e8751
Revert "[nrf noup] sysflash: Add missing _FLASH_0_ID definitions"
nordicjm Apr 28, 2025
9a023fc
Revert "[nrf noup] boot: Remove child/parent references"
nordicjm Apr 28, 2025
26f1704
Revert "[nrf noup] boot/zephyr/boards: configure fastest RRAM operati…
nordicjm Apr 28, 2025
884a2e3
Revert "[nrf noup] boot: zephyr: serial_recovery: Add nRF5340 Kconfig…
nordicjm Apr 28, 2025
52daf3c
Revert "[nrf noup] boot/zephyr/Kconfig: conditionally disable BOOT_MA…
nordicjm Apr 28, 2025
f5972f6
Revert "[nrf noup] boot/zephyr: add nrf54l15dk ext flash configs"
nordicjm Apr 28, 2025
dc59c67
Revert "[nrf noup] workflows: Add a backport workflow"
nordicjm Apr 28, 2025
f1459a2
Revert "[nrf noup] boards: Thingy:91 X release config"
nordicjm Apr 28, 2025
c5a5467
Revert "[nrf noup] boot: bootutil: loader: Add s0/s1 checking of MCUb…
nordicjm Apr 28, 2025
63ffd7b
Revert "[nrf noup] treewide: Add support for sysbuild assigned images"
nordicjm Apr 28, 2025
8b6e9a2
Revert "[nrf noup] boot: zephyr: Do not lock PCD region with TF-M"
nordicjm Apr 28, 2025
e69d9ed
Revert "[nrf noup] boot: Add shared crypto for ECDSA and SHA"
nordicjm Apr 28, 2025
401adbd
Revert "[nrf noup] boards: nrf54l15dk: Disable FPROTECT"
nordicjm Apr 28, 2025
276ba1e
Revert "[nrf noup] bootutil: loader: Fix netcore address checking"
nordicjm Apr 28, 2025
4cb67bf
Revert "[nrf noup] boot/../loader: reboot after updating s0/s1"
nordicjm Apr 28, 2025
8ef804f
Revert "[nrf noup] boot/../loader: skip downgrade prevention for s1/s0"
nordicjm Apr 28, 2025
dbb36bc
Revert "[nrf noup] boot: zephyr: Add NCS boot banner"
nordicjm Apr 28, 2025
7ca681b
Revert "[nrf noup] zephyr/boards: fix nrf54l15pdk ext flash dts overlay"
nordicjm Apr 28, 2025
2dfe89d
Revert "[nrf noup] Revert of zephyr: arm: Update reading the flash im…
nordicjm Apr 28, 2025
03f6c7a
Revert "[nrf noup] boot/zephyr: fix fw_info search"
nordicjm Apr 28, 2025
8729430
Revert "[nrf noup] boot: zephyr: Disable boot banner if NCS_BOOT_BANN…
nordicjm Apr 28, 2025
c9afc53
Revert "[nrf noup] boards: thingy91x: enable serial recovery"
nordicjm Apr 28, 2025
839adf9
Revert "[nrf noup] boot/zephyr/boards: nrf54l15pdk ext-flash update"
nordicjm Apr 28, 2025
8724def
Revert "[nrf noup] boot/zephyr/boards: nrf54l15pdk ext-flash partition"
nordicjm Apr 28, 2025
651d79f
Revert "[nrf noup] loader: remove cleanup for direct xip mode"
nordicjm Apr 28, 2025
e76e785
Revert "[nrf noup] boards: nrf54l15: Disable FPROTECT"
nordicjm Apr 28, 2025
afa96bc
Revert "[nrf noup] loader: introduced cleanup of unusable secondary s…
nordicjm Apr 28, 2025
dba0e5c
Revert "[nrf noup] sysflash: Add support for three images"
nordicjm Apr 28, 2025
194e0dd
Revert "[nrf noup] sysflash: Move partition manager definitions to pm…
nordicjm Apr 28, 2025
c946ae4
Revert "[nrf noup] boot: Add support for NSIB and multi-image"
nordicjm Apr 28, 2025
f6e9387
Revert "[nrf noup] loader: Fix missing PCD define check"
nordicjm Apr 28, 2025
23e2885
Revert "[nrf noup] loader: work-around for multi-image builds"
nordicjm Apr 28, 2025
6e006f1
Revert "[nrf noup] boot/zephyr/boards: nRF54l15pdk ext flash cfg"
nordicjm Apr 28, 2025
101090e
Revert "[nrf noup] boards: thingy53: disable GPIO ISR support"
nordicjm Apr 28, 2025
c1988ae
Revert "[nrf noup] loader: Add firmware version check downgrade preve…
nordicjm Apr 28, 2025
73899c3
Revert "[nrf noup] zephyr: Boot even if EXT_ABI is not provided"
nordicjm Apr 28, 2025
11a7be5
Revert "[nrf noup] zephyr: Add RAM flash configuration to cache for s…
nordicjm Apr 28, 2025
922ee4b
Revert "[nrf noup] loader: Do not check reset vector for XIP image"
nordicjm Apr 28, 2025
4cac6fe
Revert "[nrf noup] loader: Fix reading reset addr to support ext flash"
nordicjm Apr 28, 2025
0f4306d
Revert "[nrf noup] zephyr: Clean up non-secure RAM if enabled"
nordicjm Apr 28, 2025
4577b08
Revert "[nrf noup] zephyr: clean peripherals state before boot"
nordicjm Apr 28, 2025
14a6f38
Revert "[nrf noup] boot: nrf53-specific customizations"
nordicjm Apr 28, 2025
cc3c415
Revert "[nrf noup] treewide: add NCS partition manager support"
nordicjm Apr 28, 2025
28cae54
Revert "[nrf noup] boards: thingy91x: add board config"
nordicjm Apr 28, 2025
ddeb2c9
Revert "[nrf noup] zephyr: Restore default RTC user channel count"
nordicjm Apr 28, 2025
9ca0c46
Revert "[nrf noup] boards: add support for Thingy:91"
nordicjm Apr 28, 2025
3277060
Revert "[nrf noup] zephyr: add 'minimal' configuration files"
nordicjm Apr 28, 2025
3ec01d1
Revert "[nrf noup] zephyr: Remove duplication from cmake"
nordicjm Apr 28, 2025
6726001
Revert "[nrf noup] github: Add a commit tags check workflow"
nordicjm Apr 28, 2025
bd8673c
[nrf mergeup] Merge upstream up to commit 990b1fcb367e27056b282f183e8…
nordicjm May 2, 2025
4daa1a0
[nrf noup] github: Add a commit tags check workflow
carlescufi Oct 10, 2023
fbd812f
[nrf noup] zephyr: Remove duplication from cmake
sigvartmh Mar 26, 2019
b72ac7b
[nrf noup] zephyr: add 'minimal' configuration files
mbolivar-nordic Sep 3, 2021
94db986
[nrf noup] boards: add support for Thingy:91
bjda Sep 20, 2019
600075a
[nrf noup] zephyr: Restore default RTC user channel count
Damian-Nordic Mar 21, 2022
b192bec
[nrf noup] boards: thingy91x: add board config
maxd-nordic Dec 8, 2023
04b5af5
[nrf noup] treewide: add NCS partition manager support
SebastianBoe Dec 12, 2018
1e440b1
[nrf noup] boot: nrf53-specific customizations
sigvartmh Aug 27, 2020
696915b
[nrf noup] zephyr: clean peripherals state before boot
nvlsianpu Feb 27, 2020
d184f5e
[nrf noup] zephyr: Clean up non-secure RAM if enabled
sigvartmh Jan 6, 2023
60e96e6
[nrf noup] loader: Fix reading reset addr to support ext flash
chrta Feb 10, 2022
891be04
[nrf noup] loader: Do not check reset vector for XIP image
de-nordic Sep 22, 2023
a7939ca
[nrf noup] zephyr: Add RAM flash configuration to cache for sysbuild
nordicjm Sep 18, 2023
f8b5978
[nrf noup] zephyr: Boot even if EXT_ABI is not provided
sigvartmh Oct 17, 2023
3f5a655
[nrf noup] loader: Add firmware version check downgrade prevention
sigvartmh Sep 27, 2023
b8ae992
[nrf noup] boards: thingy53: disable GPIO ISR support
nika-nordic Oct 9, 2023
c660b5b
[nrf noup] boot/zephyr/boards: nRF54l15pdk ext flash cfg
nvlsianpu Apr 11, 2024
07cb819
[nrf noup] loader: work-around for multi-image builds
sigvartmh Mar 30, 2021
bdd93a3
[nrf noup] loader: Fix missing PCD define check
nordicjm Aug 31, 2023
d936c85
[nrf noup] boot: Add support for NSIB and multi-image
sigvartmh May 31, 2023
3a2a1b9
[nrf noup] sysflash: Move partition manager definitions to pm_sysflash.h
de-nordic Aug 10, 2023
e182d40
[nrf noup] sysflash: Add support for three images
de-nordic Aug 11, 2023
bbd8f48
[nrf noup] loader: introduced cleanup of unusable secondary slot
nvlsianpu Feb 15, 2024
854cded
[nrf noup] boards: nrf54l15: Disable FPROTECT
gchwier Apr 16, 2024
f4bea2f
[nrf noup] loader: remove cleanup for direct xip mode
gchwier May 17, 2024
91ddb13
[nrf noup] boot/zephyr/boards: nrf54l15pdk ext-flash partition
nvlsianpu Apr 15, 2024
d23fd6e
[nrf noup] boot/zephyr/boards: nrf54l15pdk ext-flash update
nvlsianpu May 20, 2024
3aee05c
[nrf noup] boards: thingy91x: enable serial recovery
maxd-nordic Mar 12, 2024
a671bba
[nrf noup] boot: zephyr: Disable boot banner if NCS_BOOT_BANNER is used
rlubos May 17, 2024
09475ad
[nrf noup] boot/zephyr: fix fw_info search
nvlsianpu May 27, 2024
dfe2edc
[nrf noup] zephyr/boards: fix nrf54l15pdk ext flash dts overlay
nvlsianpu Jun 5, 2024
33d25f8
[nrf noup] boot: zephyr: Add NCS boot banner
nordicjm Jun 11, 2024
1623929
[nrf noup] boot/../loader: skip downgrade prevention for s1/s0
nvlsianpu Jun 13, 2024
fe08e7f
[nrf noup] boot/../loader: reboot after updating s0/s1
nvlsianpu Jun 18, 2024
770f205
[nrf noup] bootutil: loader: Fix netcore address checking
nordicjm Aug 29, 2024
06af3e2
[nrf noup] boards: nrf54l15dk: Disable FPROTECT
nvlsianpu Sep 18, 2024
a24bb6e
[nrf noup] boot: Add shared crypto for ECDSA and SHA
sigvartmh Feb 14, 2019
2bd560c
[nrf noup] boot: zephyr: Do not lock PCD region with TF-M
MarkusLassila Aug 30, 2024
fa1b649
[nrf noup] treewide: Add support for sysbuild assigned images
nordicjm Sep 10, 2024
71d19a5
[nrf noup] boot: bootutil: loader: Add s0/s1 checking of MCUboot image
nordicjm Oct 15, 2024
f98ae0b
[nrf noup] boards: Thingy:91 X release config
maxd-nordic Oct 23, 2024
ae09b05
[nrf noup] workflows: Add a backport workflow
carlescufi Oct 25, 2024
95eca04
[nrf noup] boot/zephyr: add nrf54l15dk ext flash configs
michalek-no Nov 7, 2024
136af05
[nrf noup] boot/zephyr/Kconfig: conditionally disable BOOT_MAX_IMG_SE…
nvlsianpu Sep 19, 2024
d9d880f
[nrf noup] boot: zephyr: serial_recovery: Add nRF5340 Kconfig override
nordicjm Dec 9, 2024
6f72d72
[nrf noup] boot/zephyr/boards: configure fastest RRAM operations
nvlsianpu Dec 17, 2024
3b77535
[nrf noup] boot: Remove child/parent references
nordicjm Dec 5, 2024
a712544
[nrf noup] sysflash: Add missing _FLASH_0_ID definitions
de-nordic Jan 15, 2025
491046b
[nrf noup] boot: zephyr: boards: Disabled NCS boot banner for thingy 53
kkasperczyk-no Jan 24, 2025
7069844
[nrf noup] partition_manager: Add support for internal flash netcore DFU
hellesvik-nordic Feb 6, 2025
99486f8
[nrf noup] zephyr: sdk-nrf specific overrides on PSA Kconfigs
de-nordic Mar 4, 2025
70ebdf6
[nrf noup] zephyr: Fix path variables
nordicjm Jul 11, 2023
452a82b
[nrf noup] zephyr: Add support for compressed image updates
nordicjm Aug 22, 2024
c0e5542
[nrf noup] bootutil: Add support for KMU stored ED25519 signature key
de-nordic Sep 20, 2024
bc6a181
[nrf noup] boot: zephyr: Add experimental selection to compression
nordicjm Nov 7, 2024
4fa3bff
[nrf noup] boot: bootutil: Allow configuring number of KMU keys
nordicjm Dec 2, 2024
ce12bdf
[nrf noup] zephyr: Use mbedTLS specific C functions with RSA
de-nordic Mar 14, 2025
3a19e62
[nrf noup] boot/zephyr: nrf54h20dk board support
nordic-mik7 Mar 10, 2025
eeced3f
[nrf noup] boot/zephyr: nrf54h20dk cleanup adaptations
nordic-mik7 Mar 28, 2025
d79dd4d
[nrf noup] zephyr: Allow hash only for nrf54l devices
de-nordic Mar 19, 2025
640c336
[nrf noup] boot: bootutil: loader: Fix monotomic counter update issues
nordicjm Mar 7, 2025
4956168
[nrf noup] bootutil: key revocation
michalek-no Mar 17, 2025
8eb3782
[nrf noup] boot/zephyr/nrf_cleanup: cleanup uarte pins
nvlsianpu Mar 5, 2024
853a223
[nrf noup] boot/zephyr/Kconfig: fix MBEDTLS_CFG_FILE value
nvlsianpu Apr 1, 2025
f540b99
[nrf noup] nrf_cleanup: nRF54l: disable cleanup on UARTE pins
nvlsianpu Apr 11, 2025
9540944
[nrf noup] zephyr: Fix issue with unpadded encrypted updates
nordicjm Apr 22, 2025
81b2039
[nrf noup] boot: zephyr: boards: nrf54lm20apdk
michalek-no Apr 23, 2025
9ee3c52
[nrf noup] boot: bootutil: key revocation fix
michalek-no Apr 23, 2025
41c1311
[nrf noup] nrf_cleanup: nRF54h: fix missing peripheral cleanup
ahasztag Apr 28, 2025
7bdc0e1
[nrf noup] boot: bootutil: swap_nsib: Update erase function
nordicjm May 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[travis]: https://travis-ci.org/mcu-tools/mcuboot
[license]: https://github.com/mcu-tools/mcuboot/blob/main/LICENSE

This is MCUboot version 2.1.0
This is MCUboot version 2.2.0-rc1

MCUboot is a secure bootloader for 32-bits microcontrollers. It defines a
common infrastructure for the bootloader and the system flash layout on
Expand Down
159 changes: 89 additions & 70 deletions boot/boot_serial/src/boot_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,19 @@ static int boot_serial_get_hash(const struct image_header *hdr,
#endif
#endif

static zcbor_state_t cbor_state[2];
#ifdef ZCBOR_CANONICAL
/* Allow 3 extra states for backup states for all commands */
#define CBOR_EXTRA_STATES 3
#else
#define CBOR_EXTRA_STATES 0
#endif

static zcbor_state_t cbor_state[2 + CBOR_EXTRA_STATES];

void reset_cbor_state(void)
{
zcbor_new_encode_state(cbor_state, 2, (uint8_t *)bs_obuf,
sizeof(bs_obuf), 0);
zcbor_new_encode_state(cbor_state, ARRAY_SIZE(cbor_state), (uint8_t *)bs_obuf,
sizeof(bs_obuf), 0);
}

/**
Expand Down Expand Up @@ -290,7 +297,7 @@ bs_list(char *buf, int len)
zcbor_list_start_encode(cbor_state, 5);
image_index = 0;
IMAGES_ITER(image_index) {
#ifdef MCUBOOT_SERIAL_IMG_GRP_IMAGE_STATE
#if defined(MCUBOOT_SERIAL_IMG_GRP_IMAGE_STATE) || defined(MCUBOOT_SWAP_USING_OFFSET)
int swap_status = boot_swap_type_multi(image_index);
#endif

Expand Down Expand Up @@ -497,6 +504,7 @@ bs_set(char *buf, int len)
* "hash":<hash of image (OPTIONAL for single image only)>
* }
*/
uint32_t slot;
uint8_t image_index = 0;
size_t decoded = 0;
uint8_t hash[IMAGE_HASH_SIZE];
Expand All @@ -509,8 +517,8 @@ bs_set(char *buf, int len)
bool found = false;
#endif

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);
zcbor_state_t zsd[4 + CBOR_EXTRA_STATES];
zcbor_new_decode_state(zsd, ARRAY_SIZE(zsd), (uint8_t *)buf, len, 1, NULL, 0);

struct zcbor_map_decode_key_val image_set_state_decode[] = {
ZCBOR_MAP_DECODE_KEY_DECODER("confirm", zcbor_bool_decode, &confirm),
Expand All @@ -536,98 +544,106 @@ bs_set(char *buf, int len)
}

if (img_hash.len != 0) {
for (image_index = 0; image_index < BOOT_IMAGE_NUMBER; ++image_index) {
struct image_header hdr;
uint32_t area_id;
const struct flash_area *fap;
uint8_t tmpbuf[64];
IMAGES_ITER(image_index) {
#ifdef MCUBOOT_SWAP_USING_OFFSET
int swap_status = boot_swap_type_multi(image_index);
#endif

for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) {
struct image_header hdr;
uint32_t area_id;
const struct flash_area *fap;
uint8_t tmpbuf[64];

#ifdef MCUBOOT_SWAP_USING_OFFSET
uint32_t num_sectors = SWAP_USING_OFFSET_SECTOR_UPDATE_BEGIN;
struct flash_sector sector_data;
uint32_t start_off = 0;
uint32_t num_sectors = SWAP_USING_OFFSET_SECTOR_UPDATE_BEGIN;
struct flash_sector sector_data;
uint32_t start_off = 0;
#endif

area_id = flash_area_id_from_multi_image_slot(image_index, 1);
if (flash_area_open(area_id, &fap)) {
BOOT_LOG_ERR("Failed to open flash area ID %d", area_id);
continue;
}
area_id = flash_area_id_from_multi_image_slot(image_index, slot);
if (flash_area_open(area_id, &fap)) {
BOOT_LOG_ERR("Failed to open flash area ID %d", area_id);
continue;
}

#ifdef MCUBOOT_SWAP_USING_OFFSET
rc = flash_area_sectors(fap, &num_sectors, &sector_data);
if (slot == BOOT_SECONDARY_SLOT && swap_status != BOOT_SWAP_TYPE_REVERT) {
rc = flash_area_sectors(fap, &num_sectors, &sector_data);

if ((rc != 0 && rc != -ENOMEM) ||
num_sectors != SWAP_USING_OFFSET_SECTOR_UPDATE_BEGIN) {
flash_area_close(fap);
continue;
}
if ((rc != 0 && rc != -ENOMEM) ||
num_sectors != SWAP_USING_OFFSET_SECTOR_UPDATE_BEGIN) {
flash_area_close(fap);
continue;
}

start_off = sector_data.fs_size;
start_off = sector_data.fs_size;
}
#endif

rc = BOOT_HOOK_CALL(boot_read_image_header_hook,
BOOT_HOOK_REGULAR, image_index, 1, &hdr);
if (rc == BOOT_HOOK_REGULAR)
{
rc = BOOT_HOOK_CALL(boot_read_image_header_hook,
BOOT_HOOK_REGULAR, image_index, 1, &hdr);
if (rc == BOOT_HOOK_REGULAR)
{
#ifdef MCUBOOT_SWAP_USING_OFFSET
flash_area_read(fap, start_off, &hdr, sizeof(hdr));
flash_area_read(fap, start_off, &hdr, sizeof(hdr));
#else
flash_area_read(fap, 0, &hdr, sizeof(hdr));
flash_area_read(fap, 0, &hdr, sizeof(hdr));
#endif
}

if (hdr.ih_magic == IMAGE_MAGIC)
{
FIH_DECLARE(fih_rc, FIH_FAILURE);
}

BOOT_HOOK_CALL_FIH(boot_image_check_hook,
FIH_BOOT_HOOK_REGULAR,
fih_rc, image_index, 1);
if (FIH_EQ(fih_rc, FIH_BOOT_HOOK_REGULAR))
if (hdr.ih_magic == IMAGE_MAGIC)
{
FIH_DECLARE(fih_rc, FIH_FAILURE);

BOOT_HOOK_CALL_FIH(boot_image_check_hook,
FIH_BOOT_HOOK_REGULAR,
fih_rc, image_index, 1);
if (FIH_EQ(fih_rc, FIH_BOOT_HOOK_REGULAR))
{
#ifdef MCUBOOT_ENC_IMAGES
if (IS_ENCRYPTED(&hdr)) {
if (IS_ENCRYPTED(&hdr)) {
#ifdef MCUBOOT_SWAP_USING_OFFSET
FIH_CALL(boot_image_validate_encrypted, fih_rc, fap,
&hdr, tmpbuf, sizeof(tmpbuf), start_off);
FIH_CALL(boot_image_validate_encrypted, fih_rc, fap,
&hdr, tmpbuf, sizeof(tmpbuf), start_off);
#else
FIH_CALL(boot_image_validate_encrypted, fih_rc, fap,
&hdr, tmpbuf, sizeof(tmpbuf));
FIH_CALL(boot_image_validate_encrypted, fih_rc, fap,
&hdr, tmpbuf, sizeof(tmpbuf));
#endif
} else {
} else {
#endif
#ifdef MCUBOOT_SWAP_USING_OFFSET
FIH_CALL(bootutil_img_validate, fih_rc, NULL, &hdr,
fap, tmpbuf, sizeof(tmpbuf), NULL, 0, NULL, start_off);
FIH_CALL(bootutil_img_validate, fih_rc, NULL, &hdr,
fap, tmpbuf, sizeof(tmpbuf), NULL, 0, NULL, start_off);
#else
FIH_CALL(bootutil_img_validate, fih_rc, NULL, &hdr,
fap, tmpbuf, sizeof(tmpbuf), NULL, 0, NULL);
FIH_CALL(bootutil_img_validate, fih_rc, NULL, &hdr,
fap, tmpbuf, sizeof(tmpbuf), NULL, 0, NULL);
#endif
#ifdef MCUBOOT_ENC_IMAGES
}
}
#endif
}
}

if (FIH_NOT_EQ(fih_rc, FIH_SUCCESS)) {
continue;
if (FIH_NOT_EQ(fih_rc, FIH_SUCCESS)) {
continue;
}
}
}

#ifdef MCUBOOT_SERIAL_IMG_GRP_HASH
/* Retrieve hash of image for identification */
/* Retrieve hash of image for identification */
#ifdef MCUBOOT_SWAP_USING_OFFSET
rc = boot_serial_get_hash(&hdr, fap, hash, start_off);
rc = boot_serial_get_hash(&hdr, fap, hash, start_off);
#else
rc = boot_serial_get_hash(&hdr, fap, hash);
rc = boot_serial_get_hash(&hdr, fap, hash);
#endif
#endif
flash_area_close(fap);
flash_area_close(fap);

if (rc == 0 && memcmp(hash, img_hash.value, sizeof(hash)) == 0) {
/* Hash matches, set this slot for test or confirmation */
found = true;
break;
if (rc == 0 && memcmp(hash, img_hash.value, sizeof(hash)) == 0) {
/* Hash matches, set this slot for test or confirmation */
found = true;
goto set_image_state;
}
}
}

Expand All @@ -640,6 +656,7 @@ bs_set(char *buf, int len)
}
#endif

set_image_state:
rc = boot_set_pending_multi(image_index, confirm);

out:
Expand Down Expand Up @@ -683,6 +700,8 @@ bs_list_set(uint8_t op, char *buf, int len)
bs_rc_rsp(MGMT_ERR_ENOTSUP);
#endif
}

reset_cbor_state();
}

#ifdef MCUBOOT_SERIAL_IMG_GRP_SLOT_INFO
Expand Down Expand Up @@ -856,7 +875,7 @@ static off_t erase_range(const struct flash_area *fap, off_t start, off_t end)
BOOT_LOG_DBG("Erasing range 0x%jx:0x%jx", (intmax_t)start,
(intmax_t)(start + size - 1));

rc = flash_area_erase(fap, start, size);
rc = boot_erase_region(fap, start, size, false);
if (rc != 0) {
BOOT_LOG_ERR("Error %d while erasing range", rc);
return -EINVAL;
Expand Down Expand Up @@ -901,8 +920,8 @@ bs_upload(char *buf, int len)
static uint32_t start_off = 0;
#endif

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);
zcbor_state_t zsd[4 + CBOR_EXTRA_STATES];
zcbor_new_decode_state(zsd, ARRAY_SIZE(zsd), (uint8_t *)buf, len, 1, NULL, 0);

struct zcbor_map_decode_key_val image_upload_decode[] = {
ZCBOR_MAP_DECODE_KEY_DECODER("image", zcbor_uint32_decode, &img_num_tmp),
Expand Down Expand Up @@ -1000,7 +1019,7 @@ bs_upload(char *buf, int len)
/* Non-progressive erase erases entire image slot when first chunk of
* an image is received.
*/
rc = flash_area_erase(fap, 0, area_size);
rc = boot_erase_region(fap, 0, area_size, false);
if (rc) {
goto out_invalid_data;
}
Expand Down Expand Up @@ -1210,8 +1229,8 @@ bs_echo(char *buf, int len)
bool ok;
uint32_t rc = MGMT_ERR_EINVAL;

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);
zcbor_state_t zsd[4 + CBOR_EXTRA_STATES];
zcbor_new_decode_state(zsd, ARRAY_SIZE(zsd), (uint8_t *)buf, len, 1, NULL, 0);

if (!zcbor_map_start_decode(zsd)) {
goto out;
Expand Down
2 changes: 1 addition & 1 deletion boot/boot_serial/src/boot_serial_encryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ decrypt_region_inplace(struct boot_loader_state *state,
(off + bytes_copied + idx) - hdr->ih_hdr_size, blk_sz,
blk_off, &buf[idx]);
}
rc = flash_area_erase(fap, off + bytes_copied, chunk_sz);
rc = boot_erase_region(fap, off + bytes_copied, chunk_sz, false);
if (rc != 0) {
return BOOT_EFLASH;
}
Expand Down
3 changes: 3 additions & 0 deletions boot/boot_serial/test/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
syscfg.vals:
# This is here to work around the $notnull syscfg restriction.
BOOT_SERIAL_DETECT_PIN: 0

syscfg.vals.BOOTUTIL_USE_MBED_TLS:
MBEDTLS_CIPHER_MODE_CTR: 1
4 changes: 3 additions & 1 deletion boot/bootutil/include/bootutil/bootutil_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,13 @@ boot_image_load_header(const struct flash_area *fa_p,
*
* @param[in] state boot loader state
* @param[in] hdr image header
* @param[in] fa flash area pointer
*
* @return 0 on success, error code otherwise
*/
int boot_load_image_from_flash_to_sram(struct boot_loader_state *state,
struct image_header *hdr);
struct image_header *hdr,
const struct flash_area *fa);

/**
* Removes an image from SRAM, by overwriting it with zeros.
Expand Down
3 changes: 0 additions & 3 deletions boot/bootutil/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ pkg.apis:
pkg.cflags:
- "-DMCUBOOT_MYNEWT=1"

pkg.cflags.BOOTUTIL_USE_MBED_TLS:
- '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'

pkg.deps:
- "@mcuboot/boot/mynewt/mcuboot_config"
- "@apache-mynewt-core/hw/hal"
Expand Down
Loading