Skip to content

Commit d8c4929

Browse files
samples/runtime-source: Make it buildable on twister
This sample has two parts: hooks for an mcuboot instance and a target application. For the first, a new entry at boot/zephyr/sample.yaml is added as well as a corresponding change at boot/zephyr/CMakeLists.txt to include the hook as a module. For the second, added a sample.yaml as well as invoke it from the github workflow. Signed-off-by: Ederson de Souza <[email protected]>
1 parent 3b5af50 commit d8c4929

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

.github/workflows/zephyr_build.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
-T ../bootloader/mcuboot/boot/zephyr
8888
-T ./tests/subsys/dfu
8989
-T ./samples/subsys/mgmt/mcumgr/smp_svr
90+
-T ../bootloader/mcuboot/samples/runtime-source/zephyr/app
9091
run: |
9192
export ZEPHYR_BASE=${PWD}
9293
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr

boot/zephyr/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
cmake_minimum_required(VERSION 3.13.1)
99

10+
# This sample shows usage of an external module and we need to set the
11+
# set the extra module path before calling find_package(Zephyr).
12+
if(TEST_RUNTIME_SOURCE_HOOKS)
13+
set(EXTRA_ZEPHYR_MODULES "${CMAKE_SOURCE_DIR}/../../samples/runtime-source/zephyr/hooks")
14+
endif()
15+
1016
# find_package(Zephyr) in order to load application boilerplate:
1117
# http://docs.zephyrproject.org/application/application.html
1218
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

boot/zephyr/sample.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ tests:
9090
platform_allow: mimxrt1020_evk
9191
integration_platforms:
9292
- mimxrt1020_evk
93+
sample.bootloader.mcuboot.runtime_source.hooks:
94+
extra_args: EXTRA_CONF_FILE=../../samples/runtime-source/zephyr/sample.conf
95+
TEST_RUNTIME_SOURCE_HOOKS=y
96+
tags: bootloader_mcuboot runtime_source
97+
platform_allow: frdm_k64f
98+
build_only: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sample:
2+
name: Runtime source target
3+
description: Application loaded from mcuboot using runtime source hooks
4+
common:
5+
build_only: true
6+
tests:
7+
sample.zephyr.runtime_source.app:
8+
tags: samples tests runtime_source
9+
platform_allow:
10+
- frdm_k64f

0 commit comments

Comments
 (0)