systemd-conf-canbus: Add link configuration
[AGL/meta-agl.git] / meta-agl-core / recipes-core / systemd / systemd-conf-canbus_1.0.bb
1 SUMMARY = "Systemd canbus configuration"
2 DESCRIPTION = "Systemd may require slightly different configuration for \
3 different machines. This injects configuration for the CAN bus."
4 LICENSE = "MIT"
5 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6
7 PE = "1"
8
9 SRC_URI = "\
10     file://canbus-can.network \
11     file://canbus-can-fd.network \
12     file://canbus-virtio.network \
13     file://canbus-can.link \
14 "
15
16 CANBUS_NETWORK_CONFIG ??= "canbus-can.network"
17 CANBUS_NETWORK_CONFIG:virtio-all ?= "canbus-virtio.network"
18
19 do_install() {
20     # Install CAN bus network configuration
21     install -d ${D}${nonarch_base_libdir}/systemd/network/
22     install -m 0644 ${WORKDIR}/${CANBUS_NETWORK_CONFIG} ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.network
23
24     # Install link configuration to bump queue size on physical CAN bus devices
25     install -m 0644 ${WORKDIR}/canbus-can.link ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.link
26 }
27
28 PACKAGE_ARCH = "${MACHINE_ARCH}"
29
30 FILES:${PN} = " \
31     ${nonarch_base_libdir}/systemd/network/ \
32 "