diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files')
4 files changed, 261 insertions, 0 deletions
diff --git a/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Add-additional-options-to-sample-apps.patch b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Add-additional-options-to-sample-apps.patch new file mode 100644 index 00000000..de0522bf --- /dev/null +++ b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Add-additional-options-to-sample-apps.patch @@ -0,0 +1,77 @@ +From 796c934b3294871cb8ccb566ff6a9ae78d3ea4df Mon Sep 17 00:00:00 2001 +From: Vivek Chandra <vivek.chandrax.amancha@intel.com> +Date: Wed, 21 Mar 2018 19:45:48 +0530 +Subject: [PATCH] Add additional options to sample apps + +--- + samples/sampleDevice.c | 15 +++++++++------ + samples/sampleGateway.c | 14 ++++++++++---- + 2 files changed, 19 insertions(+), 10 deletions(-) + +diff --git a/samples/sampleDevice.c b/samples/sampleDevice.c +index e1d78ea..5af14a2 100644 +--- a/samples/sampleDevice.c ++++ b/samples/sampleDevice.c +@@ -40,7 +40,6 @@ int main(int argc, char const *argv[]) + int rc = -1; + + iotfclient client; +- + //catch interrupt signal + signal(SIGINT, sigHandler); + signal(SIGTERM, sigHandler); +@@ -48,16 +47,20 @@ int main(int argc, char const *argv[]) + char* configFilePath; + + if(isEMBDCHomeDefined()){ +- + getSamplesPath(&configFilePath); + configFilePath = realloc(configFilePath,strlen(configFilePath)+15); + strcat(configFilePath,"device.cfg"); + } +- else{ +- printf("IOT_EMBDC_HOME is not defined\n"); +- printf("Define IOT_EMBDC_HOME to client library path to execute samples\n"); ++ //to handle if EMBDCHome not defined ++ else if(argc > 1) { ++ configFilePath = (char*)malloc(sizeof(char)*(strlen(argv[1])+3)); ++ strcpy(configFilePath,argv[1]); ++ } ++ else { ++ printf("Pass the absolute path of the config file as command line argument ex: ./sampleDevice <path-to-config>/<config-file-name> or "); ++ printf("Please define IOT_EMBDC_HOME\n"); + return -1; +- } ++ } + + rc = initialize_configfile(&client, configFilePath,0); + free(configFilePath); +diff --git a/samples/sampleGateway.c b/samples/sampleGateway.c +index 0d98f53..202ad45 100644 +--- a/samples/sampleGateway.c ++++ b/samples/sampleGateway.c +@@ -55,11 +55,17 @@ int main(int argc, char const *argv[]) + configFilePath = realloc(configFilePath,strlen(configFilePath)+15); + strcat(configFilePath,"gateway.cfg"); + } +- else{ +- printf("IOT_EMBDC_HOME is not defined\n"); +- printf("Define IOT_EMBDC_HOME to client library path to execute samples\n"); ++ //to handle if EMBDCHome not defined ++ else if(argc > 1) { ++ configFilePath = (char*)malloc(sizeof(char)*(strlen(argv[1])+3)); ++ strcpy(configFilePath,argv[1]); ++ } ++ else { ++ printf("Pass the absolute path of the config file as command line argument ex: ./sampleGateway <path-to-config>/<config-file-name> or "); ++ printf("Define IOT_EMBDC_HOME to client library path to execute samples\n"); + return -1; +- } ++ } ++ + + rc = initialize_configfile(&client, configFilePath,1); + free(configFilePath); +-- +2.7.4 + diff --git a/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-cjson-library.patch b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-cjson-library.patch new file mode 100644 index 00000000..f6312990 --- /dev/null +++ b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-cjson-library.patch @@ -0,0 +1,36 @@ +From af7f5b885d5807b46bdcdb91f78a9dff689b6af8 Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Thu, 13 Apr 2017 22:51:10 +0100 +Subject: [PATCH 2/3] Fix cjson library + +--- + src/CMakeLists.txt | 2 +- + src/devicemanagementclient.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 43a52cc..d0e4184 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -11,4 +11,4 @@ add_library(iotfdevicemgmt SHARED devicemanagementclient.c) + TARGET_LINK_LIBRARIES (iotf_network_tls_wrapper mbedcrypto mbedx509 mbedtls ) + TARGET_LINK_LIBRARIES (iotfdeviceclient iotfclient iotf_utils iotf_network_tls_wrapper iotfmqtt) + TARGET_LINK_LIBRARIES (iotfgatewayclient iotfclient iotf_utils iotf_network_tls_wrapper iotfmqtt) +-TARGET_LINK_LIBRARIES (iotfdevicemgmt iotfclient iotfdeviceclient cJSON iotf_utils iotf_network_tls_wrapper iotfmqtt) ++TARGET_LINK_LIBRARIES (iotfdevicemgmt iotfclient iotfdeviceclient cjson iotf_utils iotf_network_tls_wrapper iotfmqtt) +diff --git a/src/devicemanagementclient.c b/src/devicemanagementclient.c +index 2bb8bc5..13f4b07 100644 +--- a/src/devicemanagementclient.c ++++ b/src/devicemanagementclient.c +@@ -21,7 +21,7 @@ + + + #include "devicemanagementclient.h" +-#include "cJSON.h" ++#include "cjson/cJSON.h" + + //Character strings to hold log header and log message to be dumped. + char logHdr[LOG_BUF]; +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-dependencies.patch b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-dependencies.patch new file mode 100644 index 00000000..2bc748e4 --- /dev/null +++ b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Fix-dependencies.patch @@ -0,0 +1,121 @@ +From 811d81859dd0525a160df4aae83d3f729a7a39ff Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Thu, 13 Apr 2017 22:44:45 +0100 +Subject: [PATCH 1/3] Fix dependencies + +--- + lib/CMakeLists.txt | 86 +----------------------------------------------------- + src/CMakeLists.txt | 6 ++-- + 2 files changed, 4 insertions(+), 88 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index fbb1b76..02a3e7e 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -15,88 +15,4 @@ set(src_mqtt + MQTTUnsubscribeClient.c + ) + +-set(src_crypto +- aes.c +- aesni.c +- arc4.c +- asn1parse.c +- asn1write.c +- base64.c +- bignum.c +- blowfish.c +- camellia.c +- ccm.c +- cipher.c +- cipher_wrap.c +- cmac.c +- ctr_drbg.c +- des.c +- dhm.c +- ecdh.c +- ecdsa.c +- ecjpake.c +- ecp.c +- ecp_curves.c +- entropy.c +- entropy_poll.c +- error.c +- gcm.c +- havege.c +- hmac_drbg.c +- md.c +- md2.c +- md4.c +- md5.c +- md_wrap.c +- memory_buffer_alloc.c +- oid.c +- padlock.c +- pem.c +- pk.c +- pk_wrap.c +- pkcs12.c +- pkcs5.c +- pkparse.c +- pkwrite.c +- platform.c +- ripemd160.c +- rsa.c +- sha1.c +- sha256.c +- sha512.c +- threading.c +- timing.c +- version.c +- version_features.c +- xtea.c +-) +- +-set(src_x509 +- certs.c +- pkcs11.c +- x509.c +- x509_create.c +- x509_crl.c +- x509_crt.c +- x509_csr.c +- x509write_crt.c +- x509write_csr.c +-) +- +-set(src_tls +- debug.c +- net_sockets.c +- ssl_cache.c +- ssl_ciphersuites.c +- ssl_cli.c +- ssl_cookie.c +- ssl_srv.c +- ssl_ticket.c +- ssl_tls.c +-) +- +-add_library(cJSON cJSON.c) +-add_library(mqttlib ${src_mqtt}) +-add_library(mbedcrypto ${src_crypto}) +-add_library(mbedx509 ${src_x509}) +-add_library(mbedtls ${src_tls}) ++add_library(iotfmqtt ${src_mqtt}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index db75a98..43a52cc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -9,6 +9,6 @@ add_library(iotfgatewayclient SHARED gatewayclient.c) + add_library(iotfdevicemgmt SHARED devicemanagementclient.c) + + TARGET_LINK_LIBRARIES (iotf_network_tls_wrapper mbedcrypto mbedx509 mbedtls ) +-TARGET_LINK_LIBRARIES (iotfdeviceclient iotfclient iotf_utils iotf_network_tls_wrapper mqttlib) +-TARGET_LINK_LIBRARIES (iotfgatewayclient iotfclient iotf_utils iotf_network_tls_wrapper mqttlib) +-TARGET_LINK_LIBRARIES (iotfdevicemgmt iotfclient iotfdeviceclient cJSON iotf_utils iotf_network_tls_wrapper mqttlib) ++TARGET_LINK_LIBRARIES (iotfdeviceclient iotfclient iotf_utils iotf_network_tls_wrapper iotfmqtt) ++TARGET_LINK_LIBRARIES (iotfgatewayclient iotfclient iotf_utils iotf_network_tls_wrapper iotfmqtt) ++TARGET_LINK_LIBRARIES (iotfdevicemgmt iotfclient iotfdeviceclient cJSON iotf_utils iotf_network_tls_wrapper iotfmqtt) +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Remove-host-library-paths.patch b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Remove-host-library-paths.patch new file mode 100644 index 00000000..622645e4 --- /dev/null +++ b/external/meta-iot-cloud/recipes-ibm/ibm-iotf-embeddedc/files/Remove-host-library-paths.patch @@ -0,0 +1,27 @@ +From ffcc01e562a7c016941e153e1540d13d10ce6b6a Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Thu, 13 Apr 2017 23:15:53 +0100 +Subject: [PATCH 3/3] Remove host library paths + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 87a2c44..5504c49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ enable_testing() + + option (run_tests "set run_tests to ON if build tests should be run, set to OFF to skip tests" ON) + SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage -fPIC ${CMAKE_CXX_FLAGS} ") +-SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage -fPIC ${CMAKE_C_FLAGS} -I/usr/local/include") +-SET(CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage ${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib") ++SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage -fPIC ${CMAKE_C_FLAGS} ") ++SET(CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage ${CMAKE_EXE_LINKER_FLAGS} ") + + if (run_tests) + add_subdirectory(test) +-- +1.9.1 + |