From a26701a0dbe2654f4a1e2a53c709ac12077e18f4 Mon Sep 17 00:00:00 2001 From: Boerge Struempfel Date: Tue, 23 Jan 2024 16:58:25 +0100 Subject: [PATCH] package/swupdate: Add compatibility to libgpiod2 swupdate supports both the old and the new API, so HAVE_LIBGPIOD is enabled if either is enabled. Signed-off-by: Boerge Struempfel Signed-off-by: Arnout Vandecappelle --- package/swupdate/Config.in | 4 ++-- package/swupdate/swupdate.mk | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/swupdate/Config.in b/package/swupdate/Config.in index ba3f6a0c0f..3708df0881 100644 --- a/package/swupdate/Config.in +++ b/package/swupdate/Config.in @@ -37,8 +37,8 @@ config BR2_PACKAGE_SWUPDATE remote handler. * Select BR2_PACKAGE_LIBRSYNC to add support for using rdiff handler. - * Select BR2_PACKAGE_LIBGPIOD to add support for - microcontroller firmware update. + * Select BR2_PACKAGE_LIBGPIOD or BR2_PACKAGE_LIBGPIOD2 to add + support for microcontroller firmware update. * Select BR2_PACKAGE_EFIBOOTMGR to add support for EFI Boot Guard. * Select BR2_PACKAGE_LIBCURL, BR2_PACKAGE_LIBWEBSOCKETS, diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk index ca8c140886..a2b0995227 100644 --- a/package/swupdate/swupdate.mk +++ b/package/swupdate/swupdate.mk @@ -72,7 +72,10 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBFDISK=n endif -ifeq ($(BR2_PACKAGE_LIBGPIOD),y) +ifeq ($(BR2_PACKAGE_LIBGPIOD2),y) +SWUPDATE_DEPENDENCIES += libgpiod2 +SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=y +else ifeq ($(BR2_PACKAGE_LIBGPIOD),y) SWUPDATE_DEPENDENCIES += libgpiod SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=y else