-
Notifications
You must be signed in to change notification settings - Fork 23
manifest: Add mcuboot #120
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
28828b4
manifest: Add mcuboot
asmellby aea4b3f
soc: silabs: Default to ECDSA-P256 signing with sysbuild
asmellby d41bb74
zephyr: Automatically sign MCUboot bootloader images
asmellby 241da92
ci: Build with_mcuboot sysbuild sample
asmellby e5d49af
zephyr: Locate Simplicity Commander using find_program
asmellby 01d5950
ci: Add action to install dependencies with SLT
asmellby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
|
|
||
| name: Install tools with SLT | ||
| description: Install required tools using SLT | ||
|
|
||
| inputs: | ||
| package-file: | ||
| description: Path to package file to install from | ||
| required: true | ||
| default: pkg.slt | ||
| slt-url: | ||
| description: URL to download SLT from | ||
| required: true | ||
| default: https://www.silabs.com/documents/public/software/slt-cli-1.0.0-linux-x64.zip | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Download and extract SLT | ||
| shell: bash | ||
| run: | | ||
| wget -q ${{ inputs.slt-url }} -O slt.zip | ||
| unzip -q slt.zip -d $GITHUB_WORKSPACE/slt | ||
| chmod +x $GITHUB_WORKSPACE/slt/slt | ||
| rm slt.zip | ||
| echo "$GITHUB_WORKSPACE/slt" >> $GITHUB_PATH | ||
| - name: Install packages | ||
| shell: bash | ||
| run: | | ||
| slt install -f ${{ inputs.package-file }} --no-lock | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
|
|
||
| [dependency] | ||
| commander = "~1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| rsource "*/Kconfig.sysbuild" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOOTLOADER_MCUBOOT | ||
|
|
||
| choice BOOT_SIGNATURE_TYPE | ||
| default BOOT_SIGNATURE_TYPE_ECDSA_P256 | ||
| endchoice | ||
|
|
||
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) | ||
|
|
||
| function(zephyr_runner_file type path) | ||
| # Property magic which makes west flash choose the signed build | ||
| # output of a given type. | ||
| set_target_properties(runners_yaml_props_target PROPERTIES "${type}_file" "${path}") | ||
| endfunction() | ||
|
|
||
| function(zephyr_commander_sign_tasks keyfile) | ||
| string(CONFIGURE "${keyfile}" keyfile) | ||
|
|
||
| # Extensionless prefix of any output file. | ||
| set(output ${ZEPHYR_BINARY_DIR}/${KERNEL_NAME}) | ||
|
|
||
| # List of additional build byproducts. | ||
| set(byproducts) | ||
|
|
||
| find_package(SimplicityCommander REQUIRED) | ||
|
|
||
| if(CONFIG_BUILD_OUTPUT_HEX) | ||
| list(APPEND byproducts ${output}.signed.hex) | ||
| zephyr_runner_file(hex ${output}.signed.hex) | ||
| set(BYPRODUCT_KERNEL_SIGNED_HEX_NAME "${output}.signed.hex" | ||
| CACHE FILEPATH "Signed kernel hex file" FORCE | ||
| ) | ||
| set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND | ||
| ${COMMANDER} convert ${output}.hex | ||
| --secureboot --keyfile ${keyfile} -o ${output}.signed.hex) | ||
| endif() | ||
|
|
||
| set_property(GLOBAL APPEND PROPERTY extra_post_build_byproducts ${byproducts}) | ||
| endfunction() | ||
|
|
||
| if(DEFINED CONFIG_MCUBOOT AND DEFINED CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256) | ||
| zephyr_commander_sign_tasks("${CONFIG_BOOT_SIGNATURE_KEY_FILE}") | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Copyright (c) 2025 Silicon Laboratories Inc. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Module for locating Simplicity Commander. | ||
| # | ||
| # The module defines the following variables: | ||
| # | ||
| # COMMANDER | ||
| # Path to Simplicity Commander binary | ||
| # Set to 'COMMANDER-NOTFOUND' if Commander was not found | ||
| # | ||
| # SimplicityCommander_FOUND | ||
| # True if Simplicity Commander was found. | ||
|
|
||
| find_program(SLT slt) | ||
| if(SLT) | ||
| execute_process( | ||
| COMMAND ${SLT} where commander | ||
| OUTPUT_VARIABLE slt_output | ||
| RESULT_VARIABLE slt_status | ||
| OUTPUT_STRIP_TRAILING_WHITESPACE | ||
| ) | ||
| if(${slt_status} EQUAL 0 AND NOT slt_output STREQUAL "") | ||
| set(slt_commander_path "${slt_output}") | ||
| endif() | ||
| endif() | ||
|
|
||
| find_program(COMMANDER | ||
| NAMES commander-cli commander NAMES_PER_DIR | ||
| HINTS ${slt_commander_path} | ||
| PATH_SUFFIXES Contents/MacOS | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(SimplicityCommander REQUIRED_VARS COMMANDER) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of downloading
sltrather than directly downloadingcommander?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sltenables version management of the installed tools, and has other tools available. If the user uses the Network Analyzer or Energy Profiler tools installed viaslt, it would be inconvenient if the SDK uses a different way of getting Commander.