summaryrefslogtreecommitdiffstats
path: root/meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-06-26 15:22:14 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-06-27 09:53:39 +0000
commit2460f6ac99d834f00dfa6e26546c41eac6cd38c9 (patch)
tree1e9d6714f63bc29f8e31e5007c162e1df3d6406b /meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb
parentdbb228360317872e7c6fcbd96faaf404535130c3 (diff)
Add meta-agl-kuksa-val
Add new meta-agl-kuksa-val layer, and populate it with the base KUKSA.val databroker and VSS schema recipes from meta-agl, as well as the recipes for the Python modules they depend on. Additional changes: - Installation of AGL-specific configuration has been removed from the kuksa-can-provider recipe. It now packages the upstream example/test configuration in a new kuksa-can-provider-conf-example package that can be replaced via the RPROVIDES scheme. Some minor tweaks for paths are made to the upstream .ini file to match FHS expectations. Bug-AGL: SPEC-5136 Change-Id: I3128a223f4fcf16e496cb27e26afcaee0a28979a Signed-off-by: Scott Murray <scott.murray@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30040 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb')
-rw-r--r--meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb84
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb b/meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb
new file mode 100644
index 000000000..53b976f61
--- /dev/null
+++ b/meta-agl-kuksa-val/recipes-connectivity/kuksa-val/kuksa-can-provider_git.bb
@@ -0,0 +1,84 @@
+SUMMARY = "CAN provider for KUKSA.val, the KUKSA Vehicle Abstraction Layer"
+HOMEPAGE = "https://github.com/eclipse-kuksa"
+BUGTRACKER = "https://github.com/eclips-kuksa/kuksa-can-provider/issues"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
+
+DEPENDS = "python3-setuptools-git-versioning-native"
+
+PV = "0.4.3+git${SRCPV}"
+
+SRC_URI = "git://github.com/eclipse-kuksa/kuksa-can-provider.git;protocol=https;branch=main \
+ file://0001-dbc2val-add-installation-mechanism.patch \
+ file://0002-dbc2val-usability-improvements.patch \
+ file://0003-dbc2val-fix-token-file-configuration-option.patch \
+ file://0004-Enable-val2dbc-for-sensor-values.patch \
+ file://kuksa-can-provider.service \
+ file://kuksa-can-provider.default \
+ "
+SRCREV = "d5fdcfa7574ce69059b6f449629571db0982c1cf"
+
+S = "${WORKDIR}/git"
+
+inherit setuptools3 systemd update-alternatives
+
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/kuksa-can-provider.default ${D}${sysconfdir}/default/
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/kuksa-can-provider.service ${D}${systemd_system_unitdir}
+ fi
+
+ # Install tweaked copy of the example configuration, the .ini file
+ # and the upstream demo/test files it references are packaged
+ # separately from the library and daemon to make it easy to replace
+ # them.
+ install -d ${D}${sysconfdir}/kuksa-can-provider
+ sed -e 's|^mapping =.*|mapping = /usr/share/vss/vss.json|' \
+ -e 's|^dbcfile =.*|dbcfile = /usr/share/dbc/Model3CAN.dbc|' \
+ -e 's|^candumpfile =.*|dbcfile = /usr/share/can/candump.log|' \
+ -e 's|^dbc_default_file =.*|dbc_default_file = /etc/kuksa-can-provider/dbc_default_values.json|' \
+ ${S}/config/dbc_feeder.ini > ${D}${sysconfdir}/kuksa-can-provider/config.ini
+ install -m 0644 ${S}/dbc_default_values.json ${D}${sysconfdir}/kuksa-can-provider/
+ install -d ${D}${datadir}/dbc
+ install -m 0644 ${S}/Model3CAN.dbc ${D}${datadir}/dbc/
+ install -d ${D}${datadir}/can
+ install -m 0644 ${S}/candump.log ${D}${datadir}/can/
+}
+
+ALTERNATIVE_LINK_NAME[kuksa-can-provider.env] = "${sysconfdir}/default/kuksa-can-provider"
+
+FILES:${PN} += "${systemd_system_unitdir}"
+
+# NOTE:
+# Since the environment file is used by the systemd unit, it is packaged
+# with the it in the main package, and the alternative scheme is set up
+# against that. Replacement configuration packages can still configure
+# the alternative as required.
+ALTERNATIVE_TARGET_${PN} = "${sysconfdir}/default/kuksa-can-provider.default"
+
+PACKAGE_BEFORE_PN += "${PN}-conf-example"
+
+FILES:${PN}-conf-example += " \
+ ${sysconfdir}/kuksa-can-provider/config.ini \
+ ${sysconfdir}/kuksa-can-provider/dbc_default_values.json \
+ ${datadir}/dbc/Model3CAN.dbc \
+ ${datadir}/can/candump.log \
+"
+RPROVIDES:${PN}-conf-example = "kuksa-can-provider-conf"
+
+RDEPENDS:${PN} += " \
+ bash \
+ python3-pyserial \
+ python3-cantools \
+ python3-can \
+ python3-can-j1939 \
+ python3-pyyaml \
+ python3-py-expression-eval \
+ kuksa-client \
+ kuksa-can-provider-conf \
+"