Skip to content

Commit

Permalink
add-ons: troubleshoot: add port forwarding support
Browse files Browse the repository at this point in the history
  • Loading branch information
joelguittet committed Sep 18, 2024
1 parent 7821299 commit 9823c2b
Show file tree
Hide file tree
Showing 12 changed files with 1,409 additions and 12 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,43 @@ cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak"
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=OFF
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=OFF
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=OFF
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=OFF
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=OFF
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=OFF -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=OFF -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="generic/weak" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/weak" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)

# Build ESP-IDF use cases:
# - NVS storage option
# - mbedtls/cryptoauthlib TLS options
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_NET_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="freertos" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="esp-idf/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_NET_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="freertos" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="esp-idf/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_NET_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="freertos" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="esp-idf/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/cryptoauthlib" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_NET_TYPE="esp-idf" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="freertos" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="esp-idf/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/cryptoauthlib" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)

# Build Zephyr use cases:
# - NVS storage option
# - mbedtls/cryptoauthlib TLS options
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_NET_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="zephyr/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_NET_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="zephyr/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_NET_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="zephyr/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/cryptoauthlib" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_NET_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="zephyr" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="zephyr/nvs" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/cryptoauthlib" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)

# Build Posix use cases:
# - curl network option
# - mbedtls TLS option
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="posix" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="posix" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/curl" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="posix" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="posix" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON
cmake .. -G "Unix Makefiles" -DCONFIG_MENDER_PLATFORM_FLASH_TYPE="posix" -DCONFIG_MENDER_PLATFORM_LOG_TYPE="posix" -DCONFIG_MENDER_PLATFORM_NET_TYPE="generic/curl" -DCONFIG_MENDER_PLATFORM_SCHEDULER_TYPE="posix" -DCONFIG_MENDER_PLATFORM_STORAGE_TYPE="posix" -DCONFIG_MENDER_PLATFORM_TLS_TYPE="generic/mbedtls" -DCONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=ON -DCONFIG_MENDER_CLIENT_CONFIGURE_STORAGE=ON -DCONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=ON -DCONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER=ON -DCONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING=ON
make -j$(nproc)
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ if (CONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT)
if (CONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER)
message(STATUS "Using mender-troubleshoot add-on file transfer feature")
endif()
option(CONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING "Mender client Troubleshoot Port Forwarding Transfer" OFF)
if (CONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING)
message(STATUS "Using mender-troubleshoot add-on port forwarding feature")
endif()
endif()
if (NOT CONFIG_MENDER_LOG_LEVEL)
message(STATUS "Using default log level")
Expand Down Expand Up @@ -179,6 +183,9 @@ if (CONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT)
if (CONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER)
target_compile_definitions(mender-mcu-client PUBLIC CONFIG_MENDER_CLIENT_TROUBLESHOOT_FILE_TRANSFER)
endif()
if (CONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING)
target_compile_definitions(mender-mcu-client PUBLIC CONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING)
endif()
endif()
if (CONFIG_MENDER_LOG_LEVEL)
target_compile_definitions(mender-mcu-client PUBLIC CONFIG_MENDER_LOG_LEVEL=${CONFIG_MENDER_LOG_LEVEL})
Expand Down Expand Up @@ -234,6 +241,11 @@ if (CONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT)
"${CMAKE_CURRENT_LIST_DIR}/add-ons/troubleshoot/src/mender-troubleshoot-file-transfer.c"
)
endif()
if (CONFIG_MENDER_CLIENT_TROUBLESHOOT_PORT_FORWARDING)
list(APPEND SOURCES_TEMP
"${CMAKE_CURRENT_LIST_DIR}/add-ons/troubleshoot/src/mender-troubleshoot-port-forwarding.c"
)
endif()
endif()
target_sources(mender-mcu-client PRIVATE ${SOURCES_TEMP})

Expand Down
Loading

0 comments on commit 9823c2b

Please sign in to comment.