From e970002c8dc406ee07a62d4926b58b90683a46d5 Mon Sep 17 00:00:00 2001 From: Lionel VITTE Date: Fri, 26 Aug 2022 11:10:09 +0200 Subject: [PATCH] GPIO-UDEV: assign /dev/gpio to dialout group Signed-off-by: Lionel VITTE Change-Id: Ide0d6e4e5177fb9f56eb174734fb3b61f0e075af --- recipes-kernel/gpio-udev/gpio-udev.bb | 15 +++++++++++++++ .../gpio-udev/gpio-udev/99-gpio-group.rules | 2 ++ .../packagegroups/packagegroup-framework-core.bb | 1 + 3 files changed, 18 insertions(+) create mode 100644 recipes-kernel/gpio-udev/gpio-udev.bb create mode 100644 recipes-kernel/gpio-udev/gpio-udev/99-gpio-group.rules diff --git a/recipes-kernel/gpio-udev/gpio-udev.bb b/recipes-kernel/gpio-udev/gpio-udev.bb new file mode 100644 index 0000000..096f437 --- /dev/null +++ b/recipes-kernel/gpio-udev/gpio-udev.bb @@ -0,0 +1,15 @@ +SUMMARY = "Add udev rules to set GPIO to dialout group" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +DEPENDS = "udev" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI = "file://99-gpio-group.rules" + +do_install() { + install -D -p -m0664 ${WORKDIR}/99-gpio-group.rules \ + ${D}${sysconfdir}/udev/rules.d/99-gpio-group.rules +} diff --git a/recipes-kernel/gpio-udev/gpio-udev/99-gpio-group.rules b/recipes-kernel/gpio-udev/gpio-udev/99-gpio-group.rules new file mode 100644 index 0000000..4d825f6 --- /dev/null +++ b/recipes-kernel/gpio-udev/gpio-udev/99-gpio-group.rules @@ -0,0 +1,2 @@ +# Add /dev/gpiochip to dialout group, like Raspberry, to allow weston user to access GPIO +ACTION=="add", KERNEL=="gpio*", SUBSYSTEM=="gpio", GROUP="dialout" \ No newline at end of file diff --git a/recipes-st/packagegroups/packagegroup-framework-core.bb b/recipes-st/packagegroups/packagegroup-framework-core.bb index 145557e..179c87c 100644 --- a/recipes-st/packagegroups/packagegroup-framework-core.bb +++ b/recipes-st/packagegroups/packagegroup-framework-core.bb @@ -18,6 +18,7 @@ RDEPENDS:packagegroup-framework-core = "\ packagegroup-framework-core-display \ packagegroup-framework-core-mm \ infos-openstlinux \ + gpio-udev \ " SUMMARY:packagegroup-framework-core-display = "Framework core components for display"