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

suit: recovery application build separately #15422

Merged
merged 2 commits into from
May 29, 2024

Conversation

ahasztag
Copy link
Contributor

@ahasztag ahasztag commented May 21, 2024

This PR adds the SUIT BLE recovery application.

The application is build separately and than flashed after the main application is flashed.

test-sdk-nrf: sdk-nrf-pr-15422

@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels May 21, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented May 21, 2024

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-chip X
test-sdk-dfu X
test-sdk-find-my X

Detailed information of selected test modules

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

@NordicBuilder
Copy link
Contributor

NordicBuilder commented May 21, 2024

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

Name Old Revision New Revision Diff
suit-generator nrfconnect/suit-generator@2b796f1 nrfconnect/suit-generator@93f1fbb (ncs) nrfconnect/[email protected]

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

cmake/sysbuild/suit.cmake Show resolved Hide resolved
samples/suit/recovery/CMakeLists.txt Outdated Show resolved Hide resolved
samples/suit/recovery/Kconfig Outdated Show resolved Hide resolved
samples/suit/recovery/Kconfig.sysbuild Outdated Show resolved Hide resolved
samples/suit/recovery/prj.conf Outdated Show resolved Hide resolved
samples/suit/recovery/prj.conf Outdated Show resolved Hide resolved
samples/suit/recovery/src/main.c Outdated Show resolved Hide resolved
samples/suit/recovery/src/main.c Outdated Show resolved Hide resolved
samples/suit/smp_transfer/prj.conf Outdated Show resolved Hide resolved
samples/suit/smp_transfer/rad_envelope.yaml.jinja2.digest Outdated Show resolved Hide resolved
@ahasztag ahasztag force-pushed the recovery_app branch 5 times, most recently from b3eaa74 to bbb8e68 Compare May 22, 2024 09:57
samples/suit/recovery/Kconfig Outdated Show resolved Hide resolved
samples/suit/smp_transfer/CMakeLists.txt Outdated Show resolved Hide resolved
samples/suit/recovery/src/main.c Outdated Show resolved Hide resolved
samples/suit/smp_transfer/prj.conf Outdated Show resolved Hide resolved
Comment on lines 187 to 189
list(APPEND CORE_ARGS
--core ${target},${SUIT_ROOT_DIRECTORY}${target}.bin,${BINARY_DIR}/zephyr/edt.pickle,${BINARY_DIR}/zephyr/.config
)
Copy link
Contributor

@e-rk e-rk May 22, 2024

Choose a reason for hiding this comment

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

I have one concern here. in flash_companion I didn't set any value for CONFIG_SUIT_ENVELOPE_TARGET, which means that it has application by default. In that case both smp_transfer and flash_companion would have the same target name, which is a recipe for problems.

I am wondering how CONFIG_SUIT_ENVELOPE_TARGET should be approached. On one hand, I think that using sysbuild image name by default is convenient and would be easier to understand for the user.

On the second hand, we want the default manifest templates to be generic regardless of the application name.

Perhaps in the flash_companion the CONFIG_SUIT_ENVELOPE_TARGET should be set to "" (empty) and in this loop there should be a check if there are multiple images with the same CONFIG_SUIT_ENVELOPE_TARGET and a warning should be displayed in such case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps config SUIT_ENVELOPE_TARGET should depend on SUIT_ENVELOPE? In this case I think the CONFIG_SUIT_ENVELOPE_TARGET symbol would be undefined for the flash_companion image, which we could detect. I don't think we should directly set CONFIG_SUIT_ENVELOPE_TARGET in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be a good approach.

samples/suit/recovery/Kconfig.sysbuild Outdated Show resolved Hide resolved
sysbuild/Kconfig.suit Outdated Show resolved Hide resolved
cmake/sysbuild/suit.cmake Show resolved Hide resolved
@@ -0,0 +1,13 @@
# #
# # Copyright (c) 2024 Nordic Semiconductor ASA
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Double comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@ahasztag ahasztag force-pushed the recovery_app branch 2 times, most recently from 6a11c9c to f02ad8e Compare May 28, 2024 15:11
@@ -176,12 +176,20 @@ function(suit_create_package)
foreach(image ${IMAGES})
sysbuild_get(BINARY_DIR IMAGE ${image} VAR APPLICATION_BINARY_DIR CACHE)
sysbuild_get(BINARY_FILE IMAGE ${image} VAR CONFIG_KERNEL_BIN_NAME KCONFIG)
sysbuild_get(target IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_TARGET KCONFIG)
Copy link
Contributor

@e-rk e-rk May 29, 2024

Choose a reason for hiding this comment

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

It is necessary to add unset(target), otherwise the parameters to suit-generator are wrong.

@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.

The recovery application can be built as a standalone application
and flashed with nrfutil.

Signed-off-by: Artur Hadasz <[email protected]>
This commit updates the suit-generator revision to
bring in the newest changes needed for recovery application.

Signed-off-by: Artur Hadasz <[email protected]>
Copy link
Contributor

@richabp richabp left a comment

Choose a reason for hiding this comment

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

Some initial comments:

@e-rk
Copy link
Contributor

e-rk commented May 29, 2024

If it is an Application, it needs to be moved to Application folder.

The situation is currently not clear. It would better fit the core_fw category and the current recommendation is to put such applications in the sample directory. See NCSDK-10551

@ahasztag
Copy link
Contributor Author

Some initial comments:

The documentation will be extended and Changelog will be added in a separate PR.

When it comes to the "application" part - this will be finally placed in a completely different category - named something like "core firmware" together with some other applications. It is just temporarily kept in a sample - this was consulted with @wbober.

@ahasztag ahasztag removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label May 29, 2024
@richabp
Copy link
Contributor

richabp commented May 29, 2024

Some initial comments:

The documentation will be extended and Changelog will be added in a separate PR.

When it comes to the "application" part - this will be finally placed in a completely different category - named something like "core firmware" together with some other applications. It is just temporarily kept in a sample - this was consulted with @wbober.

Ok. Approving, assuming all the doc changes will be taken care of in another PR.

Copy link
Contributor

@richabp richabp left a comment

Choose a reason for hiding this comment

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

Approving. All the required doc changes will be done in another PR.

@rlubos rlubos merged commit e895510 into nrfconnect:main May 29, 2024
17 checks passed
@@ -0,0 +1,50 @@
:orphan:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is orphaned, but still appearing in the docs because of the inclusion at the higher level:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/suit.html

Choose a reason for hiding this comment

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

Yes, this is/will be addressed in a different PR that is currently open, but thanks for catching!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval. manifest manifest-suit-generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants