Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libcec: Add option to use kernel framework
@ 2026-06-29  2:06 Stefan Ott via buildroot
  0 siblings, 0 replies; only message in thread
From: Stefan Ott via buildroot @ 2026-06-29  2:06 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Stefan Ott

As explained in libcec's README.raspberrypi.md:

  On a recent Raspberry Pi that's using the vc4_kms_3d dtoverlay,
  you have to use the Linux Kernel driver and disable the Raspberry Pi
  driver with -DHAVE_RPI_API=0 to use CEC.

This patch adds an option to do just that to the libcec package.

Signed-off-by: Stefan Ott <stefan@ott.net>
---
 package/libcec/Config.in | 9 +++++++++
 package/libcec/libcec.mk | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/package/libcec/Config.in b/package/libcec/Config.in
index 2dddc53635..136891a6e3 100644
--- a/package/libcec/Config.in
+++ b/package/libcec/Config.in
@@ -13,6 +13,15 @@ config BR2_PACKAGE_LIBCEC
 
 	  http://libcec.pulse-eight.com
 
+config BR2_PACKAGE_LIBCEC_LINUX_API
+	bool "enable Linux kernel CEC framework support"
+	default y if BR2_arm || BR2_aarch64
+	depends on BR2_PACKAGE_LIBCEC
+	help
+	  enable modern Linux Kernel CEC Framework support
+
+	  This is needed to use CEC on the Raspberry Pi
+
 comment "libcec needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.7"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \
diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk
index 0e730503da..f7c5bce204 100644
--- a/package/libcec/libcec.mk
+++ b/package/libcec/libcec.mk
@@ -24,6 +24,12 @@ ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
 LIBCEC_DEPENDENCIES += xlib_libXrandr
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEC_LINUX_API),y)
+LIBCEC_CONF_OPTS += \
+	-DHAVE_RPI_API=0 \
+	-DHAVE_LINUX_API=1
+endif
+
 # Disable information about how libCEC is compiled.
 LIBCEC_CONF_OPTS += -DHAVE_GIT_BIN="" \
 	-DHAVE_WHOAMI_BIN="" \
-- 
2.54.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-29  2:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29  2:06 [Buildroot] [PATCH 1/1] package/libcec: Add option to use kernel framework Stefan Ott via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox