Skip to contentSkip to conversation

package/libgpiod2: add option to enable gpioset interactive mode

PATCH In review Marcus Hoffmann via buildroot 3 participants 3 messages Jan 30 – Feb 1

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libgpiod2: add option to enable gpioset interactive mode

---
 package/libgpiod2/Config.in    | 11 ++++++++++-
 package/libgpiod2/libgpiod2.mk |  7 +++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
package/libgpiod2/Config.in +10 -1
index 5a13bfc344..279b1e40e7 100644
@@ -21,7 +21,16 @@ config BR2_PACKAGE_LIBGPIOD2_TOOLS
 	help
 	  Include a set of command-line tools for managing GPIOs.
 
-endif
+if BR2_PACKAGE_LIBGPIOD2_TOOLS
+
+config BR2_PACKAGE_LIBGPIOD2_GPIOSET_INTERACTIVE
+	bool "gpioset interactive"
+	select BR2_PACKAGE_LIBEDIT
+	help
+	  Build with gpioset interactive mode.
+endif # BR2_PACKAGE_LIBGPIOD2_TOOLS
+
+endif # BR2_PACKAGE_LIBGPIOD2
 
 comment "libgpiod2 needs kernel headers >= 5.10"
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
package/libgpiod2/libgpiod2.mk +7 -0
index c5b53f631b..62d6173418 100644
@@ -24,6 +24,13 @@ else
 LIBGPIOD2_CONF_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGPIOD2_GPIOSET_INTERACTIVE),y)
+LIBGPIOD2_DEPENDENCIES += libedit
+LIBGPIOD2_CONF_OPTS += --enable-gpioset-interactive
+else
+LIBGPIOD2_CONF_OPTS += --disable-gpioset-interactive
+endif
+
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 LIBGPIOD2_CONF_OPTS += --enable-bindings-cxx
 else
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by on v1 1/1
#1 lore raw

Hello Marcus,

Thanks for the patch. Functionally, it looks good to me, however I do have one small nitpicking comment on the help text (see below).

I also tested this on an i.MX8MP board and it seems to be working as intended.

Quoted 1 line · On Fri, 30 Jan 2026 14:10:13 +0100 Marcus Hoffmann via buildroot…
Quoted 11 lines
---
 package/libgpiod2/Config.in    | 11 ++++++++++-
 package/libgpiod2/libgpiod2.mk |  7 +++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
package/libgpiod2/Config.in +0 -0
index 5a13bfc344..279b1e40e7 100644
@@ -21,7 +21,16 @@ config BR2_PACKAGE_LIBGPIOD2_TOOLS
 	help

package/libgpiod2/Config.in config BR2_PACKAGE_LIBGPIOD2_TOOLS · line 30

Quoted 10 lines
package/libgpiod2/Config.in +7 -1
 	  Include a set of command-line tools for managing GPIOs.
 
-endif
+if BR2_PACKAGE_LIBGPIOD2_TOOLS
+
+config BR2_PACKAGE_LIBGPIOD2_GPIOSET_INTERACTIVE
+	bool "gpioset interactive"
+	select BR2_PACKAGE_LIBEDIT
+	help
+	  Build with gpioset interactive mode.

I am not quite sure, but I think there should be an empty line here to avoid the help text being smushed together with the Symbol Section. I did not find anything regarding this in the styleguide however, so I might be mistaken.

Quoted 31 lines
package/libgpiod2/Config.in +3 -0
+endif # BR2_PACKAGE_LIBGPIOD2_TOOLS
+
+endif # BR2_PACKAGE_LIBGPIOD2
 
 comment "libgpiod2 needs kernel headers >= 5.10"
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
package/libgpiod2/libgpiod2.mk +7 -0
index c5b53f631b..62d6173418 100644
@@ -24,6 +24,13 @@ else
 LIBGPIOD2_CONF_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGPIOD2_GPIOSET_INTERACTIVE),y)
+LIBGPIOD2_DEPENDENCIES += libedit
+LIBGPIOD2_CONF_OPTS += --enable-gpioset-interactive
+else
+LIBGPIOD2_CONF_OPTS += --disable-gpioset-interactive
+endif
+
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 LIBGPIOD2_CONF_OPTS += --enable-bindings-cxx
 else
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Kind regards,
Börge
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Marcus Hoffmann via buildroot
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marcus" == Marcus Hoffmann via buildroot <[email protected]> writes:

---
 package/libgpiod2/Config.in    | 11 ++++++++++-
 package/libgpiod2/libgpiod2.mk |  7 +++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
package/libgpiod2/Config.in +0 -0
index 5a13bfc344..279b1e40e7 100644

package/libgpiod2/Config.in config BR2_PACKAGE_LIBGPIOD2_TOOLS · line 28

Quoted 9 lines
package/libgpiod2/Config.in +5 -1
@@ -21,7 +21,16 @@ config BR2_PACKAGE_LIBGPIOD2_TOOLS
 	help
 	  Include a set of command-line tools for managing GPIOs.
 
-endif
+if BR2_PACKAGE_LIBGPIOD2_TOOLS
+
+config BR2_PACKAGE_LIBGPIOD2_GPIOSET_INTERACTIVE
+	bool "gpioset interactive"
+	select BR2_PACKAGE_LIBEDIT

You need to propagate the dependencies from libedit, but maybe it is easier to get rid of the option and just automatically enable this if libedit is enabled, E.G.:

ifeq ($(BR2_PACKAGE_LIBEDIT),y) LIBGPIOD2_DEPENDENCIES += libedit LIBGPIOD2_CONF_OPTS += --enable-gpioset-interactive else
LIBGPIOD2_CONF_OPTS += --disable-gpioset-interactive endif

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot