diff options
| author | xengineering <me@xengineering.eu> | 2025-03-23 18:08:44 +0100 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2025-03-26 21:18:23 +0100 | 
| commit | 5040ad1492f37b5c7efc06cc1f558bdad6a600fa (patch) | |
| tree | 9a28140bc589a9bc14d38a471a5c2da93f9ea0ed | |
| parent | b073db4017008ceb638a9c23c8cc93e60a3a7fdb (diff) | |
| download | iot-contact-5040ad1492f37b5c7efc06cc1f558bdad6a600fa.tar iot-contact-5040ad1492f37b5c7efc06cc1f558bdad6a600fa.tar.zst iot-contact-5040ad1492f37b5c7efc06cc1f558bdad6a600fa.zip  | |
Provide default key path in CMake files
This makes calling cmake for this device repository easier.
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | README.md | 11 | 
2 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a21c5d0..e539037 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.10)  project(iot-contact LANGUAGES NONE) +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(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})  add_subdirectory(fw) @@ -10,11 +10,11 @@ Currently two boards are supported:  ## Usage -To build the firmware a firmware signing key is required. It is generated with -the `imgtool.py`. +To build the device repository a firmware signing key is required. It is +generated with the `imgtool.py`.  ``` -mkdir -p ~/mcuboot +mkdir ~/mcuboot  ./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519  ``` @@ -26,10 +26,13 @@ The bootloader is built for `nucleo_f767zi` since the simulation board is  currently not supported.  ``` -cmake -Bbuild -GNinja -DKEY=~/mcuboot/key.pem +cmake -Bbuild -GNinja  ninja -C build  ``` +A custom key location can be set by providing `-DKEY=/path/to/key` to the CMake +call. +  To run the simulated firmware a virtual network interface `zeth` and a router  advertisement daemon have to be provided with an embedded script. Root rights  are required for that (prefix e.g. with `sudo`).  | 
