From 54e11a6c5b169454cab60c7e6a1da8930d42b495 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 25 Aug 2023 20:09:46 +0200 Subject: libgpiod: update to v2.0.2 This is a small bug-fix release addressing a segfault, a memory corruption bug and a couple minor issues. This also removes the patch that's already upstream. Signed-off-by: Bartosz Golaszewski Signed-off-by: Khem Raj --- .../libgpiod-2.x/gpio-tools-test-bats-modify.patch | 67 ---------------------- meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb | 29 ---------- meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb | 27 +++++++++ 3 files changed, 27 insertions(+), 96 deletions(-) delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.x/gpio-tools-test-bats-modify.patch delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/gpio-tools-test-bats-modify.patch b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/gpio-tools-test-bats-modify.patch deleted file mode 100644 index 0b2a5e6a8c..0000000000 --- a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/gpio-tools-test-bats-modify.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 53f9670d6af1bd0745c1df9c469b269c72607b23 Mon Sep 17 00:00:00 2001 -From: Joe Slater -Date: Tue, 6 Jun 2023 08:04:27 -0700 -Subject: [PATCH] tools: tests: modify delays in toggle test - -The test "gpioset: toggle (continuous)" uses fixed delays to test -toggling values. This is not reliable, so we switch to looking -for transitions from one value to another. - -We wait for a transition up to 1.5 seconds. - -Signed-off-by: Joe Slater -Signed-off-by: Bartosz Golaszewski - -Upstream-Status: Accepted - -Signed-off-by: Joe Slater ---- - tools/gpio-tools-test.bats | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) - -diff --git a/tools/gpio-tools-test.bats b/tools/gpio-tools-test.bats -index c83ca7d..929c35a 100755 ---- a/tools/gpio-tools-test.bats -+++ b/tools/gpio-tools-test.bats -@@ -141,6 +141,20 @@ gpiosim_check_value() { - [ "$VAL" = "$EXPECTED" ] - } - -+gpiosim_wait_value() { -+ local OFFSET=$2 -+ local EXPECTED=$3 -+ local DEVNAME=${GPIOSIM_DEV_NAME[$1]} -+ local CHIPNAME=${GPIOSIM_CHIP_NAME[$1]} -+ local PORT=$GPIOSIM_SYSFS/$DEVNAME/$CHIPNAME/sim_gpio$OFFSET/value -+ -+ for i in {1..15}; do -+ [ "$(<$PORT)" = "$EXPECTED" ] && return -+ sleep 0.1 -+ done -+ return 1 -+} -+ - gpiosim_cleanup() { - for CHIP in ${!GPIOSIM_CHIP_NAME[@]} - do -@@ -1567,15 +1581,12 @@ request_release_line() { - gpiosim_check_value sim0 4 0 - gpiosim_check_value sim0 7 0 - -- sleep 1 -- -- gpiosim_check_value sim0 1 0 -+ gpiosim_wait_value sim0 1 0 - gpiosim_check_value sim0 4 1 - gpiosim_check_value sim0 7 1 - -- sleep 1 - -- gpiosim_check_value sim0 1 1 -+ gpiosim_wait_value sim0 1 1 - gpiosim_check_value sim0 4 0 - gpiosim_check_value sim0 7 0 - } --- -2.25.1 - diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb deleted file mode 100644 index 6958f2d841..0000000000 --- a/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -require libgpiod.inc - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" -LIC_FILES_CHKSUM = " \ - file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ - file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ -" - -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:" - -SRC_URI += "file://gpio-tools-test-bats-modify.patch" - -SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392" - -# Enable all project features for ptest -PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" -PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" - -PACKAGES =+ "${PN}-ptest-dev" -FILES:${PN}-tools += "${bindir}/gpionotify" -FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" -FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h" - -RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim" - -do_install_ptest:append() { - install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h -} diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb new file mode 100644 index 0000000000..7533e0a258 --- /dev/null +++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb @@ -0,0 +1,27 @@ +require libgpiod.inc + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +LIC_FILES_CHKSUM = " \ + file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ +" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:" + +SRC_URI[sha256sum] = "c3c923dc63b7b1b02639c9179c81e3d9febf0887bbaa59775990229cdbedb88b" + +# Enable all project features for ptest +PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" +PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" + +PACKAGES =+ "${PN}-ptest-dev" +FILES:${PN}-tools += "${bindir}/gpionotify" +FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" +FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h" + +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim" + +do_install_ptest:append() { + install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h +} -- cgit v1.2.3-54-g00ecf