Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
project(
'edge device core',
'c', 'cpp',
version : '0.4.0',
version : '0.4.0.1',
)
cc = meson.get_compiler('c')
if meson.is_cross_build()
Expand Down Expand Up @@ -60,7 +60,10 @@ endif

# And mbed tls
mbedtls_vars = cmake.subproject_options()
mbedtls_vars.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE':true})
mbedtls_vars.add_cmake_defines({
'CMAKE_POSITION_INDEPENDENT_CODE': true,
'MBEDTLS_USER_CONFIG_FILE': 'include/mbedtls/user_config.h'
})
mbedtls = cmake.subproject('mbedtls', options : mbedtls_vars)
mbedtls_dep = mbedtls.dependency('mbedtls')
mbedcrypto_dep = mbedtls.dependency('mbedcrypto')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
From 34c65de2406a22fcf65c28d8b553bb1444bd1a83 Mon Sep 17 00:00:00 2001
From: Seimizu Joukan <Qingshui.Shangguan@sony.com>
Date: Fri, 11 Apr 2025 07:46:40 +0000
Subject: [PATCH] Don't add sysroot path when searching host command.

---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0615027a7..3fb30ce6ae 100644
index 18bfe08074..9edae60cd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,10 @@ set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}"
@@ -107,6 +107,9 @@ set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}"
"${CTR_DRBG_128_BIT_KEY_WARN_L3}"
"${WARNING_BORDER}")

+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+#set(CMAKE_FIND_DEBUG_MODE 1)
+
# Python 3 is only needed here to check for configuration warnings.
if(NOT CMAKE_VERSION VERSION_LESS 3.15.0)
set(Python3_FIND_STRATEGY LOCATION)
--
2.43.0

@@ -147,6 +150,13 @@ endif()
set(MBEDTLS_CONFIG_FILE "" CACHE FILEPATH "Mbed TLS config file (overrides default).")
set(MBEDTLS_USER_CONFIG_FILE "" CACHE FILEPATH "Mbed TLS user config file (appended to default).")

+set(USER_CONFIG_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../packagefiles/mbedtls/include/mbedtls/user_config.h")
+if(EXISTS "${USER_CONFIG_SOURCES}")
+ file(COPY "${USER_CONFIG_SOURCES}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/")
+else()
+ message(WARNING "User config file not found: ${USER_CONFIG_SOURCES}")
+endif()
+
# Create a symbolic link from ${base_name} in the binary directory
# to the corresponding path in the source directory.
# Note: Copies the file(s) on Windows.
20 changes: 20 additions & 0 deletions subprojects/packagefiles/mbedtls/include/mbedtls/user_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* \file user_config.h
*
* \brief User configuration for mbedTLS
*/

#ifndef MBEDTLS_USER_CONFIG_H
#define MBEDTLS_USER_CONFIG_H

#undef MBEDTLS_SELF_TEST

#undef MBEDTLS_CMAC_C

#define MBEDTLS_THREADING_C 1
#define MBEDTLS_THREADING_PTHREAD 1

#undef MBEDTLS_SSL_PROTO_TLS1_3
#undef MBEDTLS_DEBUG_C

#endif /* MBEDTLS_USER_CONFIG_H */