blob: 5b1e42bb1aab912d2112259a78ac80fda367a8e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
cmake_minimum_required(VERSION 3.20.0)
set(KEY_DEFAULT "$ENV{HOME}/mcuboot/key.pem")
set(KEY ${KEY_DEFAULT} CACHE STRING "Firmware signing key path")
message(STATUS "Firmware signing key path: ${KEY}")
set(BOARD "native_sim/native/64")
add_subdirectory(rtos)
string(REPLACE ";" "," ZEPHYR_MODULES_COMMA "${ZEPHYR_MODULES}")
include(ExternalProject)
ExternalProject_Add(
btl
PREFIX btl
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mcuboot/boot/zephyr"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/btl"
INSTALL_COMMAND ""
LIST_SEPARATOR ","
CMAKE_ARGS
"-DBOARD=nucleo_f767zi"
"-DZEPHYR_BASE=${ZEPHYR_BASE}"
"-DZEPHYR_MODULES=${ZEPHYR_MODULES_COMMA}"
"-DEXTRA_CONF_FILE=${CMAKE_CURRENT_SOURCE_DIR}/btl/bootloader.conf"
-DCONFIG_BOOT_SIGNATURE_KEY_FILE="${KEY}"
)
add_subdirectory(app)
|