mirror of
https://github.com/ok-home/ota_ws_update.git
synced 2025-11-13 22:03:27 +03:00
cmake.txt Kconfig
This commit is contained in:
@@ -8,18 +8,16 @@ set( priv_includedir
|
||||
private_include
|
||||
)
|
||||
set(require
|
||||
""
|
||||
)
|
||||
)
|
||||
set( priv_require
|
||||
esp_http_server
|
||||
app_update
|
||||
esp_encrypted_img
|
||||
esp_http_server
|
||||
mbedtls
|
||||
)
|
||||
set( embed_file
|
||||
source/ota_ws_update.html
|
||||
)
|
||||
set( embed_txt_file
|
||||
""
|
||||
)
|
||||
|
||||
if(CONFIG_OTA_PRE_ENCRYPTED_MODE)
|
||||
@@ -30,9 +28,15 @@ if(CONFIG_OTA_PRE_ENCRYPTED_MODE)
|
||||
list(APPEND priv_includedir
|
||||
esp_encrypted_img/include
|
||||
)
|
||||
list(APPEND embed_txt_file
|
||||
rsa_key/private.pem
|
||||
)
|
||||
if(CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_ON_COMPONENT_LOCATION)
|
||||
list(APPEND embed_txt_file
|
||||
${COMPONENT_DIR}/${CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_DIRECTORY}/private.pem
|
||||
)
|
||||
else()
|
||||
list(APPEND embed_txt_file
|
||||
${project_dir}/${CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_DIRECTORY}/private.pem
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND srcs
|
||||
source/ota_ws_update_esp.c
|
||||
@@ -56,12 +60,14 @@ if(CONFIG_OTA_PRE_ENCRYPTED_MODE)
|
||||
set(ESP_IMG_GEN_TOOL_PATH ${CMAKE_CURRENT_LIST_DIR}/esp_encrypted_img/tools/esp_enc_img_gen.py)
|
||||
|
||||
#openssl genrsa -out rsa_key/private.pem 3072
|
||||
|
||||
# for rsa_key on components dir
|
||||
|
||||
if(CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_ON_COMPONENT_LOCATION)
|
||||
# for rsa_key on components project_dir
|
||||
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
|
||||
${COMPONENT_DIR}/rsa_key/private.pem ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin app)
|
||||
|
||||
${COMPONENT_DIR}/${CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_DIRECTORY}/private.pem ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin app)
|
||||
else()
|
||||
# for rsa_key on project dir
|
||||
#create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
|
||||
# ${project_dir}/rsa_key/private.pem ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin app)
|
||||
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
|
||||
${project_dir}/${CONFIG_OTA_PRE_ENCRYPTED_RSA_KEY_DIRECTORY}/private.pem ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin app)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user