From 6928cd723d216e4d22e4040ae2d2fbc173999294 Mon Sep 17 00:00:00 2001 From: petedyerarm Date: Mon, 21 Jun 2021 20:14:16 +0100 Subject: [PATCH 01/17] Specify MBED_CLOUD_CLIENT_FOTA_LINUX_CONFIG_DIR. Replace the defines for indivdual FOTA_LINUX files with a single define providing the containing DIR instead. --- .../mbed-edge-core/files/target-default.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/files/target-default.cmake b/recipes-connectivity/mbed-edge-core/files/target-default.cmake index eccf266..ddee74a 100644 --- a/recipes-connectivity/mbed-edge-core/files/target-default.cmake +++ b/recipes-connectivity/mbed-edge-core/files/target-default.cmake @@ -1,8 +1,6 @@ if (${FOTA_ENABLE}) add_definitions( - -DMBED_CLOUD_CLIENT_FOTA_LINUX_HEADER_FILENAME="/userdata/fota_fw_metadata" - -DMBED_CLOUD_CLIENT_FOTA_LINUX_UPDATE_STORAGE_FILENAME="/userdata/fota_candidate" - -DMBED_CLOUD_CLIENT_FOTA_LINUX_CANDIDATE_FILENAME="/userdata/fota_raw_candidate" + -DMBED_CLOUD_CLIENT_FOTA_LINUX_CONFIG_DIR="/userdata" ) SET (MBED_CLOUD_CLIENT_MIDDLEWARE curl) From 5a765372f36c98b2bc2d76307f321d0de167eaf4 Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Wed, 30 Jun 2021 01:31:44 -0500 Subject: [PATCH 02/17] Removed old sysvinit and logrotate file --- .../mbed-edge-core/files/edge-core.init | 46 ------------------- .../mbed-edge-core/files/edge-core.logrotate | 8 ---- .../mbed-edge-core/mbed-edge-core.inc | 6 +-- 3 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 recipes-connectivity/mbed-edge-core/files/edge-core.init delete mode 100644 recipes-connectivity/mbed-edge-core/files/edge-core.logrotate diff --git a/recipes-connectivity/mbed-edge-core/files/edge-core.init b/recipes-connectivity/mbed-edge-core/files/edge-core.init deleted file mode 100644 index 209e21e..0000000 --- a/recipes-connectivity/mbed-edge-core/files/edge-core.init +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# /etc/init.d/devicejs: starts Arm edge-core -### BEGIN INIT INFO -# Provides: edge-core -# Required-Start: $remote_fs $time wwrelay -# Required-Stop: $remote_fs $time -# Should-Start: $network -# Should-Stop: $network -# Default-Start: 5 -# Default-Stop: 0 1 6 -# Short-Description: System logger -### END INIT INFO -start_edge() { - if [ ! -d "/userdata/mbed/mcc_config" ]; then - # this directory is used to hold the developer certificate, if the user wants to use one - echo "Creating /userdata/mbed/mcc_config" - mkdir -p /userdata/mbed/mcc_config - chown developer -R /userdata/mbed - fi - cd /userdata/mbed - /wigwag/mbed/edge-core --http-port 9101 >> /wigwag/log/edge-core 2>&1 & -} - -stop_edge() { - killall edge-core -} - -case "$1" in - start) - echo "Starting mbed edge-core" - start_edge - ;; - stop) - echo "Stopping edge-core" - stop_edge - ;; - restart) - echo "Restarting edge-core" - stop_edge - start_edge - ;; - *) - echo "Usage: \$0 {start|stop|restart}" - exit 1 -esac -exit 0 diff --git a/recipes-connectivity/mbed-edge-core/files/edge-core.logrotate b/recipes-connectivity/mbed-edge-core/files/edge-core.logrotate deleted file mode 100644 index 8aceef5..0000000 --- a/recipes-connectivity/mbed-edge-core/files/edge-core.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/edge-core.log { - missingok - compress - size 50M - copytruncate - rotate 4 - nodateext -} diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index 0ab8937..f1ad7fb 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -11,8 +11,6 @@ SRCREV = "0.18.0" RM_WORK_EXCLUDE += "${PN}" SRC_URI = "gitsm://github.com/PelionIoT/mbed-edge.git \ - file://edge-core.init \ - file://edge-core.logrotate \ file://toolchain.cmake \ file://mbed_cloud_client_user_config.h \ file://0001-disable-Doxygen.patch \ @@ -80,7 +78,7 @@ SYSTEMD_SERVICE_${PN} = "edge-core.service" do_configure_prepend() { cd ${S} - + [ -f "${WORKDIR}/mbed_cloud_dev_credentials.c" ] && { mv "${WORKDIR}/mbed_cloud_dev_credentials.c" config/ } @@ -108,8 +106,6 @@ do_compile_prepend() { } do_install() { - install -d "${D}/etc/init.d/" - install -m 755 "${WORKDIR}/edge-core.init" "${D}/etc/init.d/${INITSCRIPT_NAME}" install -d "${D}${systemd_system_unitdir}" From 5197a222657b4f2855ff97d0f1524863386effbb Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Wed, 30 Jun 2021 00:46:44 -0700 Subject: [PATCH 03/17] Do not install the edge-core logrotate file --- recipes-connectivity/mbed-edge-core/mbed-edge-core.inc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index f1ad7fb..2504b97 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -120,10 +120,6 @@ do_install() { install -d "${D}/wigwag/mbed" install "${WORKDIR}/build/bin/edge-core" "${D}/wigwag/mbed" - install -d "${D}${sysconfdir}/logrotate.d/" - install -m 644 "${WORKDIR}/edge-core.logrotate" "${D}${sysconfdir}/logrotate.d" - - install -d "${D}/etc/tmpfiles.d" echo "d /var/rootdirs/userdata 0755 root root -" >> "${D}/etc/tmpfiles.d/userdata-tmpfiles.conf" ln -sf "/var/rootdirs/userdata" "${D}/userdata" From d4c0e046db126829da904dec4a6ff7c24862bcd7 Mon Sep 17 00:00:00 2001 From: Tapani Puhakka Date: Wed, 4 Aug 2021 15:24:48 +0300 Subject: [PATCH 04/17] ARM_UC no longer in use, removing flag --- recipes-connectivity/mbed-edge-core/files/mx8mm/target.cmake | 1 - recipes-connectivity/mbed-edge-core/files/rpi3/target.cmake | 1 - recipes-connectivity/mbed-edge-core/files/uz/target.cmake | 1 - 3 files changed, 3 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/files/mx8mm/target.cmake b/recipes-connectivity/mbed-edge-core/files/mx8mm/target.cmake index a895073..b8da24a 100644 --- a/recipes-connectivity/mbed-edge-core/files/mx8mm/target.cmake +++ b/recipes-connectivity/mbed-edge-core/files/mx8mm/target.cmake @@ -6,7 +6,6 @@ SET (PAL_TARGET_DEVICE "mx8mm") SET (PAL_USER_DEFINED_CONFIGURATION "\"${TARGET_CONFIG_ROOT}/sotp_fs_mx8mm_yocto.h\"") SET (BIND_TO_ALL_INTERFACES 0) SET (PAL_UPDATE_FIRMWARE_DIR "\"/mnt/cache/firmware\"") -SET (ARM_UC_SOCKET_TIMEOUT_MS 300000) if (${FIRMWARE_UPDATE}) SET (MBED_CLOUD_CLIENT_UPDATE_STORAGE ARM_UCP_LINUX_YOCTO_GENERIC) diff --git a/recipes-connectivity/mbed-edge-core/files/rpi3/target.cmake b/recipes-connectivity/mbed-edge-core/files/rpi3/target.cmake index 1f594b1..dceb0fc 100644 --- a/recipes-connectivity/mbed-edge-core/files/rpi3/target.cmake +++ b/recipes-connectivity/mbed-edge-core/files/rpi3/target.cmake @@ -6,7 +6,6 @@ SET (PAL_TARGET_DEVICE "Yocto_Generic") SET (PAL_USER_DEFINED_CONFIGURATION "\"${TARGET_CONFIG_ROOT}/sotp_fs_rpi3_yocto.h\"") SET (BIND_TO_ALL_INTERFACES 0) SET (PAL_UPDATE_FIRMWARE_DIR "\"/upgrades\"") -SET (ARM_UC_SOCKET_TIMEOUT_MS 300000) if (${FIRMWARE_UPDATE}) SET (MBED_CLOUD_CLIENT_UPDATE_STORAGE ARM_UCP_LINUX_YOCTO_RPI) diff --git a/recipes-connectivity/mbed-edge-core/files/uz/target.cmake b/recipes-connectivity/mbed-edge-core/files/uz/target.cmake index 799bc6e..82fb3c4 100644 --- a/recipes-connectivity/mbed-edge-core/files/uz/target.cmake +++ b/recipes-connectivity/mbed-edge-core/files/uz/target.cmake @@ -6,7 +6,6 @@ SET (PAL_TARGET_DEVICE "uz") SET (PAL_USER_DEFINED_CONFIGURATION "\"${TARGET_CONFIG_ROOT}/sotp_fs_uz_yocto.h\"") SET (BIND_TO_ALL_INTERFACES 0) SET (PAL_UPDATE_FIRMWARE_DIR "\"/mnt/cache/firmware\"") -SET (ARM_UC_SOCKET_TIMEOUT_MS 300000) if (${FIRMWARE_UPDATE}) SET (MBED_CLOUD_CLIENT_UPDATE_STORAGE ARM_UCP_LINUX_YOCTO_GENERIC) From 70f862baa362967af8ed91ab7df153a8c7618441 Mon Sep 17 00:00:00 2001 From: Tapani Puhakka Date: Wed, 4 Aug 2021 15:46:25 +0300 Subject: [PATCH 05/17] remove reference to update-client-hub directory that no longer exists --- recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb | 2 -- recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb | 2 -- 2 files changed, 4 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb index bfb3377..99be089 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb @@ -25,8 +25,6 @@ SRC_URI += "file://target.cmake \ file://pal_plat_mx8mm.c \ file://0008-ordered-reboot.patch " -SCRIPT_DIR = "${WORKDIR}/git/lib/mbed-cloud-client/update-client-hub/modules/pal-linux/scripts" - do_configure_prepend() { mkdir -p ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_mx8mm cp ${WORKDIR}/pal_plat_mx8mm.c ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_mx8mm/ diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb index 759aff0..5c86f1c 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb @@ -25,8 +25,6 @@ SRC_URI += "file://target.cmake \ file://pal_plat_uz.c \ file://0008-ordered-reboot.patch " -SCRIPT_DIR = "${WORKDIR}/git/lib/mbed-cloud-client/update-client-hub/modules/pal-linux/scripts" - do_configure_prepend() { mkdir -p ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_uz cp ${WORKDIR}/pal_plat_uz.c ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_uz/ From c239f66dd56415a0eca7301238496238b7e4c578 Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Mon, 19 Apr 2021 11:14:36 +0100 Subject: [PATCH 06/17] Add Parsec SE driver 0.5.0 recipe Signed-off-by: Anton Antonov (cherry picked from commit d1256992b55f1a56eef1bef5094874523faae5d0) Signed-off-by: petedyerarm --- .../parsec-se-driver_0.5.0.bb | 16 +-- .../parsec-se-driver_0.5.0.inc | 113 ++++++++++++++++++ 2 files changed, 116 insertions(+), 13 deletions(-) create mode 100644 recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc diff --git a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb index ffd7cb3..f74c724 100644 --- a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb +++ b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb @@ -1,9 +1,9 @@ -inherit cargo SUMMARY = "Parsec Secure Element Driver" HOMEPAGE = "https://github.com/parallaxsecond/parsec-se-driver" LICENSE = "Apache-2.0" +inherit cargo SRC_URI = "git://github.com/parallaxsecond/parsec-se-driver.git;protocol=https;branch=main \ git://github.com/ARMmbed/mbedtls.git;protocol=https;destsuffix=mbedtls;name=mbedtls" @@ -13,20 +13,8 @@ SRCREV_mbedtls = "mbedtls-2.25.0" S = "${WORKDIR}/git" S_MBEDTLS = "${WORKDIR}/mbedtls" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -BBCLASSEXTEND = "native" - TOOLCHAIN = "clang" -CARGO_DISABLE_BITBAKE_VENDORING = "1" -CARGO_VENDORING_DIRECTORY="${S}/vendor" - -do_configure_append() { - cd ${S} - cargo vendor -} - do_compile_prepend() { export MBEDTLS_INCLUDE_DIR="${S_MBEDTLS}/include" } @@ -35,3 +23,5 @@ do_install() { install -d "${D}/${libdir}" install -m 755 "${B}/target/${TARGET_SYS}/release/libparsec_se_driver.a" "${D}/${libdir}" } + +include parsec-se-driver_${PV}.inc diff --git a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc new file mode 100644 index 0000000..eeaa8a7 --- /dev/null +++ b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc @@ -0,0 +1,113 @@ +# This file is created using cargo-bitbake tool from parsec-se-driver repository Cargo.lock + +SRC_URI += " \ + crate://crates.io/aho-corasick/0.7.15 \ + crate://crates.io/ansi_term/0.11.0 \ + crate://crates.io/anyhow/1.0.40 \ + crate://crates.io/atty/0.2.14 \ + crate://crates.io/autocfg/1.0.1 \ + crate://crates.io/bincode/1.3.3 \ + crate://crates.io/bindgen/0.56.0 \ + crate://crates.io/bitflags/1.2.1 \ + crate://crates.io/bytes/0.5.6 \ + crate://crates.io/cc/1.0.67 \ + crate://crates.io/cexpr/0.4.0 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/clang-sys/1.2.0 \ + crate://crates.io/clap/2.33.3 \ + crate://crates.io/cmake/0.1.45 \ + crate://crates.io/derivative/2.2.0 \ + crate://crates.io/either/1.6.1 \ + crate://crates.io/env_logger/0.7.1 \ + crate://crates.io/env_logger/0.8.3 \ + crate://crates.io/fixedbitset/0.2.0 \ + crate://crates.io/form_urlencoded/1.0.1 \ + crate://crates.io/getrandom/0.2.2 \ + crate://crates.io/glob/0.3.0 \ + crate://crates.io/hashbrown/0.9.1 \ + crate://crates.io/heck/0.3.2 \ + crate://crates.io/hermit-abi/0.1.18 \ + crate://crates.io/humantime/1.3.0 \ + crate://crates.io/humantime/2.1.0 \ + crate://crates.io/idna/0.2.3 \ + crate://crates.io/indexmap/1.6.2 \ + crate://crates.io/itertools/0.8.2 \ + crate://crates.io/lazy_static/1.4.0 \ + crate://crates.io/lazycell/1.3.0 \ + crate://crates.io/libc/0.2.93 \ + crate://crates.io/libloading/0.7.0 \ + crate://crates.io/log/0.4.14 \ + crate://crates.io/matches/0.1.8 \ + crate://crates.io/memchr/2.3.4 \ + crate://crates.io/multimap/0.8.3 \ + crate://crates.io/nom/5.1.2 \ + crate://crates.io/num-bigint/0.3.2 \ + crate://crates.io/num-complex/0.3.1 \ + crate://crates.io/num-derive/0.3.3 \ + crate://crates.io/num-integer/0.1.44 \ + crate://crates.io/num-iter/0.1.42 \ + crate://crates.io/num-rational/0.3.2 \ + crate://crates.io/num-traits/0.2.14 \ + crate://crates.io/num/0.3.1 \ + crate://crates.io/parsec-client/0.12.0 \ + crate://crates.io/parsec-interface/0.24.0 \ + crate://crates.io/peeking_take_while/0.1.2 \ + crate://crates.io/percent-encoding/2.1.0 \ + crate://crates.io/petgraph/0.5.1 \ + crate://crates.io/ppv-lite86/0.2.10 \ + crate://crates.io/proc-macro2/1.0.26 \ + crate://crates.io/prost-build/0.6.1 \ + crate://crates.io/prost-derive/0.6.1 \ + crate://crates.io/prost-types/0.6.1 \ + crate://crates.io/prost/0.6.1 \ + crate://crates.io/psa-crypto-sys/0.8.0 \ + crate://crates.io/psa-crypto/0.8.0 \ + crate://crates.io/quick-error/1.2.3 \ + crate://crates.io/quote/1.0.9 \ + crate://crates.io/rand/0.8.3 \ + crate://crates.io/rand_chacha/0.3.0 \ + crate://crates.io/rand_core/0.6.2 \ + crate://crates.io/rand_hc/0.3.0 \ + crate://crates.io/redox_syscall/0.2.6 \ + crate://crates.io/regex-syntax/0.6.23 \ + crate://crates.io/regex/1.4.5 \ + crate://crates.io/remove_dir_all/0.5.3 \ + crate://crates.io/rustc-hash/1.1.0 \ + crate://crates.io/same-file/1.0.6 \ + crate://crates.io/secrecy/0.7.0 \ + crate://crates.io/serde/1.0.125 \ + crate://crates.io/serde_derive/1.0.125 \ + crate://crates.io/shlex/0.1.1 \ + crate://crates.io/strsim/0.8.0 \ + crate://crates.io/syn/1.0.69 \ + crate://crates.io/synstructure/0.12.4 \ + crate://crates.io/tempfile/3.2.0 \ + crate://crates.io/termcolor/1.1.2 \ + crate://crates.io/textwrap/0.11.0 \ + crate://crates.io/tinyvec/1.2.0 \ + crate://crates.io/tinyvec_macros/0.1.0 \ + crate://crates.io/unicode-bidi/0.3.5 \ + crate://crates.io/unicode-normalization/0.1.17 \ + crate://crates.io/unicode-segmentation/1.7.1 \ + crate://crates.io/unicode-width/0.1.8 \ + crate://crates.io/unicode-xid/0.2.1 \ + crate://crates.io/url/2.2.1 \ + crate://crates.io/users/0.10.0 \ + crate://crates.io/uuid/0.8.2 \ + crate://crates.io/vec_map/0.8.2 \ + crate://crates.io/version_check/0.9.3 \ + crate://crates.io/walkdir/2.3.2 \ + crate://crates.io/wasi/0.10.2+wasi-snapshot-preview1 \ + crate://crates.io/which/3.1.1 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.5 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/zeroize/1.2.0 \ + crate://crates.io/zeroize_derive/1.0.1 \ +" + +# FIXME: update generateme with the real MD5 of the license file +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ +" From dd75276ffb003ea8a10a753578a11ee2eda302dc Mon Sep 17 00:00:00 2001 From: petedyerarm Date: Wed, 8 Sep 2021 15:24:34 +0100 Subject: [PATCH 07/17] Added hardknott compatibility. --- conf/layer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/layer.conf b/conf/layer.conf index cef0584..cd0e8c1 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -8,5 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "meta-mbed-edge" BBFILE_PATTERN_meta-mbed-edge = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-mbed-edge = "6" -LAYERSERIES_COMPAT_meta-mbed-edge = "dunfell gatesgarth" +LAYERSERIES_COMPAT_meta-mbed-edge = "dunfell gatesgarth hardknott" LAYERDEPENDS_meta-mbed-edge = "rust-layer clang-layer" From e4eb06a464dbf65e2694aac30bd2ae3abbe6d978 Mon Sep 17 00:00:00 2001 From: petedyerarm Date: Wed, 15 Sep 2021 11:29:22 +0100 Subject: [PATCH 08/17] Updated recipes to work with the updated cmake class --- recipes-connectivity/mbed-edge-core/mbed-edge-core.inc | 3 +-- recipes-connectivity/mbed-edge-examples/mbed-edge-examples.bb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index 0ab8937..620f696 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -80,7 +80,6 @@ SYSTEMD_SERVICE_${PN} = "edge-core.service" do_configure_prepend() { cd ${S} - [ -f "${WORKDIR}/mbed_cloud_dev_credentials.c" ] && { mv "${WORKDIR}/mbed_cloud_dev_credentials.c" config/ } @@ -90,6 +89,7 @@ do_configure_prepend() { export HTTP_PROXY=${HTTP_PROXY} export HTTPS_PROXY=${HTTPS_PROXY} + cd ${B} } @@ -104,7 +104,6 @@ do_compile_prepend() { cp ${PKG_CONFIG_SYSROOT_DIR}/usr/lib/libparsec_se_driver.a ${S}/lib/pal-platform/Middleware/parsec_se_driver/parsec_se_driver/target/release/ fi fi - } do_install() { diff --git a/recipes-connectivity/mbed-edge-examples/mbed-edge-examples.bb b/recipes-connectivity/mbed-edge-examples/mbed-edge-examples.bb index e81c220..b376e9c 100644 --- a/recipes-connectivity/mbed-edge-examples/mbed-edge-examples.bb +++ b/recipes-connectivity/mbed-edge-examples/mbed-edge-examples.bb @@ -39,15 +39,15 @@ EXTRA_OECMAKE += " \ -DTARGET_TOOLCHAIN=yocto \ -DCMAKE_BUILD_TYPE=Release \ ${MBED_EDGE_CUSTOM_CMAKE_ARGUMENTS} " -inherit cmake +inherit cmake update-rc.d -inherit update-rc.d INITSCRIPT_NAME = "mept-ble" INITSCRIPT_PARAMS = "defaults 86 15" do_configure_prepend() { cd ${S} git submodule update --init --recursive + cd ${B} } do_install() { From fdc7368a54eb6130a1be50b33d474d39032f586c Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Thu, 7 Oct 2021 13:20:21 +0300 Subject: [PATCH 09/17] _append should only use =. Using += with append is an undefined behaviour --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebd3aa6..b8c69f0 100755 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ needs to be enabled and the firmware for the bluetooth chip needs to be installe can be done by adding following lines to the local.conf: ``` -DISTRO_FEATURES_append += " bluetooth " +DISTRO_FEATURES_append = " bluetooth " CORE_IMAGE_EXTRA_INSTALL += " linux-firmware-bcm43430 linux-firmware-bcm43430a1-hcd " ``` From 30be965ff099d2e5d1d1cc4881d64dbefe9ddb90 Mon Sep 17 00:00:00 2001 From: David Saada Date: Wed, 25 Aug 2021 18:10:51 +0300 Subject: [PATCH 10/17] Add support for FOTA combined image --- .../mbed-edge-core/files/0006-fota-callback.patch | 13 ------------- .../mbed-edge-core/mbed-edge-core-mx8mm.bb | 1 - .../mbed-edge-core/mbed-edge-core-rpi3.bb | 1 - .../mbed-edge-core/mbed-edge-core-uz.bb | 2 +- .../mbed-edge-core/mbed-edge-core.inc | 5 +++++ 5 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 recipes-connectivity/mbed-edge-core/files/0006-fota-callback.patch diff --git a/recipes-connectivity/mbed-edge-core/files/0006-fota-callback.patch b/recipes-connectivity/mbed-edge-core/files/0006-fota-callback.patch deleted file mode 100644 index 10aeac8..0000000 --- a/recipes-connectivity/mbed-edge-core/files/0006-fota-callback.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/fota/fota_install_callback.c b/fota/fota_install_callback.c -index 5f738d9..66002a3 100644 ---- a/fota/fota_install_callback.c -+++ b/fota/fota_install_callback.c -@@ -38,7 +38,7 @@ int fota_app_on_install_candidate(const char *candidate_fs_name, const manifest_ - int length = snprintf(command, - ACTIVATE_SCRIPT_LENGTH, - "%s %s %s", -- "/opt/pelion/fota_update_activate.sh", candidate_fs_name, MBED_CLOUD_CLIENT_FOTA_LINUX_HEADER_FILENAME); -+ "/wigwag/mbed/deploy_ostree_delta_update.sh", candidate_fs_name, MBED_CLOUD_CLIENT_FOTA_LINUX_HEADER_FILENAME); - FOTA_ASSERT(length < ACTIVATE_SCRIPT_LENGTH); - - FOTA_TRACE_INFO( "shell command from fota install calback %s", command ); diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb index 99be089..410d0a3 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-mx8mm.bb @@ -20,7 +20,6 @@ SRC_URI += "file://target.cmake \ file://target-default.cmake \ file://sotp_fs_mx8mm_yocto.h \ file://deploy_ostree_delta_update.sh \ - file://0006-fota-callback.patch \ file://0001-fix_psa_storage_location.patch \ file://pal_plat_mx8mm.c \ file://0008-ordered-reboot.patch " diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb index 2503b88..faa0251 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb @@ -20,7 +20,6 @@ SRC_URI += "file://target.cmake \ file://target-default.cmake \ file://sotp_fs_rpi3_yocto.h \ file://deploy_ostree_delta_update.sh \ - file://0006-fota-callback.patch \ file://0001-fix_psa_storage_location.patch \ file://pal_plat_rpi3.c \ file://0008-ordered-reboot.patch " diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb index 5c86f1c..769aa1c 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-uz.bb @@ -4,6 +4,7 @@ MBED_EDGE_CORE_CONFIG_TRACE_LEVEL ?= "WARN" MBED_EDGE_CORE_CONFIG_FIRMWARE_UPDATE ?= "ON" MBED_EDGE_CORE_CONFIG_FOTA_ENABLE ?= "ON" MBED_EDGE_CORE_CONFIG_FOTA_TRACE ?= "ON" +MBED_EDGE_CORE_CONFIG_FOTA_COMBINED_IMAGE_SUPPORT ?= "ON" MBED_EDGE_CORE_CONFIG_CURL_DYNAMIC_LINK ?= "ON" MBED_EDGE_CORE_CONFIG_DEVELOPER_MODE ?= "ON" MBED_EDGE_CORE_CONFIG_FACTORY_MODE ?= "OFF" @@ -20,7 +21,6 @@ SRC_URI += "file://target.cmake \ file://target-default.cmake \ file://sotp_fs_uz_yocto.h \ file://deploy_ostree_delta_update.sh \ - file://0006-fota-callback.patch \ file://0001-fix_psa_storage_location.patch \ file://pal_plat_uz.c \ file://0008-ordered-reboot.patch " diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index 620f696..25b9202 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -65,6 +65,11 @@ EXTRA_OECMAKE += " \ -DMBED_CLOUD_CLIENT_CURL_DYNAMIC_LINK=${MBED_EDGE_CORE_CONFIG_CURL_DYNAMIC_LINK} \ -DFOTA_ENABLE=${MBED_EDGE_CORE_CONFIG_FOTA_ENABLE} \ -DFOTA_TRACE=${MBED_EDGE_CORE_CONFIG_FOTA_TRACE} \ + -DFOTA_COMBINED_IMAGE_SUPPORT=${MBED_EDGE_CORE_CONFIG_FOTA_COMBINED_IMAGE_SUPPORT} \ + -DFOTA_SCRIPT_DIR=\"/wigwag/mbed\" \ + -DFOTA_INSTALL_MAIN_SCRIPT=\"deploy_ostree_delta_update.sh\" \ + -DBOOT_CAPSULE_UPDATE_DIR=\"/boot/efi/EFI/UpdateCapsule\" \ + -DBOOT_CAPSULE_UPDATE_FILENAME=\"u-boot-caps.bin\" \ -DDEVELOPER_MODE=${MBED_EDGE_CORE_CONFIG_DEVELOPER_MODE} \ -DFACTORY_MODE=${MBED_EDGE_CORE_CONFIG_FACTORY_MODE} \ -DBYOC_MODE=${MBED_EDGE_CORE_CONFIG_BYOC_MODE} \ From 8e0edc9b7414c37ec3548dd590e32c0c6fa139cc Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Tue, 19 Oct 2021 16:05:15 -0700 Subject: [PATCH 11/17] Upgraded Edge Core to 0.19.0 and defined MBED_CONF_MBED_CLIENT_MAX_RECONNECT_TIMEOUT to 10 mins --- .../mbed-edge-core/files/mbed_cloud_client_user_config.h | 2 ++ recipes-connectivity/mbed-edge-core/mbed-edge-core.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-connectivity/mbed-edge-core/files/mbed_cloud_client_user_config.h b/recipes-connectivity/mbed-edge-core/files/mbed_cloud_client_user_config.h index ee3ae80..7d62184 100644 --- a/recipes-connectivity/mbed-edge-core/files/mbed_cloud_client_user_config.h +++ b/recipes-connectivity/mbed-edge-core/files/mbed_cloud_client_user_config.h @@ -41,4 +41,6 @@ #define MBED_CLIENT_TCP_KEEPALIVE_INTERVAL 60 #define MBED_CLIENT_TCP_KEEPALIVE_TIME 60 +#define MBED_CONF_MBED_CLIENT_MAX_RECONNECT_TIMEOUT 600 + #endif /* MBED_CLIENT_USER_CONFIG_H */ diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index 620f696..8e3b515 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=1dece7821bf3fd70fe1309eaa3 # Patches for quilt goes to files directory FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRCREV = "0.18.0" +SRCREV = "0.19.0" RM_WORK_EXCLUDE += "${PN}" From f1c5f74fddae7102ef4532cba3eaff639850ee36 Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Tue, 19 Oct 2021 16:12:13 -0700 Subject: [PATCH 12/17] Upgraded parsec-se-driver to 0.16.0 and its dependency mbedtls to 2.27 --- ...ver_0.5.0.bb => parsec-se-driver_0.6.0.bb} | 2 +- ...r_0.5.0.inc => parsec-se-driver_0.6.0.inc} | 85 +++++++------------ 2 files changed, 34 insertions(+), 53 deletions(-) rename recipes-connectivity/parsec-se-driver/{parsec-se-driver_0.5.0.bb => parsec-se-driver_0.6.0.bb} (95%) rename recipes-connectivity/parsec-se-driver/{parsec-se-driver_0.5.0.inc => parsec-se-driver_0.6.0.inc} (52%) diff --git a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb similarity index 95% rename from recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb rename to recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb index f74c724..57d986f 100644 --- a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.bb +++ b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb @@ -8,7 +8,7 @@ SRC_URI = "git://github.com/parallaxsecond/parsec-se-driver.git;protocol=https;b git://github.com/ARMmbed/mbedtls.git;protocol=https;destsuffix=mbedtls;name=mbedtls" SRCREV_pn-${PN} = "${PV}" -SRCREV_mbedtls = "mbedtls-2.25.0" +SRCREV_mbedtls = "mbedtls-2.27.0" S = "${WORKDIR}/git" S_MBEDTLS = "${WORKDIR}/mbedtls" diff --git a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.inc similarity index 52% rename from recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc rename to recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.inc index eeaa8a7..5cea89c 100644 --- a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.5.0.inc +++ b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.inc @@ -1,47 +1,41 @@ # This file is created using cargo-bitbake tool from parsec-se-driver repository Cargo.lock SRC_URI += " \ - crate://crates.io/aho-corasick/0.7.15 \ + crate://crates.io/aho-corasick/0.7.18 \ crate://crates.io/ansi_term/0.11.0 \ - crate://crates.io/anyhow/1.0.40 \ + crate://crates.io/anyhow/1.0.44 \ crate://crates.io/atty/0.2.14 \ crate://crates.io/autocfg/1.0.1 \ crate://crates.io/bincode/1.3.3 \ crate://crates.io/bindgen/0.56.0 \ - crate://crates.io/bitflags/1.2.1 \ + crate://crates.io/bitflags/1.3.2 \ crate://crates.io/bytes/0.5.6 \ - crate://crates.io/cc/1.0.67 \ + crate://crates.io/cc/1.0.71 \ crate://crates.io/cexpr/0.4.0 \ crate://crates.io/cfg-if/1.0.0 \ - crate://crates.io/clang-sys/1.2.0 \ + crate://crates.io/clang-sys/1.2.2 \ crate://crates.io/clap/2.33.3 \ - crate://crates.io/cmake/0.1.45 \ + crate://crates.io/cmake/0.1.46 \ crate://crates.io/derivative/2.2.0 \ crate://crates.io/either/1.6.1 \ crate://crates.io/env_logger/0.7.1 \ - crate://crates.io/env_logger/0.8.3 \ - crate://crates.io/fixedbitset/0.2.0 \ + crate://crates.io/env_logger/0.8.4 \ crate://crates.io/form_urlencoded/1.0.1 \ - crate://crates.io/getrandom/0.2.2 \ crate://crates.io/glob/0.3.0 \ - crate://crates.io/hashbrown/0.9.1 \ - crate://crates.io/heck/0.3.2 \ - crate://crates.io/hermit-abi/0.1.18 \ + crate://crates.io/hermit-abi/0.1.19 \ crate://crates.io/humantime/1.3.0 \ crate://crates.io/humantime/2.1.0 \ crate://crates.io/idna/0.2.3 \ - crate://crates.io/indexmap/1.6.2 \ crate://crates.io/itertools/0.8.2 \ crate://crates.io/lazy_static/1.4.0 \ crate://crates.io/lazycell/1.3.0 \ - crate://crates.io/libc/0.2.93 \ - crate://crates.io/libloading/0.7.0 \ + crate://crates.io/libc/0.2.104 \ + crate://crates.io/libloading/0.7.1 \ crate://crates.io/log/0.4.14 \ - crate://crates.io/matches/0.1.8 \ - crate://crates.io/memchr/2.3.4 \ - crate://crates.io/multimap/0.8.3 \ + crate://crates.io/matches/0.1.9 \ + crate://crates.io/memchr/2.4.1 \ crate://crates.io/nom/5.1.2 \ - crate://crates.io/num-bigint/0.3.2 \ + crate://crates.io/num-bigint/0.3.3 \ crate://crates.io/num-complex/0.3.1 \ crate://crates.io/num-derive/0.3.3 \ crate://crates.io/num-integer/0.1.44 \ @@ -49,62 +43,49 @@ SRC_URI += " \ crate://crates.io/num-rational/0.3.2 \ crate://crates.io/num-traits/0.2.14 \ crate://crates.io/num/0.3.1 \ - crate://crates.io/parsec-client/0.12.0 \ - crate://crates.io/parsec-interface/0.24.0 \ + crate://crates.io/parsec-client/0.13.0 \ + crate://crates.io/parsec-interface/0.25.0 \ crate://crates.io/peeking_take_while/0.1.2 \ crate://crates.io/percent-encoding/2.1.0 \ - crate://crates.io/petgraph/0.5.1 \ - crate://crates.io/ppv-lite86/0.2.10 \ - crate://crates.io/proc-macro2/1.0.26 \ - crate://crates.io/prost-build/0.6.1 \ + crate://crates.io/proc-macro2/1.0.30 \ crate://crates.io/prost-derive/0.6.1 \ - crate://crates.io/prost-types/0.6.1 \ crate://crates.io/prost/0.6.1 \ - crate://crates.io/psa-crypto-sys/0.8.0 \ - crate://crates.io/psa-crypto/0.8.0 \ + crate://crates.io/psa-crypto-sys/0.9.0 \ + crate://crates.io/psa-crypto/0.9.0 \ crate://crates.io/quick-error/1.2.3 \ - crate://crates.io/quote/1.0.9 \ - crate://crates.io/rand/0.8.3 \ - crate://crates.io/rand_chacha/0.3.0 \ - crate://crates.io/rand_core/0.6.2 \ - crate://crates.io/rand_hc/0.3.0 \ - crate://crates.io/redox_syscall/0.2.6 \ - crate://crates.io/regex-syntax/0.6.23 \ - crate://crates.io/regex/1.4.5 \ - crate://crates.io/remove_dir_all/0.5.3 \ + crate://crates.io/quote/1.0.10 \ + crate://crates.io/regex-syntax/0.6.25 \ + crate://crates.io/regex/1.5.4 \ crate://crates.io/rustc-hash/1.1.0 \ crate://crates.io/same-file/1.0.6 \ crate://crates.io/secrecy/0.7.0 \ - crate://crates.io/serde/1.0.125 \ - crate://crates.io/serde_derive/1.0.125 \ + crate://crates.io/serde/1.0.130 \ + crate://crates.io/serde_derive/1.0.130 \ crate://crates.io/shlex/0.1.1 \ crate://crates.io/strsim/0.8.0 \ - crate://crates.io/syn/1.0.69 \ - crate://crates.io/synstructure/0.12.4 \ - crate://crates.io/tempfile/3.2.0 \ + crate://crates.io/syn/1.0.80 \ + crate://crates.io/synstructure/0.12.6 \ crate://crates.io/termcolor/1.1.2 \ crate://crates.io/textwrap/0.11.0 \ - crate://crates.io/tinyvec/1.2.0 \ + crate://crates.io/tinyvec/1.5.0 \ crate://crates.io/tinyvec_macros/0.1.0 \ - crate://crates.io/unicode-bidi/0.3.5 \ - crate://crates.io/unicode-normalization/0.1.17 \ - crate://crates.io/unicode-segmentation/1.7.1 \ - crate://crates.io/unicode-width/0.1.8 \ - crate://crates.io/unicode-xid/0.2.1 \ - crate://crates.io/url/2.2.1 \ + crate://crates.io/unicode-bidi/0.3.7 \ + crate://crates.io/unicode-normalization/0.1.19 \ + crate://crates.io/unicode-width/0.1.9 \ + crate://crates.io/unicode-xid/0.2.2 \ + crate://crates.io/url/2.2.2 \ crate://crates.io/users/0.10.0 \ crate://crates.io/uuid/0.8.2 \ crate://crates.io/vec_map/0.8.2 \ crate://crates.io/version_check/0.9.3 \ crate://crates.io/walkdir/2.3.2 \ - crate://crates.io/wasi/0.10.2+wasi-snapshot-preview1 \ crate://crates.io/which/3.1.1 \ crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ crate://crates.io/winapi-util/0.1.5 \ crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ crate://crates.io/winapi/0.3.9 \ - crate://crates.io/zeroize/1.2.0 \ - crate://crates.io/zeroize_derive/1.0.1 \ + crate://crates.io/zeroize/1.3.0 \ + crate://crates.io/zeroize_derive/1.2.0 \ " # FIXME: update generateme with the real MD5 of the license file From 8e18d931c81ab3bfa114bd40ecff43db4bfea68c Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Wed, 20 Oct 2021 15:38:17 -0700 Subject: [PATCH 13/17] Need to specify the branch SRCREV is on --- recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb index 57d986f..f93b935 100644 --- a/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb +++ b/recipes-connectivity/parsec-se-driver/parsec-se-driver_0.6.0.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" inherit cargo SRC_URI = "git://github.com/parallaxsecond/parsec-se-driver.git;protocol=https;branch=main \ - git://github.com/ARMmbed/mbedtls.git;protocol=https;destsuffix=mbedtls;name=mbedtls" + git://github.com/ARMmbed/mbedtls.git;protocol=https;destsuffix=mbedtls;name=mbedtls;branch=development_2.x" SRCREV_pn-${PN} = "${PV}" SRCREV_mbedtls = "mbedtls-2.27.0" From 686af88d350e5abb6e95e0dc89bf903616c4f54c Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Thu, 21 Oct 2021 17:13:57 -0700 Subject: [PATCH 14/17] Upgraded EC to 0.19.1 --- recipes-connectivity/mbed-edge-core/mbed-edge-core.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index d96c49f..a0e65a9 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=1dece7821bf3fd70fe1309eaa3 # Patches for quilt goes to files directory FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRCREV = "0.19.0" +SRCREV = "0.19.1" RM_WORK_EXCLUDE += "${PN}" From d867ff6deaaae9115835e4ce8a4149b9a9a6ec31 Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Mon, 15 Nov 2021 13:23:41 +0200 Subject: [PATCH 15/17] Temporary fix for trace mutex issue in cloud-client 4.11 Must be removed once new cloud-client release with the proper fix is taken into use! --- ...orary-fix-for-trace-mutex-lock-issue.patch | 38 +++++++++++++++++++ .../mbed-edge-core/mbed-edge-core-rpi3.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 recipes-connectivity/mbed-edge-core/files/0001-Temporary-fix-for-trace-mutex-lock-issue.patch diff --git a/recipes-connectivity/mbed-edge-core/files/0001-Temporary-fix-for-trace-mutex-lock-issue.patch b/recipes-connectivity/mbed-edge-core/files/0001-Temporary-fix-for-trace-mutex-lock-issue.patch new file mode 100644 index 0000000..6c7c041 --- /dev/null +++ b/recipes-connectivity/mbed-edge-core/files/0001-Temporary-fix-for-trace-mutex-lock-issue.patch @@ -0,0 +1,38 @@ +From cd4690c12e868af9c7734054173569e9c4c58900 Mon Sep 17 00:00:00 2001 +From: Kimmo Vaisanen +Date: Mon, 15 Nov 2021 13:06:47 +0200 +Subject: [PATCH] Temporary fix for trace mutex lock issue + +tr_array method is only allowed to be called from mbed trace functions (tr_info, tr_debug...). +Otherwise it will leave trace mutex locked. + +This is a temporary workaround until this is properly fixed in mbed-client. This workaround +assumes actual trace is done in INFO -level (code uses tr_info and client does not runtime change the level). +--- + mbed-client/mbed-client-c/source/sn_nsdl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/mbed-cloud-client/mbed-client/mbed-client-c/source/sn_nsdl.c b/lib/mbed-cloud-client/mbed-client/mbed-client-c/source/sn_nsdl.c +index c9b5907..950edbc 100755 +--- a/lib/mbed-cloud-client/mbed-client/mbed-client-c/source/sn_nsdl.c ++++ b/lib/mbed-cloud-client/mbed-client/mbed-client-c/source/sn_nsdl.c +@@ -2338,6 +2338,7 @@ bool sn_nsdl_remove_resource_attribute(sn_nsdl_static_resource_parameters_s *par + + #endif + ++#if MBED_TRACE_MAX_LEVEL >= TRACE_LEVEL_INFO + #define WRITE_TAG(buf, buf_size, format, ...) \ + { \ + int written = snprintf(buf, buf_size, format, ##__VA_ARGS__); \ +@@ -2347,6 +2348,9 @@ bool sn_nsdl_remove_resource_attribute(sn_nsdl_static_resource_parameters_s *par + ret += written; \ + } \ + } ++#else ++#define WRITE_TAG(buf, buf_size, format, ...) ; ++#endif + + void sn_nsdl_print_coap_data(sn_coap_hdr_s *coap_header_ptr, bool outgoing) + { +-- +2.25.1 diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb index faa0251..05c6860 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb @@ -22,7 +22,9 @@ SRC_URI += "file://target.cmake \ file://deploy_ostree_delta_update.sh \ file://0001-fix_psa_storage_location.patch \ file://pal_plat_rpi3.c \ - file://0008-ordered-reboot.patch " + file://0008-ordered-reboot.patch \ + file://0001-Temporary-fix-for-trace-mutex-lock-issue.patch \ + " do_configure_prepend() { mkdir -p ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_rpi3 From a3c0e381ccc162ff70ad5887ce76a84d7d199e59 Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Mon, 15 Nov 2021 17:45:03 +0200 Subject: [PATCH 16/17] Pick up trace fix for all targets instead of Raspberry pi --- recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb | 4 +--- recipes-connectivity/mbed-edge-core/mbed-edge-core.inc | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb index 05c6860..faa0251 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core-rpi3.bb @@ -22,9 +22,7 @@ SRC_URI += "file://target.cmake \ file://deploy_ostree_delta_update.sh \ file://0001-fix_psa_storage_location.patch \ file://pal_plat_rpi3.c \ - file://0008-ordered-reboot.patch \ - file://0001-Temporary-fix-for-trace-mutex-lock-issue.patch \ - " + file://0008-ordered-reboot.patch " do_configure_prepend() { mkdir -p ${S}/lib/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/Linux/Board_Specific/TARGET_rpi3 diff --git a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc index a0e65a9..66e0773 100644 --- a/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc +++ b/recipes-connectivity/mbed-edge-core/mbed-edge-core.inc @@ -16,6 +16,7 @@ SRC_URI = "gitsm://github.com/PelionIoT/mbed-edge.git \ file://0001-disable-Doxygen.patch \ file://0001-parsec-se-driver-should-be-compiled-separately-in-Yo.patch \ file://0002-fix-libevent-build-with-CMake-in-Yocto.patch \ + file://0001-Temporary-fix-for-trace-mutex-lock-issue.patch \ " SRC_URI += "\ From 998b964ec4cfa7139f7ec279739398e7d25760ca Mon Sep 17 00:00:00 2001 From: David Saada Date: Tue, 16 Nov 2021 16:26:09 +0200 Subject: [PATCH 17/17] Reassign FOTA file name overrides for backward compatibility sake --- recipes-connectivity/mbed-edge-core/files/target-default.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-connectivity/mbed-edge-core/files/target-default.cmake b/recipes-connectivity/mbed-edge-core/files/target-default.cmake index ddee74a..0fdd600 100644 --- a/recipes-connectivity/mbed-edge-core/files/target-default.cmake +++ b/recipes-connectivity/mbed-edge-core/files/target-default.cmake @@ -1,6 +1,8 @@ if (${FOTA_ENABLE}) add_definitions( -DMBED_CLOUD_CLIENT_FOTA_LINUX_CONFIG_DIR="/userdata" + -DMBED_CLOUD_CLIENT_FOTA_LINUX_UPDATE_STORAGE_FILENAME="fota_candidate" + -DMBED_CLOUD_CLIENT_FOTA_LINUX_CANDIDATE_FILENAME="fota_raw_candidate" ) SET (MBED_CLOUD_CLIENT_MIDDLEWARE curl)