Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Ott via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Bernd Kuhls <bernd@kuhls.net>, Stefan Ott <stefan@ott.net>
Subject: [Buildroot] [PATCH 1/1] package/libcec: Add option to use kernel framework
Date: Mon, 29 Jun 2026 04:06:36 +0200	[thread overview]
Message-ID: <20260629020636.4066911-1-stefan@ott.net> (raw)

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

                 reply	other threads:[~2026-06-29  2:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260629020636.4066911-1-stefan@ott.net \
    --to=buildroot@buildroot.org \
    --cc=bernd@kuhls.net \
    --cc=stefan@ott.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox