From f964a6927dbad323ebd1e4d178bf9f0f87b08ed4 Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Tue, 12 Nov 2024 18:05:12 +0100 Subject: [PATCH 1/2] Update kirkstone to release 2024.10.0 Signed-off-by: Kai-Uwe Hermann --- .../{evcli_0.2.1.bb => evcli_0.4.2.bb} | 2 +- ...-cmake_0.4.3.bb => everest-cmake_0.5.0.bb} | 2 +- ..._2024.9.0.bb => everest-core_2024.10.0.bb} | 5 +++-- ..._0.17.2.bb => everest-framework_0.18.0.bb} | 2 +- ...ity_0.8.0.bb => libevse-security_0.9.1.bb} | 2 +- recipes-core/everest/libiso15118_0.2.0.bb | 21 +++++++++++++++++++ .../{liblog_0.2.1.bb => liblog_0.2.3.bb} | 3 +-- .../{libocpp_0.18.0.bb => libocpp_0.19.0.bb} | 2 +- 8 files changed, 30 insertions(+), 9 deletions(-) rename recipes-core/everest-devtools/{evcli_0.2.1.bb => evcli_0.4.2.bb} (91%) rename recipes-core/everest/{everest-cmake_0.4.3.bb => everest-cmake_0.5.0.bb} (90%) rename recipes-core/everest/{everest-core_2024.9.0.bb => everest-core_2024.10.0.bb} (90%) rename recipes-core/everest/{everest-framework_0.17.2.bb => everest-framework_0.18.0.bb} (94%) rename recipes-core/everest/{libevse-security_0.8.0.bb => libevse-security_0.9.1.bb} (89%) create mode 100644 recipes-core/everest/libiso15118_0.2.0.bb rename recipes-core/everest/{liblog_0.2.1.bb => liblog_0.2.3.bb} (84%) rename recipes-core/everest/{libocpp_0.18.0.bb => libocpp_0.19.0.bb} (90%) diff --git a/recipes-core/everest-devtools/evcli_0.2.1.bb b/recipes-core/everest-devtools/evcli_0.4.2.bb similarity index 91% rename from recipes-core/everest-devtools/evcli_0.2.1.bb rename to recipes-core/everest-devtools/evcli_0.4.2.bb index 06b0646..dc1641a 100644 --- a/recipes-core/everest-devtools/evcli_0.2.1.bb +++ b/recipes-core/everest-devtools/evcli_0.4.2.bb @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/EVerest/everest-utils.git;branch=main;protocol=https" -SRCREV = "dc09ddf8b21987311eaaf53e9a8f2f35e7974a49" +SRCREV = "8ca7ba7e6776c50514ec97dcf304acccbdb7f466" S = "${WORKDIR}/git" diff --git a/recipes-core/everest/everest-cmake_0.4.3.bb b/recipes-core/everest/everest-cmake_0.5.0.bb similarity index 90% rename from recipes-core/everest/everest-cmake_0.4.3.bb rename to recipes-core/everest/everest-cmake_0.5.0.bb index 936245e..b283d7e 100644 --- a/recipes-core/everest/everest-cmake_0.4.3.bb +++ b/recipes-core/everest/everest-cmake_0.5.0.bb @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/EVerest/everest-cmake.git;branch=main;protocol=https" -SRCREV = "4805f09542e58f4d17202277527d6326fbcd27c3" +SRCREV = "6ac5e03f226b5545d72ca16f3faa4984461e30f6" S = "${WORKDIR}/git" diff --git a/recipes-core/everest/everest-core_2024.9.0.bb b/recipes-core/everest/everest-core_2024.10.0.bb similarity index 90% rename from recipes-core/everest/everest-core_2024.9.0.bb rename to recipes-core/everest/everest-core_2024.10.0.bb index ac9ab54..e7c3ada 100644 --- a/recipes-core/everest/everest-core_2024.9.0.bb +++ b/recipes-core/everest/everest-core_2024.10.0.bb @@ -1,13 +1,13 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRC_URI = "git://github.com/EVerest/everest-core.git;branch=release/2024.9.0;protocol=https \ +SRC_URI = "git://github.com/EVerest/everest-core.git;branch=main;protocol=https \ file://everest.service \ " S = "${WORKDIR}/git" -SRCREV = "9193226f386cb0cfc6cbf7f98809648e18ce8792" +SRCREV = "5e967358322fabd34e66a34f2919588df3ebb33f" do_compile[network] = "1" @@ -31,6 +31,7 @@ DEPENDS = " \ libevent \ libevse-security \ libcbv2g \ + libiso15118 \ curl \ sqlitecpp \ " diff --git a/recipes-core/everest/everest-framework_0.17.2.bb b/recipes-core/everest/everest-framework_0.18.0.bb similarity index 94% rename from recipes-core/everest/everest-framework_0.17.2.bb rename to recipes-core/everest/everest-framework_0.18.0.bb index 8ec05e4..f892527 100644 --- a/recipes-core/everest/everest-framework_0.17.2.bb +++ b/recipes-core/everest/everest-framework_0.18.0.bb @@ -11,7 +11,7 @@ inherit pkgconfig S = "${WORKDIR}/git" -SRCREV = "313709f4568d87c6d6612e6b217cb8992b31689e" +SRCREV = "bb3d3a91bb50031d21aa3d43220801a9eb69a6bd" # FIXME (aw): due to nodejs dependency do_configure[network] = "1" diff --git a/recipes-core/everest/libevse-security_0.8.0.bb b/recipes-core/everest/libevse-security_0.9.1.bb similarity index 89% rename from recipes-core/everest/libevse-security_0.8.0.bb rename to recipes-core/everest/libevse-security_0.9.1.bb index 8517a0c..576d580 100644 --- a/recipes-core/everest/libevse-security_0.8.0.bb +++ b/recipes-core/everest/libevse-security_0.9.1.bb @@ -8,7 +8,7 @@ inherit cmake S = "${WORKDIR}/git" -SRCREV = "a80ea8b9ff8d69eefcde98848109990c12f69358" +SRCREV = "049d691a9df55384d35dc369c0819ad4dedb41f5" DEPENDS = "\ date \ diff --git a/recipes-core/everest/libiso15118_0.2.0.bb b/recipes-core/everest/libiso15118_0.2.0.bb new file mode 100644 index 0000000..1b5139a --- /dev/null +++ b/recipes-core/everest/libiso15118_0.2.0.bb @@ -0,0 +1,21 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "git://github.com/EVerest/libiso15118.git;branch=main;protocol=https \ + " + +inherit cmake + +S = "${WORKDIR}/git" + +SRCREV = "15bd77c324f17512bbb74d8dd26748229951e263" + +DEPENDS = "\ + everest-cmake \ + libcbv2g \ + libfsm \ +" + +FILES:${PN} += "${datadir}/everest/*" + +EXTRA_OECMAKE += "-DDISABLE_EDM=ON" diff --git a/recipes-core/everest/liblog_0.2.1.bb b/recipes-core/everest/liblog_0.2.3.bb similarity index 84% rename from recipes-core/everest/liblog_0.2.1.bb rename to recipes-core/everest/liblog_0.2.3.bb index 6751b0b..7563481 100644 --- a/recipes-core/everest/liblog_0.2.1.bb +++ b/recipes-core/everest/liblog_0.2.3.bb @@ -12,8 +12,7 @@ DEPENDS = "\ S = "${WORKDIR}/git" -SRCREV = "19dce0ec3afda8d61bb95a6455a79913b732ec44" -PV = "0.2.1" +SRCREV = "763a56a4bf194e7cf1cab7446e993c376ce933fa" FILES:${PN} += "${datadir}/everest/*" diff --git a/recipes-core/everest/libocpp_0.18.0.bb b/recipes-core/everest/libocpp_0.19.0.bb similarity index 90% rename from recipes-core/everest/libocpp_0.18.0.bb rename to recipes-core/everest/libocpp_0.19.0.bb index dc1ace4..e37e337 100644 --- a/recipes-core/everest/libocpp_0.18.0.bb +++ b/recipes-core/everest/libocpp_0.19.0.bb @@ -8,7 +8,7 @@ inherit cmake S = "${WORKDIR}/git" -SRCREV = "8d74ff558945eb189738555be2d60b22800cf962" +SRCREV = "e29e52908b79b93c786ca54b5d7746ef315abd91" DEPENDS = "\ everest-cmake \ From cd8621c080ef61ad43186e52745f6ae330c6ca6d Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Wed, 20 Nov 2024 17:22:58 +0100 Subject: [PATCH 2/2] Add experimental support for EVerest rust modules Signed-off-by: Kai-Uwe Hermann --- .../cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb | 29 ++ .../everest/everest-core-rust-crates.inc | 200 +++++++++++++ recipes-core/everest/everest-core-rust.bb | 71 +++++ recipes-core/everest/everest-core.inc | 6 + .../0001-add-dummy-token-provider-bank.patch | 271 ++++++++++++++++++ ...est-core_2024.10.0.bb => everest-core_.bb} | 12 +- .../0001-Add-missing-boost-log-linkage.patch | 24 ++ .../0001-Fix-everestrs-build-in-yocto.patch | 28 ++ .../everest/everest-framework_0.18.0.bb | 17 ++ 9 files changed, 653 insertions(+), 5 deletions(-) create mode 100644 recipes-backports/cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb create mode 100644 recipes-core/everest/everest-core-rust-crates.inc create mode 100644 recipes-core/everest/everest-core-rust.bb create mode 100644 recipes-core/everest/everest-core.inc create mode 100644 recipes-core/everest/everest-core/0001-add-dummy-token-provider-bank.patch rename recipes-core/everest/{everest-core_2024.10.0.bb => everest-core_.bb} (85%) create mode 100644 recipes-core/everest/everest-framework/0001-Add-missing-boost-log-linkage.patch create mode 100644 recipes-core/everest/everest-framework/0001-Fix-everestrs-build-in-yocto.patch diff --git a/recipes-backports/cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb b/recipes-backports/cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb new file mode 100644 index 0000000..f12996b --- /dev/null +++ b/recipes-backports/cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb @@ -0,0 +1,29 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = " crate://crates.io/anstyle/1.0.4 \ + crate://crates.io/clap/4.4.7 \ + crate://crates.io/clap_builder/4.4.7 \ + crate://crates.io/clap_lex/0.6.0 \ + crate://crates.io/codespan-reporting/0.11.1 \ + crate://crates.io/cxxbridge-cmd/1.0.110 \ + crate://crates.io/proc-macro2/1.0.69 \ + crate://crates.io/quote/1.0.33 \ + crate://crates.io/strsim/0.10.0 \ + crate://crates.io/syn/2.0.38 \ + crate://crates.io/termcolor/1.3.0 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/unicode-width/0.1.11 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.6 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + " + +inherit cargo + +S = "${WORKDIR}/cxxbridge-cmd-1.0.110" + +CARGO_SRC_DIR = "" + +BBCLASSEXTEND = "native" diff --git a/recipes-core/everest/everest-core-rust-crates.inc b/recipes-core/everest/everest-core-rust-crates.inc new file mode 100644 index 0000000..9a30394 --- /dev/null +++ b/recipes-core/everest/everest-core-rust-crates.inc @@ -0,0 +1,200 @@ +SRC_URI += " \ + crate://crates.io/addr2line/0.21.0 \ + crate://crates.io/adler/1.0.2 \ + crate://crates.io/aho-corasick/1.1.2 \ + crate://crates.io/android-tzdata/0.1.1 \ + crate://crates.io/android_system_properties/0.1.5 \ + crate://crates.io/anstyle/1.0.6 \ + crate://crates.io/anyhow/1.0.75 \ + crate://crates.io/argh/0.1.12 \ + crate://crates.io/argh_derive/0.1.12 \ + crate://crates.io/argh_shared/0.1.12 \ + crate://crates.io/async-stream/0.3.5 \ + crate://crates.io/async-stream-impl/0.3.5 \ + crate://crates.io/async-trait/0.1.78 \ + crate://crates.io/autocfg/1.1.0 \ + crate://crates.io/axum/0.6.20 \ + crate://crates.io/axum-core/0.3.4 \ + crate://crates.io/backtrace/0.3.69 \ + crate://crates.io/base64/0.13.1 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/bumpalo/3.15.3 \ + crate://crates.io/bytes/1.5.0 \ + crate://crates.io/cc/1.0.83 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/chrono/0.4.35 \ + crate://crates.io/convert_case/0.6.0 \ + crate://crates.io/core-foundation-sys/0.8.6 \ + crate://crates.io/cxx/1.0.110 \ + crate://crates.io/cxxbridge-flags/1.0.110 \ + crate://crates.io/cxxbridge-macro/1.0.110 \ + crate://crates.io/data-encoding/2.5.0 \ + crate://crates.io/deranged/0.3.11 \ + crate://crates.io/difflib/0.4.0 \ + crate://crates.io/downcast/0.11.0 \ + crate://crates.io/either/1.10.0 \ + crate://crates.io/endian-type/0.1.2 \ + crate://crates.io/enum-as-inner/0.6.0 \ + crate://crates.io/env_logger/0.10.2 \ + crate://crates.io/equivalent/1.0.1 \ + crate://crates.io/float-cmp/0.9.0 \ + crate://crates.io/fnv/1.0.7 \ + crate://crates.io/form_urlencoded/1.2.1 \ + crate://crates.io/fragile/2.0.0 \ + crate://crates.io/futures/0.3.30 \ + crate://crates.io/futures-channel/0.3.30 \ + crate://crates.io/futures-core/0.3.30 \ + crate://crates.io/futures-executor/0.3.30 \ + crate://crates.io/futures-io/0.3.30 \ + crate://crates.io/futures-macro/0.3.30 \ + crate://crates.io/futures-sink/0.3.30 \ + crate://crates.io/futures-task/0.3.30 \ + crate://crates.io/futures-util/0.3.30 \ + crate://crates.io/getrandom/0.2.12 \ + crate://crates.io/gimli/0.28.1 \ + crate://crates.io/h2/0.3.25 \ + crate://crates.io/hashbrown/0.12.3 \ + crate://crates.io/hashbrown/0.14.3 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/hermit-abi/0.3.9 \ + crate://crates.io/hex/0.4.3 \ + crate://crates.io/http/0.2.12 \ + crate://crates.io/http-body/0.4.6 \ + crate://crates.io/httparse/1.8.0 \ + crate://crates.io/httpdate/1.0.3 \ + crate://crates.io/humantime/2.1.0 \ + crate://crates.io/hyper/0.14.28 \ + crate://crates.io/hyper-timeout/0.4.1 \ + crate://crates.io/iana-time-zone/0.1.60 \ + crate://crates.io/iana-time-zone-haiku/0.1.2 \ + crate://crates.io/idna/0.4.0 \ + crate://crates.io/idna/0.5.0 \ + crate://crates.io/indexmap/1.9.3 \ + crate://crates.io/indexmap/2.1.0 \ + crate://crates.io/ipnet/2.9.0 \ + crate://crates.io/is-terminal/0.4.12 \ + crate://crates.io/itertools/0.10.5 \ + crate://crates.io/itoa/1.0.9 \ + crate://crates.io/js-sys/0.3.69 \ + crate://crates.io/lazy_static/1.4.0 \ + crate://crates.io/libc/0.2.150 \ + crate://crates.io/link-cplusplus/1.0.9 \ + crate://crates.io/log/0.4.20 \ + crate://crates.io/matchit/0.7.3 \ + crate://crates.io/memchr/2.7.1 \ + crate://crates.io/mime/0.3.17 \ + crate://crates.io/minijinja/1.0.10 \ + crate://crates.io/miniz_oxide/0.7.2 \ + crate://crates.io/mio/0.8.11 \ + crate://crates.io/mockall/0.11.4 \ + crate://crates.io/mockall/0.12.1 \ + crate://crates.io/mockall_derive/0.11.4 \ + crate://crates.io/mockall_derive/0.12.1 \ + crate://crates.io/mockall_double/0.3.1 \ + crate://crates.io/nibble_vec/0.1.0 \ + crate://crates.io/normalize-line-endings/0.3.0 \ + crate://crates.io/num-conv/0.1.0 \ + crate://crates.io/num-derive/0.4.2 \ + crate://crates.io/num-traits/0.2.18 \ + crate://crates.io/num_cpus/1.16.0 \ + crate://crates.io/object/0.32.2 \ + crate://crates.io/once_cell/1.19.0 \ + crate://crates.io/percent-encoding/2.3.1 \ + crate://crates.io/pin-project/1.1.5 \ + crate://crates.io/pin-project-internal/1.1.5 \ + crate://crates.io/pin-project-lite/0.2.13 \ + crate://crates.io/pin-utils/0.1.0 \ + crate://crates.io/powerfmt/0.2.0 \ + crate://crates.io/ppv-lite86/0.2.17 \ + crate://crates.io/predicates/2.1.5 \ + crate://crates.io/predicates/3.1.0 \ + crate://crates.io/predicates-core/1.0.6 \ + crate://crates.io/predicates-tree/1.0.9 \ + crate://crates.io/pretty-hex/0.4.1 \ + crate://crates.io/proc-macro2/1.0.79 \ + crate://crates.io/prost/0.11.9 \ + crate://crates.io/prost-derive/0.11.9 \ + crate://crates.io/quote/1.0.35 \ + crate://crates.io/radix_trie/0.2.1 \ + crate://crates.io/rand/0.8.5 \ + crate://crates.io/rand_chacha/0.3.1 \ + crate://crates.io/rand_core/0.6.4 \ + crate://crates.io/regex/1.10.3 \ + crate://crates.io/regex-automata/0.4.6 \ + crate://crates.io/regex-syntax/0.8.2 \ + crate://crates.io/rustc-demangle/0.1.23 \ + crate://crates.io/rustversion/1.0.14 \ + crate://crates.io/ryu/1.0.15 \ + crate://crates.io/serde/1.0.193 \ + crate://crates.io/serde_derive/1.0.193 \ + crate://crates.io/serde_json/1.0.108 \ + crate://crates.io/serde_yaml/0.9.27 \ + crate://crates.io/slab/0.4.9 \ + crate://crates.io/smallvec/1.13.1 \ + crate://crates.io/socket2/0.5.6 \ + crate://crates.io/syn/1.0.109 \ + crate://crates.io/syn/2.0.53 \ + crate://crates.io/sync_wrapper/0.1.2 \ + crate://crates.io/termcolor/1.4.1 \ + crate://crates.io/termtree/0.4.1 \ + crate://crates.io/thiserror/1.0.50 \ + crate://crates.io/thiserror-impl/1.0.50 \ + crate://crates.io/time/0.3.34 \ + crate://crates.io/time-core/0.1.2 \ + crate://crates.io/time-macros/0.2.17 \ + crate://crates.io/tinyvec/1.6.0 \ + crate://crates.io/tinyvec_macros/0.1.1 \ + crate://crates.io/tokio/1.36.0 \ + crate://crates.io/tokio-io-timeout/1.2.0 \ + crate://crates.io/tokio-macros/2.2.0 \ + crate://crates.io/tokio-stream/0.1.15 \ + crate://crates.io/tokio-util/0.7.10 \ + crate://crates.io/tonic/0.8.3 \ + crate://crates.io/tower/0.4.13 \ + crate://crates.io/tower-layer/0.3.2 \ + crate://crates.io/tower-service/0.3.2 \ + crate://crates.io/tracing/0.1.40 \ + crate://crates.io/tracing-attributes/0.1.27 \ + crate://crates.io/tracing-core/0.1.32 \ + crate://crates.io/tracing-futures/0.2.5 \ + crate://crates.io/trust-dns-client/0.23.2 \ + crate://crates.io/trust-dns-proto/0.23.2 \ + crate://crates.io/try-lock/0.2.5 \ + crate://crates.io/unicode-bidi/0.3.15 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/unicode-normalization/0.1.23 \ + crate://crates.io/unicode-segmentation/1.10.1 \ + crate://crates.io/unsafe-libyaml/0.2.9 \ + crate://crates.io/url/2.5.0 \ + crate://crates.io/want/0.3.1 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/wasm-bindgen/0.2.92 \ + crate://crates.io/wasm-bindgen-backend/0.2.92 \ + crate://crates.io/wasm-bindgen-macro/0.2.92 \ + crate://crates.io/wasm-bindgen-macro-support/0.2.92 \ + crate://crates.io/wasm-bindgen-shared/0.2.92 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.6 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/windows-core/0.52.0 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-sys/0.52.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows-targets/0.52.4 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.52.4 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.52.4 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.52.4 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.52.4 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.52.4 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.52.4 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.52.4 \ + crate://crates.io/yore/1.1.0 \ + " diff --git a/recipes-core/everest/everest-core-rust.bb b/recipes-core/everest/everest-core-rust.bb new file mode 100644 index 0000000..e645ade --- /dev/null +++ b/recipes-core/everest/everest-core-rust.bb @@ -0,0 +1,71 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +# SRCREV and SRC_URI is defined here because it's shared between +# everest-core and everest-core-rust +require everest-core.inc + +# rust crate dependencies +require everest-core-rust-crates.inc + +inherit cargo + +S = "${WORKDIR}/git" + +CARGO_SRC_DIR = "modules" + +# list of EVerest modules relative to the modules directory to be built +EVEREST_MODULES = "RsPaymentTerminal RsIskraMeter rust_examples/RsExample rust_examples/RsExampleUser" + +DEPENDS = "\ + everest-framework \ +" + +FILES:${PN} += "${libdir}/everest/* ${datadir}/everest/*" + +# needed for zvt dependency of RsPaymentTerminal +do_compile[network] = "1" +# also needed for zvt_feig_terminal depenency of RsPaymentTerminal +# cargo from meta-lts-mixins does not like the git dependency of RsPaymentTerminal +CARGO_BUILD_FLAGS:remove = "--frozen" + +do_configure:prepend() { + export EVEREST_LIB_DIR="${STAGING_DIR_TARGET}/usr/lib/" + export EVEREST_RS_FRAMEWORK_BINARY_LOCATION="${STAGING_DIR_TARGET}/usr/lib/" +} + +do_compile:prepend() { + export EVEREST_LIB_DIR="${STAGING_DIR_TARGET}/usr/lib/" + export EVEREST_RS_FRAMEWORK_BINARY_LOCATION="${STAGING_DIR_TARGET}/usr/lib/" + export EVEREST_CORE_ROOT="${WORKDIR}/git" + EVERESTRS_LOCATION="${STAGING_DIR_TARGET}/${datadir}/everest/everestrs" + if [ ! -d "${EVERESTRS_LOCATION}" ]; then + bbfatal "Could not find location of everestrs. Did you enable rust support in everest-framework PACKAGECONFIG?" + fi + echo "[workspace]" > ${WORKDIR}/git/modules/Cargo.toml + echo "resolver = \"2\"" >> ${WORKDIR}/git/modules/Cargo.toml + echo "members = [" >> ${WORKDIR}/git/modules/Cargo.toml + for EVEREST_MODULE in ${EVEREST_MODULES} + do + echo " \"${EVEREST_MODULE}\"," >> ${WORKDIR}/git/modules/Cargo.toml + done + echo "]" >> ${WORKDIR}/git/modules/Cargo.toml + echo "[workspace.dependencies]" >> ${WORKDIR}/git/modules/Cargo.toml + echo "everestrs = { path = \"${STAGING_DIR_TARGET}/${datadir}/everest/everestrs/everestrs\" }" >> ${WORKDIR}/git/modules/Cargo.toml + echo "everestrs-build = { path = \"${STAGING_DIR_TARGET}/${datadir}/everest/everestrs/everestrs-build\" }" >> ${WORKDIR}/git/modules/Cargo.toml +} + +# By default cargo installs the modules into /usr/bin which we do not want and fix here +do_install:append(){ + INSTALLED_BIN=$(ls -l "${D}/usr/bin/") + for EVEREST_MODULE_PATH in ${EVEREST_MODULES} + do + EVEREST_MODULE=$(basename ${EVEREST_MODULE_PATH}) + bbnote "Installing EVerest Rust module: ${EVEREST_MODULE}" + mkdir -p ${D}/usr/libexec/everest/modules/${EVEREST_MODULE} + mv ${D}/usr/bin/${EVEREST_MODULE} ${D}/usr/libexec/everest/modules/${EVEREST_MODULE} + cp ${WORKDIR}/git/modules/${EVEREST_MODULE_PATH}/manifest.yaml ${D}/usr/libexec/everest/modules/${EVEREST_MODULE} + done + + rm -r ${D}/usr/bin/ +} diff --git a/recipes-core/everest/everest-core.inc b/recipes-core/everest/everest-core.inc new file mode 100644 index 0000000..a95b16f --- /dev/null +++ b/recipes-core/everest/everest-core.inc @@ -0,0 +1,6 @@ +SRC_URI = "git://github.com/EVerest/everest-core.git;branch=main;protocol=https \ + " + +SRCREV = "5e967358322fabd34e66a34f2919588df3ebb33f" + +PV = "2024.10.0" diff --git a/recipes-core/everest/everest-core/0001-add-dummy-token-provider-bank.patch b/recipes-core/everest/everest-core/0001-add-dummy-token-provider-bank.patch new file mode 100644 index 0000000..258f65b --- /dev/null +++ b/recipes-core/everest/everest-core/0001-add-dummy-token-provider-bank.patch @@ -0,0 +1,271 @@ +From 47b573d3acfe7c2ff119d517b33c006e520486f2 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Hermann +Date: Tue, 19 Nov 2024 20:03:50 +0100 +Subject: [PATCH 1/2] Add dummy token provider for the + bank_session_token_provider interface + +Signed-off-by: Kai-Uwe Hermann +--- + modules/CMakeLists.txt | 1 + + .../CMakeLists.txt | 21 ++++++ + .../DummyBankSessionTokenProvider.cpp | 15 +++++ + .../DummyBankSessionTokenProvider.hpp | 59 +++++++++++++++++ + .../main/bank_session_token_providerImpl.cpp | 22 +++++++ + .../main/bank_session_token_providerImpl.hpp | 64 +++++++++++++++++++ + .../manifest.yaml | 16 +++++ + 7 files changed, 198 insertions(+) + create mode 100644 modules/DummyBankSessionTokenProvider/CMakeLists.txt + create mode 100644 modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.cpp + create mode 100644 modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.hpp + create mode 100644 modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.cpp + create mode 100644 modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.hpp + create mode 100644 modules/DummyBankSessionTokenProvider/manifest.yaml + +diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt +index a398ac6c..beb2e460 100644 +--- a/modules/CMakeLists.txt ++++ b/modules/CMakeLists.txt +@@ -30,6 +30,7 @@ ev_add_module(DummyV2G) + ev_add_module(MicroMegaWattBSP) + ev_add_module(DPM1000) + ev_add_module(OCPPExtensionExample) ++ev_add_module(DummyBankSessionTokenProvider) + ev_add_module(DummyTokenValidator) + ev_add_module(DummyTokenProvider) + ev_add_module(DummyTokenProviderManual) +diff --git a/modules/DummyBankSessionTokenProvider/CMakeLists.txt b/modules/DummyBankSessionTokenProvider/CMakeLists.txt +new file mode 100644 +index 00000000..f1b5b828 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/CMakeLists.txt +@@ -0,0 +1,21 @@ ++# ++# AUTO GENERATED - MARKED REGIONS WILL BE KEPT ++# template version 3 ++# ++ ++# module setup: ++# - ${MODULE_NAME}: module name ++ev_setup_cpp_module() ++ ++# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1 ++# insert your custom targets and additional config variables here ++# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1 ++ ++target_sources(${MODULE_NAME} ++ PRIVATE ++ "main/bank_session_token_providerImpl.cpp" ++) ++ ++# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1 ++# insert other things like install cmds etc here ++# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1 +diff --git a/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.cpp b/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.cpp +new file mode 100644 +index 00000000..8908b588 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.cpp +@@ -0,0 +1,15 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// Copyright Pionix GmbH and Contributors to EVerest ++#include "DummyBankSessionTokenProvider.hpp" ++ ++namespace module { ++ ++void DummyBankSessionTokenProvider::init() { ++ invoke_init(*p_main); ++} ++ ++void DummyBankSessionTokenProvider::ready() { ++ invoke_ready(*p_main); ++} ++ ++} // namespace module +diff --git a/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.hpp b/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.hpp +new file mode 100644 +index 00000000..09bfe5c6 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/DummyBankSessionTokenProvider.hpp +@@ -0,0 +1,59 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// Copyright Pionix GmbH and Contributors to EVerest ++#ifndef DUMMY_BANK_SESSION_TOKEN_PROVIDER_HPP ++#define DUMMY_BANK_SESSION_TOKEN_PROVIDER_HPP ++ ++// ++// AUTO GENERATED - MARKED REGIONS WILL BE KEPT ++// template version 2 ++// ++ ++#include "ld-ev.hpp" ++ ++// headers for provided interface implementations ++#include ++ ++// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1 ++// insert your custom include headers here ++// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1 ++ ++namespace module { ++ ++struct Conf {}; ++ ++class DummyBankSessionTokenProvider : public Everest::ModuleBase { ++public: ++ DummyBankSessionTokenProvider() = delete; ++ DummyBankSessionTokenProvider(const ModuleInfo& info, std::unique_ptr p_main, ++ Conf& config) : ++ ModuleBase(info), p_main(std::move(p_main)), config(config) {}; ++ ++ const std::unique_ptr p_main; ++ const Conf& config; ++ ++ // ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1 ++ // insert your public definitions here ++ // ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1 ++ ++protected: ++ // ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1 ++ // insert your protected definitions here ++ // ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1 ++ ++private: ++ friend class LdEverest; ++ void init(); ++ void ready(); ++ ++ // ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1 ++ // insert your private definitions here ++ // ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1 ++}; ++ ++// ev@087e516b-124c-48df-94fb-109508c7cda9:v1 ++// insert other definitions here ++// ev@087e516b-124c-48df-94fb-109508c7cda9:v1 ++ ++} // namespace module ++ ++#endif // DUMMY_BANK_SESSION_TOKEN_PROVIDER_HPP +diff --git a/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.cpp b/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.cpp +new file mode 100644 +index 00000000..838b0c48 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.cpp +@@ -0,0 +1,22 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// Copyright Pionix GmbH and Contributors to EVerest ++ ++#include "bank_session_token_providerImpl.hpp" ++ ++namespace module { ++namespace main { ++ ++void bank_session_token_providerImpl::init() { ++} ++ ++void bank_session_token_providerImpl::ready() { ++} ++ ++types::bank_transaction::BankSessionToken bank_session_token_providerImpl::handle_get_bank_session_token() { ++ types::bank_transaction::BankSessionToken bank_session_token; ++ bank_session_token.token = config.token; ++ return bank_session_token; ++} ++ ++} // namespace main ++} // namespace module +diff --git a/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.hpp b/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.hpp +new file mode 100644 +index 00000000..917f0124 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/main/bank_session_token_providerImpl.hpp +@@ -0,0 +1,64 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// Copyright Pionix GmbH and Contributors to EVerest ++#ifndef MAIN_BANK_SESSION_TOKEN_PROVIDER_IMPL_HPP ++#define MAIN_BANK_SESSION_TOKEN_PROVIDER_IMPL_HPP ++ ++// ++// AUTO GENERATED - MARKED REGIONS WILL BE KEPT ++// template version 3 ++// ++ ++#include ++ ++#include "../DummyBankSessionTokenProvider.hpp" ++ ++// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1 ++// insert your custom include headers here ++// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1 ++ ++namespace module { ++namespace main { ++ ++struct Conf { ++ std::string token; ++}; ++ ++class bank_session_token_providerImpl : public bank_session_token_providerImplBase { ++public: ++ bank_session_token_providerImpl() = delete; ++ bank_session_token_providerImpl(Everest::ModuleAdapter* ev, ++ const Everest::PtrContainer& mod, Conf& config) : ++ bank_session_token_providerImplBase(ev, "main"), mod(mod), config(config) {}; ++ ++ // ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1 ++ // insert your public definitions here ++ // ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1 ++ ++protected: ++ // command handler functions (virtual) ++ virtual types::bank_transaction::BankSessionToken handle_get_bank_session_token() override; ++ ++ // ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1 ++ // insert your protected definitions here ++ // ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1 ++ ++private: ++ const Everest::PtrContainer& mod; ++ const Conf& config; ++ ++ virtual void init() override; ++ virtual void ready() override; ++ ++ // ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1 ++ // insert your private definitions here ++ // ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1 ++}; ++ ++// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1 ++// insert other definitions here ++// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1 ++ ++} // namespace main ++} // namespace module ++ ++#endif // MAIN_BANK_SESSION_TOKEN_PROVIDER_IMPL_HPP +diff --git a/modules/DummyBankSessionTokenProvider/manifest.yaml b/modules/DummyBankSessionTokenProvider/manifest.yaml +new file mode 100644 +index 00000000..d36bb826 +--- /dev/null ++++ b/modules/DummyBankSessionTokenProvider/manifest.yaml +@@ -0,0 +1,16 @@ ++description: Dummy bank session token provider ++provides: ++ main: ++ description: Main implementation of bank session dummy token provider always returning one configured token ++ interface: bank_session_token_provider ++ config: ++ token: ++ description: Dummy token string to return ++ type: string ++ default: DummyBankSessionToken ++requires: {} ++enable_external_mqtt: false ++metadata: ++ license: https://opensource.org/licenses/Apache-2.0 ++ authors: ++ - Kai-Uwe Hermann +-- +2.47.0 + diff --git a/recipes-core/everest/everest-core_2024.10.0.bb b/recipes-core/everest/everest-core_.bb similarity index 85% rename from recipes-core/everest/everest-core_2024.10.0.bb rename to recipes-core/everest/everest-core_.bb index e7c3ada..0849ce6 100644 --- a/recipes-core/everest/everest-core_2024.10.0.bb +++ b/recipes-core/everest/everest-core_.bb @@ -1,13 +1,15 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRC_URI = "git://github.com/EVerest/everest-core.git;branch=main;protocol=https \ - file://everest.service \ - " +# SRCREV and SRC_URI is defined here because it's shared between +# everest-core and everest-core-rust +require everest-core.inc -S = "${WORKDIR}/git" +SRC_URI += "file://everest.service \ + file://0001-add-dummy-token-provider-bank.patch \ + " -SRCREV = "5e967358322fabd34e66a34f2919588df3ebb33f" +S = "${WORKDIR}/git" do_compile[network] = "1" diff --git a/recipes-core/everest/everest-framework/0001-Add-missing-boost-log-linkage.patch b/recipes-core/everest/everest-framework/0001-Add-missing-boost-log-linkage.patch new file mode 100644 index 0000000..7bfe93c --- /dev/null +++ b/recipes-core/everest/everest-framework/0001-Add-missing-boost-log-linkage.patch @@ -0,0 +1,24 @@ +From ed80d05505131a7ce2638ce0bb52bb810ab511bd Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Hermann +Date: Mon, 2 Sep 2024 19:14:33 +0200 +Subject: [PATCH] Add missing boost log linkage + +Signed-off-by: Kai-Uwe Hermann +--- + everestrs/everestrs/build.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/everestrs/everestrs/build.rs b/everestrs/everestrs/build.rs +index 83213cc..f3ea8cb 100644 +--- a/everestrs/everestrs/build.rs ++++ b/everestrs/everestrs/build.rs +@@ -122,4 +122,6 @@ fn main() { + + print_link_options(&libs.everestrs_sys); + print_link_options(&libs.framework); ++ println!("cargo:rustc-link-lib=boost_log"); ++ println!("cargo:rustc-link-lib=boost_log_setup"); + } +-- +2.30.2 + diff --git a/recipes-core/everest/everest-framework/0001-Fix-everestrs-build-in-yocto.patch b/recipes-core/everest/everest-framework/0001-Fix-everestrs-build-in-yocto.patch new file mode 100644 index 0000000..9386753 --- /dev/null +++ b/recipes-core/everest/everest-framework/0001-Fix-everestrs-build-in-yocto.patch @@ -0,0 +1,28 @@ +From 4b7cb81a922c329f53eb8ee0a7dd388bc0ad4ced Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Hermann +Date: Mon, 2 Sep 2024 12:59:56 +0200 +Subject: [PATCH] Fix everestrs build in yocto + +Signed-off-by: Kai-Uwe Hermann +--- + everestrs/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/everestrs/CMakeLists.txt b/everestrs/CMakeLists.txt +index f3288bd..18b0904 100644 +--- a/everestrs/CMakeLists.txt ++++ b/everestrs/CMakeLists.txt +@@ -1,4 +1,9 @@ +-set(CXXBRIDGE_BINARY ${CMAKE_CURRENT_BINARY_DIR}/cargo/bin/cxxbridge) ++if(FIND_CXXBRIDGE_BINARY) ++ message(STATUS "Trying to find cxxbridge cli tool") ++ find_program(CXXBRIDGE_BINARY cxxbridge REQUIRED) ++else() ++ set(CXXBRIDGE_BINARY ${CMAKE_CURRENT_BINARY_DIR}/cargo/bin/cxxbridge) ++endif() + if (NOT EXISTS ${CXXBRIDGE_BINARY}) + message(STATUS "Fetching rust cxxbridge cli tool") + execute_process( +-- +2.30.2 + diff --git a/recipes-core/everest/everest-framework_0.18.0.bb b/recipes-core/everest/everest-framework_0.18.0.bb index f892527..96828c4 100644 --- a/recipes-core/everest/everest-framework_0.18.0.bb +++ b/recipes-core/everest/everest-framework_0.18.0.bb @@ -3,11 +3,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/EVerest/everest-framework.git;branch=main;protocol=https \ file://0001-Set-PYTHON_MODULE_EXTENSION-to-.so-to-avoid-pollutin.patch \ + file://0001-Fix-everestrs-build-in-yocto.patch \ + file://0001-Add-missing-boost-log-linkage.patch \ " inherit python3native inherit cmake inherit pkgconfig +inherit logging S = "${WORKDIR}/git" @@ -44,3 +47,17 @@ EXTRA_OECMAKE += "\ -DPYBIND11_PYTHONLIBS_OVERWRITE=OFF \ -DEVEREST_INSTALL_ADMIN_PANEL=OFF \ " + +# disable everestrs rust support by default +PACKAGECONFIG ??= "" +PACKAGECONFIG[rust] = "-DEVEREST_ENABLE_RS_SUPPORT=ON -DFIND_CXXBRIDGE_BINARY=ON,-DEVEREST_ENABLE_RS_SUPPORT=OFF -DFIND_CXXBRIDGE_BINARY=OFF,cxxbridge-cmd-native,,," + +do_install:append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'rust', 'true', 'false', d)}; then + bbnote "everest-framework rust support enabled" + mkdir -p ${D}${datadir}/everest + cp -R ${WORKDIR}/git/everestrs ${D}${datadir}/everest/ + else + bbnote "everest-framework rust support disabled" + fi +}