Skip to content
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

sysbuild: Add support for sysbuild-assigned MCUboot image IDs #17567

Merged
merged 10 commits into from
Oct 24, 2024

Conversation

nordicjm
Copy link
Contributor

@nordicjm nordicjm commented Oct 1, 2024

Also includes changes from manifest: MCUboot KMU support for ED25519 signature verification #17616 and treewide: update thingy91x bootloader setup #18137 and nrf_compress: Fix ARM thumb filter cross-chunk issue #18075

Compliance/license failure expected due to edits to third party lzma library file

test_sdk_mcuboot: sdk-nrf-pr-17567

@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Oct 1, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 1, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
mcuboot nrfconnect/sdk-mcuboot@7e01086 nrfconnect/sdk-mcuboot@ae07a33 (main) nrfconnect/[email protected]
zephyr nrfconnect/sdk-zephyr@e516ad3 nrfconnect/sdk-zephyr@2cac88c (main) nrfconnect/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 1, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 31

Inputs:

Sources:

sdk-nrf: PR head: acaaf83552e7f233d8744e4d3c542c5731068103
mcuboot: PR head: ae07a335ffb581a4d4dc43324bb0261e12728deb
zephyr: PR head: 2cac88cbaff341bbbd3a1cb8296749a7ec2e52ee

more details

sdk-nrf:

PR head: acaaf83552e7f233d8744e4d3c542c5731068103
merge base: 7febb9f89150d42af969061af6f31340b30d750f
target head (main): 7febb9f89150d42af969061af6f31340b30d750f
Diff

mcuboot:

PR head: ae07a335ffb581a4d4dc43324bb0261e12728deb
merge base: 7e010864696446fc42e185161d1f73bff563ee29
Diff

zephyr:

PR head: 2cac88cbaff341bbbd3a1cb8296749a7ec2e52ee
merge base: e516ad354c34483e8050871fd7c915c72bc2f4fd
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (43)
applications
│  ├── asset_tracker_v2
│  │  ├── sysbuild
│  │  │  ├── mcuboot
│  │  │  │  ├── boards
│  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │ thingy91x_nrf9151.overlay
│  ├── connectivity_bridge
│  │  ├── sysbuild
│  │  │  ├── mcuboot
│  │  │  │  ├── boards
│  │  │  │  │  │ thingy91x_nrf5340_cpuapp.conf
│  ├── serial_lte_modem
│  │  ├── sysbuild
│  │  │  ├── mcuboot
│  │  │  │  ├── boards
│  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │ thingy91x_nrf9151.overlay
bootloader
│  ├── mcuboot
│  │  ├── .github
│  │  │  ├── workflows
│  │  │  │  │ commit-tags.yml
│  │  ├── boot
│  │  │  ├── bootutil
│  │  │  │  ├── src
│  │  │  │  │  ├── ed25519_psa.c
│  │  │  │  │  ├── image_ed25519.c
│  │  │  │  │  ├── image_validate.c
│  │  │  │  │  ├── loader.c
│  │  │  │  │  ├── loader_legacy_child_parent.c
│  │  │  │  │  ├── swap_nsib.c
│  │  │  │  │  │ swap_priv.h
│  │  │  ├── zephyr
│  │  │  │  ├── CMakeLists.txt
│  │  │  │  ├── Kconfig
│  │  │  │  ├── boards
│  │  │  │  │  ├── thingy91x_nrf5340_cpuapp.conf
│  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │ thingy91x_nrf9151.overlay
│  │  │  │  ├── decompression.c
│  │  │  │  ├── include
│  │  │  │  │  ├── sysflash
│  │  │  │  │  │  ├── pm_sysflash.h
│  │  │  │  │  │  ├── pm_sysflash_legacy_child_parent.h
│  │  │  │  │  │  │ sysflash.h
│  │  │  │  │ pm.yml
modules
│  ├── mcuboot
│  │  ├── boot
│  │  │  ├── zephyr
│  │  │  │  │ Kconfig
│  │  ├── hooks
│  │  │  │ nrf53_hooks.c
samples
│  ├── cellular
│  │  ├── nrf_cloud_multi_service
│  │  │  ├── sysbuild
│  │  │  │  ├── mcuboot
│  │  │  │  │  ├── boards
│  │  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │  │ thingy91x_nrf9151.overlay
│  ├── net
│  │  ├── aws_iot
│  │  │  ├── sysbuild
│  │  │  │  ├── mcuboot
│  │  │  │  │  ├── boards
│  │  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │  │ thingy91x_nrf9151.overlay
│  ├── tfm
│  │  ├── tfm_psa_template
│  │  │  │ sysbuild.conf
│  ├── wifi
│  │  ├── shell
│  │  │  ├── sysbuild
│  │  │  │  ├── mcuboot
│  │  │  │  │  ├── boards
│  │  │  │  │  │  ├── thingy91x_nrf9151.conf
│  │  │  │  │  │  │ thingy91x_nrf9151.overlay
subsys
│  ├── Kconfig
│  ├── mcuboot_ids
│  │  │ Kconfig
│  ├── nrf_compress
│  │  ├── lzma
│  │  │  ├── armthumb.c
│  │  │  │ armthumb.h
│  │  ├── src
│  │  │  │ arm_thumb.c
│  ├── nrf_security
│  │  │ Kconfig
sysbuild
│  ├── CMakeLists.txt
│  │ Kconfig.mcuboot
tests
│  ├── subsys
│  │  ├── nrf_compress
│  │  │  ├── decompression
│  │  │  │  ├── arm_thumb
│  │  │  │  │  ├── src
│  │  │  │  │  │  │ main.c
west.yml
zephyr
│  ├── subsys
│  │  ├── mgmt
│  │  │  ├── mcumgr
│  │  │  │  ├── bootutil_hooks
│  │  │  │  │  │ nrf53_hooks.c

Outputs:

Toolchain

Version: add720b6d9
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:add720b6d9_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
  • ❌ Integration tests
    • ✅ test-sdk-audio
    • ❌ desktop52_verification
    • ✅ test-fw-nrfconnect-boot
    • ✅ test-fw-nrfconnect-apps
    • ✅ test_ble_nrf_config
    • ❌ test-fw-nrfconnect-ble_mesh
    • ❌ test-fw-nrfconnect-ble_samples
    • ✅ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nfc
    • ✅ test-fw-nrfconnect-nrf-iot_cloud
    • ✅ test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • ✅ test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • ✅ test-fw-nrfconnect-nrf-iot_samples
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m
    • ✅ doc-internal
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-proprietary_esb
    • ✅ test-fw-nrfconnect-rpc
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-fw-nrfconnect-thread
    • ✅ test-fw-nrfconnect-zigbee
    • ❌ test-sdk-find-my
    • ✅ test-fw-nrfconnect-nrf-iot_mosh
    • ✅ test-fw-nrfconnect-nrf-iot_positioning
    • ✅ test-sdk-sidewalk
    • ✅ test-sdk-wifi
    • ✅ test-low-level
    • ✅ test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • ✅ test-sdk-pmic-samples
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
    • ✅ test-fw-nrfconnect-ps
    • ⚠️ test-fw-nrfconnect-fw-update

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@nordicjm nordicjm force-pushed the imagenumberpr branch 3 times, most recently from bdd4555 to d140108 Compare October 7, 2024 12:55
@@ -37,6 +37,8 @@ config PM_PARTITION_SIZE_MCUBOOT

config PM_PARTITION_SIZE_MCUBOOT
hex "Flash space allocated for the MCUboot partition" if !BOOT_USE_MIN_PARTITION_SIZE
default 0xb800 if MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 && SOC_SERIES_NRF54LX
default 0xbe00 if MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 && !SOC_SERIES_NRF54LX
default 0xc000
Copy link
Contributor

@nvlsianpu nvlsianpu Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default 0xc000 becomes dead assignment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is the default for child/parent

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add help with something like (informative only, populated by the build-system) to each entry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why duplicate what is already there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, in prompt.

@nordicjm nordicjm force-pushed the imagenumberpr branch 4 times, most recently from 02fb7a1 to 76ef93a Compare October 16, 2024 08:06
@nordicjm nordicjm added this to the 2.8.0 milestone Oct 17, 2024
@nordicjm nordicjm requested a review from maxd-nordic October 17, 2024 10:19
@nordicjm nordicjm marked this pull request as ready for review October 17, 2024 11:13
@nordicjm nordicjm requested review from a team as code owners October 17, 2024 11:13
@nordicjm nordicjm force-pushed the imagenumberpr branch 2 times, most recently from ea1608e to dcf775f Compare October 18, 2024 08:03
@nordicjm nordicjm requested a review from a team as a code owner October 18, 2024 08:03
@nordicjm nordicjm requested a review from a team as a code owner October 18, 2024 14:34
@nordicjm
Copy link
Contributor Author

nordicjm commented Oct 24, 2024

@nrfconnect/ncs-co-boards @nrfconnect/ncs-co-networking @nrfconnect/ncs-modem ncs-modem @nrfconnect/ncs-nrf-cloud ncs-nrf-cloud @nrfconnect/ncs-iot-oulu please review

@nordicjm
Copy link
Contributor Author

@nrfconnect/ncs-iot-oulu please review

@@ -0,0 +1,4 @@
&uart0 {
status = "okay";
current-speed = < 1000000 >;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nordicjm and others added 8 commits October 24, 2024 08:00
Includes changes for sysbuild-assigned image numbers

Signed-off-by: Jamie McCrae <[email protected]>
Adds support for MCUboot to assign IDs to which images are
which in MCUboot, which applications can also use

Signed-off-by: Jamie McCrae <[email protected]>
Fixes partition sizes for MCUboot when secure boot on the
application core is enabled. Without this, the partition start
address is invalid because it did not take into account the MCUboot
header for the updateable MCUboot partition

Signed-off-by: Jamie McCrae <[email protected]>
Fixes IDs which lacked sysbuild support, which also were not
used in the file where hardcoded numbers were instead used and
renames one of the wrongly named defines which is an image
number, not a slot number

Signed-off-by: Jamie McCrae <[email protected]>
This passes the s0/s1 package version on to MCUboot so it can be
used to prevent updating the alternative MCUboot upgrade slot
with an older image

Signed-off-by: Jamie McCrae <[email protected]>
These options are now automatically generated, they are no longer
needed

Signed-off-by: Jamie McCrae <[email protected]>
Use production setup of thingy91x bootloader configuration.

Signed-off-by: Maximilian Deubel <[email protected]>
Removes a prompt, type and duplicated help text from this symbol
as this is an override symbol only

Signed-off-by: Jamie McCrae <[email protected]>
Fixes an issue with the ARM thumb filter when an instruction
crosses two chunks of data by storing bytes from the first for
use in the second, this results in the output of the first run
being less than the input data size and more than the input data
size for the second run

Signed-off-by: Jamie McCrae <[email protected]>
Updates the test to support the new cross-chunk ARM thumb filter
functionality, and verfies that the output size is the expected
size

Signed-off-by: Jamie McCrae <[email protected]>
@carlescufi carlescufi merged commit 3fd1cda into nrfconnect:main Oct 24, 2024
10 of 13 checks passed
@nordicjm nordicjm deleted the imagenumberpr branch November 6, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-mcuboot manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.