summaryrefslogtreecommitdiffstats
path: root/recipes-core/udev
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-11-23 15:33:04 -0500
committerScott Murray <scott.murray@konsulko.com>2022-11-23 15:35:29 -0500
commit46a4e4e4f43625686e73db8523bbfc9abaed558f (patch)
tree44c1542da1b5657627a04d3e7231547290589fbf /recipes-core/udev
parent6e5c561e962d0b900b8f6225f27467a193c43dee (diff)
output-udev-conf: add recipe
Add recipe to install udev rules to force all input devices to be associated with the HDMI-A-1 output. The intended use is with the KVM host image to ensure input devices are matched to the IVI guest VM. Also fixed the RDEPENDS for the other udev rule recipes to depend on udev specifically instead of systemd. Bug-AGL: SPEC-4618 Change-Id: Ic2efe01f7aed85f89dbda3cb958332ed5db799a1 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'recipes-core/udev')
-rw-r--r--recipes-core/udev/output-udev-conf/91-output.rules6
-rw-r--r--recipes-core/udev/output-udev-conf_1.0.bb18
-rw-r--r--recipes-core/udev/sw-gpsd-udev-conf_1.0.bb2
-rw-r--r--recipes-core/udev/usb-can-udev-conf_1.0.bb2
4 files changed, 26 insertions, 2 deletions
diff --git a/recipes-core/udev/output-udev-conf/91-output.rules b/recipes-core/udev/output-udev-conf/91-output.rules
new file mode 100644
index 000000000..89af46452
--- /dev/null
+++ b/recipes-core/udev/output-udev-conf/91-output.rules
@@ -0,0 +1,6 @@
+# Associate all input devices with the first display
+#
+# NOTE: Can be more selective with something like:
+# SUBSYSTEM=="input", ATTRS{idVendor}=="*", ATTRS{idProduct}=="004a", OWNER="display", ENV{ID_SEAT}="seat0", ENV{WL_OUTPUT}="HDMI-A-1"
+#
+SUBSYSTEM=="input", OWNER="display", ENV{ID_SEAT}="seat0", ENV{WL_OUTPUT}="HDMI-A-1"
diff --git a/recipes-core/udev/output-udev-conf_1.0.bb b/recipes-core/udev/output-udev-conf_1.0.bb
new file mode 100644
index 000000000..c4e05ad02
--- /dev/null
+++ b/recipes-core/udev/output-udev-conf_1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Input device output assignment udev configuration"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://91-output.rules"
+
+do_compile[noexec] = "1"
+
+do_install() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/91-output.rules ${D}${sysconfdir}/udev/rules.d/
+ fi
+}
+
+FILES:${PN} += "${systemd_system_unitdir}"
+
+RDEPENDS:${PN} += "udev"
diff --git a/recipes-core/udev/sw-gpsd-udev-conf_1.0.bb b/recipes-core/udev/sw-gpsd-udev-conf_1.0.bb
index 0dfd05218..bcad0f41b 100644
--- a/recipes-core/udev/sw-gpsd-udev-conf_1.0.bb
+++ b/recipes-core/udev/sw-gpsd-udev-conf_1.0.bb
@@ -13,4 +13,4 @@ do_install() {
fi
}
-RDEPENDS:${PN} += "systemd"
+RDEPENDS:${PN} += "udev"
diff --git a/recipes-core/udev/usb-can-udev-conf_1.0.bb b/recipes-core/udev/usb-can-udev-conf_1.0.bb
index 9c6035e96..1b76550da 100644
--- a/recipes-core/udev/usb-can-udev-conf_1.0.bb
+++ b/recipes-core/udev/usb-can-udev-conf_1.0.bb
@@ -22,4 +22,4 @@ do_install() {
FILES:${PN} += "${systemd_system_unitdir}"
-RDEPENDS:${PN} += "systemd"
+RDEPENDS:${PN} += "udev"