1# Copyright (c) 2020 Linumiz 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig HAWKBIT 5 bool "Eclipse hawkBit Firmware Over-the-Air support" 6 depends on SETTINGS 7 depends on FLASH 8 depends on REBOOT 9 depends on NET_TCP 10 depends on NET_SOCKETS 11 depends on IMG_MANAGER 12 depends on NETWORKING 13 depends on HTTP_CLIENT 14 depends on DNS_RESOLVER 15 depends on JSON_LIBRARY 16 depends on BOOTLOADER_MCUBOOT 17 depends on SMF 18 depends on SMF_ANCESTOR_SUPPORT 19 select MPU_ALLOW_FLASH_WRITE 20 select IMG_ENABLE_IMAGE_CHECK 21 select IMG_ERASE_PROGRESSIVELY 22 help 23 hawkBit is a domain independent back-end framework for polling out 24 software updates to constrained edge devices as well as more powerful 25 controllers and gateways connected to IP based networking infrastructure. 26 27if HAWKBIT 28config HAWKBIT_POLL_INTERVAL 29 int "Time to poll interval (in minutes)" 30 default 5 31 range 1 43200 32 help 33 Set the interval that the hawkbit update server will be polled. 34 This time interval is zero and 43200 minutes(30 days). This will be overridden 35 by the value configured in the settings of the hawkBit server. 36 37config HAWKBIT_AUTOHANDLER 38 bool "hawkBit autohandler" 39 select EVENTS 40 default y 41 help 42 Activate autohandler to handle the update process automatically. 43 44config HAWKBIT_SHELL 45 bool "hawkBit shell utilities" 46 depends on SHELL 47 depends on HAWKBIT_AUTOHANDLER 48 help 49 Activate shell module that provides hawkBit commands. 50 51config HAWKBIT_TENANT 52 string "Tenant name for the hawkbit server" 53 default "default" 54 help 55 Configure the tenant name for the hawkbit server. 56 57config HAWKBIT_SERVER 58 string "User address for the hawkbit server" 59 help 60 Configure the hawkbit server address. 61 62config HAWKBIT_PORT 63 int "Port number for the hawkbit server" 64 default 8080 65 help 66 Configure the hawkbit port number. 67 68config HAWKBIT_SET_SETTINGS_RUNTIME 69 bool "Set hawkbit settings at runtime" 70 help 71 Enable to set hawkbit settings at runtime. 72 73choice HAWKBIT_DDI_SECURITY 74 prompt "hawkBit DDI API authentication modes" 75 default HAWKBIT_DDI_NO_SECURITY 76 77config HAWKBIT_DDI_NO_SECURITY 78 bool "No authentication security" 79 help 80 No authentication security for the hawkBit DDI API. 81 82config HAWKBIT_DDI_TARGET_SECURITY 83 bool "Use target security token authentication" 84 help 85 Use target security token authentication for the hawkBit DDI API. 86 87config HAWKBIT_DDI_GATEWAY_SECURITY 88 bool "Use gateway security token authentication" 89 help 90 Use gateway security token authentication for the hawkBit DDI API. 91 92endchoice 93 94config HAWKBIT_DDI_SECURITY_TOKEN 95 string "Authentication security token" 96 depends on HAWKBIT_DDI_TARGET_SECURITY || HAWKBIT_DDI_GATEWAY_SECURITY 97 default "" 98 help 99 Authentication security token for the configured hawkBit DDI 100 authentication mode. 101 102config HAWKBIT_CUSTOM_ATTRIBUTES 103 bool "Custom device attributes" 104 help 105 Use custom definition of device attributes. 106 107config HAWKBIT_STATUS_BUFFER_SIZE 108 int "hawkBit status buffer size" 109 default 200 110 help 111 Set the size of the buffer, which is used to store the 112 json strings, that are sent to the hawkBit server. It might 113 be increased if the custom attributes are used extensively. 114 115choice HAWKBIT_DEVICE_ID_SOURCE 116 prompt "Source of the Hawkbit device ID" 117 118config HAWKBIT_HWINFO_DEVICE_ID 119 bool "Device ID through HWINFO module" 120 depends on HWINFO 121 122config HAWKBIT_CUSTOM_DEVICE_ID 123 bool "Custom device id through callback function" 124 help 125 Be able to customize the device id during runtime to a custom value, 126 by configuring the callback function. See `hawkbit_set_device_identity_cb` 127 128endchoice 129 130config HAWKBIT_DEVICE_ID_MAX_LENGTH 131 int "Maximum length of the device id" 132 depends on HAWKBIT_CUSTOM_DEVICE_ID 133 range 1 128 134 default 32 135 help 136 Maximum length of the device id. 137 138config HAWKBIT_USE_TLS 139 bool "Use TLS for hawkBit server connection" 140 depends on NET_SOCKETS_SOCKOPT_TLS 141 help 142 Use TLS for hawkBit connection. 143 144if HAWKBIT_USE_TLS 145 146choice HAWKBIT_CERT_TAG 147 prompt "hawkBit certificate tag" 148 default HAWKBIT_USE_STATIC_CERT_TAG 149 150config HAWKBIT_USE_STATIC_CERT_TAG 151 bool "Use static certificate tag" 152 help 153 Use static certificate tag for TLS connection to the hawkBit server. 154 155config HAWKBIT_USE_DYNAMIC_CERT_TAG 156 bool "Use dynamic certificate tag" 157 depends on HAWKBIT_SET_SETTINGS_RUNTIME 158 help 159 Use dynamic certificate tag for TLS connection to the hawkBit server. 160 161endchoice 162 163config HAWKBIT_STATIC_CERT_TAG 164 int "Static certificate tag" 165 depends on HAWKBIT_USE_STATIC_CERT_TAG 166 default 1 167 help 168 Static certificate tag for TLS connection to the hawkBit server. 169 170endif 171 172choice HAWKBIT_REBOOT_MODE 173 prompt "Reboot mode after update" 174 default HAWKBIT_REBOOT_WARM 175 176config HAWKBIT_REBOOT_WARM 177 bool "Warm reboot after update" 178 help 179 Do a warm reboot after the update. 180 181config HAWKBIT_REBOOT_COLD 182 bool "Cold reboot after update" 183 help 184 Do a cold reboot after the update. 185 186endchoice 187 188config HEAP_MEM_POOL_ADD_SIZE_HAWKBIT 189 int "Heap memory pool size for hawkBit" 190 default 4096 191 help 192 Set the size of the heap memory pool for hawkBit. 193 194config HAWKBIT_EVENT_CALLBACKS 195 bool "Set hawkBit event callbacks" 196 help 197 Be able to set event callbacks for hawkBit. 198 199config HAWKBIT_SAVE_PROGRESS 200 bool "Save the hawkBit update download progress" 201 depends on STREAM_FLASH_PROGRESS 202 help 203 Regularly save progress of hawkBit update download operation. 204 When enabled, the download progress is periodically saved to 205 non-volatile storage. If a download is interrupted, it can be resumed from 206 the last saved point rather than starting over, saving bandwidth and time. 207 This is especially useful for large updates over unreliable networks or in 208 resource-constrained environments. 209 210config HAWKBIT_SAVE_PROGRESS_INTERVAL 211 int "Save the hawkBit update download progress interval" 212 default 5 213 range 0 100 214 depends on HAWKBIT_SAVE_PROGRESS 215 help 216 Set the interval (in percent) that the hawkBit update download progress will be saved. 217 0 means that the progress will be saved every time a new chunk is downloaded. 218 219module = HAWKBIT 220module-str = Log Level for hawkbit 221module-help = Enables logging for hawkBit code. 222source "subsys/logging/Kconfig.template.log_config" 223 224endif 225