summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Walzer <Thomas.Walzer@Reutlingen-University.de>2020-07-14 14:23:06 +0200
committerThomas Walzer <Thomas.Walzer@Reutlingen-University.de>2020-07-14 14:23:06 +0200
commit3c237ac65fb6e463836931ead0ddd4d45545a989 (patch)
tree18ce17e86585d89fc993d9491e8f805d1dfe6dc2
parentbbbe875df6e1623078c64ee7b0351323d4eac203 (diff)
added service for socketcan, changed dev-mapping and changed version to low-can-service with can-write permission
-rw-r--r--meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb2
-rw-r--r--meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default4
-rw-r--r--meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default16
-rw-r--r--meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb1
4 files changed, 20 insertions, 3 deletions
diff --git a/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb b/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb
index d06cfd2..40f319f 100644
--- a/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb
+++ b/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb
@@ -7,7 +7,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-can-low-level;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "${AGL_APP_REVISION}"
+SRCREV = "44615b186602f2e2c4dd8e2a8c1e00ccbdac1e9c"
PV = "${AGLVERSION}"
S = "${WORKDIR}/git"
diff --git a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default
index 7bd8bf2..a5aee37 100644
--- a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default
+++ b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default
@@ -2,5 +2,5 @@
; Format has to follow ini rules key="value", notice " around value.
[CANbus-mapping]
-hs="can0"
-ls="can0"
+hs="slcan0"
+ls="slcan0"
diff --git a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default
new file mode 100644
index 0000000..e15539c
--- /dev/null
+++ b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default
@@ -0,0 +1,16 @@
+[Unit]
+Description=SocketCAN serial interface slcan0 with a baudrate of 500000
+Requires=networkd.service
+After=networkd.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/sbin/modprobe slcan ; /usr/bin/slcan_attach -f -s6 -o /dev/ttyACM0 ; /usr/bin/slcand ttyACM0 slcan0 ; /sbin/ifconfig slcan0 up
+ExecReload=/sbin/ifconfig slcan0 down ; /sbin/ifconfig slcan0 up
+ExecStop=/sbin/ifconfig slcan0 down
+
+[Install]
+WantedBy=multi-user.target
+
+
diff --git a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb
index 1309ffa..8c067fd 100644
--- a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb
+++ b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb
@@ -13,6 +13,7 @@ inherit allarch
do_install() {
install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/dev-mapping.conf.default ${D}${sysconfdir}/dev-mapping.conf
+ install -m 0644 ${WORKDIR}/socketcan-slcan0.service.default ${D}${sysconfdir}/systemd/system/socketcan-slcan0.service
}
RPROVIDES_${PN} = "virtual/low-can-dev-mapping"