* [Buildroot] [PATCH] package: Add drm_info
@ 2026-03-12 11:12 Kory Maincent via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Kory Maincent via buildroot @ 2026-03-12 11:12 UTC (permalink / raw)
To: buildroot; +Cc: Louis Chauvet, Kory Maincent, thomas.petazzoni, Eric Le Bihan
drm_info is a small utility to dump info about DRM devices.
Link: https://gitlab.freedesktop.org/emersion/drm_info
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
package/Config.in | 1 +
...0001-meson.build-Fix-Buildroot-build.patch | 34 +++++++++++++++++++
package/drm_info/Config.in | 8 +++++
package/drm_info/drm_info.hash | 5 +++
package/drm_info/drm_info.mk | 15 ++++++++
5 files changed, 63 insertions(+)
create mode 100644 package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
create mode 100644 package/drm_info/Config.in
create mode 100644 package/drm_info/drm_info.hash
create mode 100644 package/drm_info/drm_info.mk
diff --git a/package/Config.in b/package/Config.in
index 83414b3e0b..f9f90ca8ea 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -307,6 +307,7 @@ menu "Graphic libraries and applications (graphic/text)"
comment "Graphic applications"
source "package/cage/Config.in"
source "package/cog/Config.in"
+ source "package/drm_info/Config.in"
source "package/flutter-packages/Config.in"
source "package/flutter-pi/Config.in"
source "package/foot/Config.in"
diff --git a/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
new file mode 100644
index 0000000000..b709ab8a1f
--- /dev/null
+++ b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
@@ -0,0 +1,34 @@
+From 785525a74878bdf688c5466d83e193e207abed6a Mon Sep 17 00:00:00 2001
+From: Kory Maincent <kory.maincent@bootlin.com>
+Date: Wed, 11 Mar 2026 19:03:46 +0100
+Subject: [PATCH] meson.build: Fix Buildroot build
+
+In cross compilation case pc_sysrootdir variable contains the sysroot path,
+but includedir from pkgconfig already contains the full absolute path
+(sysroot + /usr/include), so concatenating them double the sysroot prefix.
+
+The fix removes pc_sysrootdir + so includedir is used directly, which
+already points to the correct absolute path on the filesystem.
+
+Upstream: N/A
+Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 5b94552..5a7cd0a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -68,7 +68,7 @@ if libdrm.version().version_compare('<2.4.125')
+ elif libdrm.type_name() == 'internal'
+ fourcc_h = meson.current_source_dir() / 'subprojects/libdrm/include/drm/drm_fourcc.h'
+ else
+- fourcc_h = libdrm.get_variable(pkgconfig: 'pc_sysrootdir') + libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h'
++ fourcc_h = libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h'
+ endif
+
+ # The DRM_BUS_FAUX bus and its information is included in libdrm v2.4.127
+--
+2.43.0
+
diff --git a/package/drm_info/Config.in b/package/drm_info/Config.in
new file mode 100644
index 0000000000..a664485d03
--- /dev/null
+++ b/package/drm_info/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_DRM_INFO
+ bool "drm_info"
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_JSON_C
+ help
+ Small utility to dump info about DRM devices.
+
+ https://gitlab.freedesktop.org/emersion/drm_info
diff --git a/package/drm_info/drm_info.hash b/package/drm_info/drm_info.hash
new file mode 100644
index 0000000000..21d104a251
--- /dev/null
+++ b/package/drm_info/drm_info.hash
@@ -0,0 +1,5 @@
+# Locally computed:
+sha256 b1000e95eb4f57cfe7819c5b8afd880ac07dde25d9c3839ec52e0aeadeb83234 drm_info-v2.9.0.tar.gz
+
+# Hash for license files:
+sha256 05a54b690d8851143a8b923cfe8ac48f49050f9d2166e7eb0c1d340242d7f46a LICENSE
diff --git a/package/drm_info/drm_info.mk b/package/drm_info/drm_info.mk
new file mode 100644
index 0000000000..dd2698247b
--- /dev/null
+++ b/package/drm_info/drm_info.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# drm_info
+#
+################################################################################
+
+DRM_INFO_VERSION = v2.9.0
+DRM_INFO_SITE = https://gitlab.freedesktop.org/emersion/drm_info/-/archive/$(DRM_INFO_VERSION)
+DRM_INFO_LICENSE = MIT
+DRM_INFO_LICENSE_FILES = LICENSE
+DRM_INFO_DEPENDENCIES = \
+ json-c \
+ libdrm
+
+$(eval $(meson-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package: Add drm_info
@ 2026-03-12 11:13 Kory Maincent via buildroot
2026-03-15 16:34 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Kory Maincent via buildroot @ 2026-03-12 11:13 UTC (permalink / raw)
To: buildroot; +Cc: Louis Chauvet, Kory Maincent, thomas.petazzoni, Eric Le Bihan
drm_info is a small utility to dump info about DRM devices.
Link: https://gitlab.freedesktop.org/emersion/drm_info
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
package/Config.in | 1 +
...0001-meson.build-Fix-Buildroot-build.patch | 34 +++++++++++++++++++
package/drm_info/Config.in | 8 +++++
package/drm_info/drm_info.hash | 5 +++
package/drm_info/drm_info.mk | 15 ++++++++
5 files changed, 63 insertions(+)
create mode 100644 package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
create mode 100644 package/drm_info/Config.in
create mode 100644 package/drm_info/drm_info.hash
create mode 100644 package/drm_info/drm_info.mk
diff --git a/package/Config.in b/package/Config.in
index 83414b3e0b..f9f90ca8ea 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -307,6 +307,7 @@ menu "Graphic libraries and applications (graphic/text)"
comment "Graphic applications"
source "package/cage/Config.in"
source "package/cog/Config.in"
+ source "package/drm_info/Config.in"
source "package/flutter-packages/Config.in"
source "package/flutter-pi/Config.in"
source "package/foot/Config.in"
diff --git a/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
new file mode 100644
index 0000000000..b709ab8a1f
--- /dev/null
+++ b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
@@ -0,0 +1,34 @@
+From 785525a74878bdf688c5466d83e193e207abed6a Mon Sep 17 00:00:00 2001
+From: Kory Maincent <kory.maincent@bootlin.com>
+Date: Wed, 11 Mar 2026 19:03:46 +0100
+Subject: [PATCH] meson.build: Fix Buildroot build
+
+In cross compilation case pc_sysrootdir variable contains the sysroot path,
+but includedir from pkgconfig already contains the full absolute path
+(sysroot + /usr/include), so concatenating them double the sysroot prefix.
+
+The fix removes pc_sysrootdir + so includedir is used directly, which
+already points to the correct absolute path on the filesystem.
+
+Upstream: N/A
+Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 5b94552..5a7cd0a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -68,7 +68,7 @@ if libdrm.version().version_compare('<2.4.125')
+ elif libdrm.type_name() == 'internal'
+ fourcc_h = meson.current_source_dir() / 'subprojects/libdrm/include/drm/drm_fourcc.h'
+ else
+- fourcc_h = libdrm.get_variable(pkgconfig: 'pc_sysrootdir') + libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h'
++ fourcc_h = libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h'
+ endif
+
+ # The DRM_BUS_FAUX bus and its information is included in libdrm v2.4.127
+--
+2.43.0
+
diff --git a/package/drm_info/Config.in b/package/drm_info/Config.in
new file mode 100644
index 0000000000..a664485d03
--- /dev/null
+++ b/package/drm_info/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_DRM_INFO
+ bool "drm_info"
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_JSON_C
+ help
+ Small utility to dump info about DRM devices.
+
+ https://gitlab.freedesktop.org/emersion/drm_info
diff --git a/package/drm_info/drm_info.hash b/package/drm_info/drm_info.hash
new file mode 100644
index 0000000000..21d104a251
--- /dev/null
+++ b/package/drm_info/drm_info.hash
@@ -0,0 +1,5 @@
+# Locally computed:
+sha256 b1000e95eb4f57cfe7819c5b8afd880ac07dde25d9c3839ec52e0aeadeb83234 drm_info-v2.9.0.tar.gz
+
+# Hash for license files:
+sha256 05a54b690d8851143a8b923cfe8ac48f49050f9d2166e7eb0c1d340242d7f46a LICENSE
diff --git a/package/drm_info/drm_info.mk b/package/drm_info/drm_info.mk
new file mode 100644
index 0000000000..dd2698247b
--- /dev/null
+++ b/package/drm_info/drm_info.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# drm_info
+#
+################################################################################
+
+DRM_INFO_VERSION = v2.9.0
+DRM_INFO_SITE = https://gitlab.freedesktop.org/emersion/drm_info/-/archive/$(DRM_INFO_VERSION)
+DRM_INFO_LICENSE = MIT
+DRM_INFO_LICENSE_FILES = LICENSE
+DRM_INFO_DEPENDENCIES = \
+ json-c \
+ libdrm
+
+$(eval $(meson-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] package: Add drm_info
2026-03-12 11:13 [Buildroot] [PATCH] package: Add drm_info Kory Maincent via buildroot
@ 2026-03-15 16:34 ` Thomas Petazzoni via buildroot
2026-03-16 10:29 ` Kory Maincent via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-03-15 16:34 UTC (permalink / raw)
To: Kory Maincent; +Cc: buildroot, Louis Chauvet, Eric Le Bihan
Hello Kory,
Thanks for the patch.
The commit title should be:
package/drm-info: new package
On Thu, Mar 12, 2026 at 12:13:30PM +0100, Kory Maincent via buildroot wrote:
> drm_info is a small utility to dump info about DRM devices.
>
> Link: https://gitlab.freedesktop.org/emersion/drm_info
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> package/Config.in | 1 +
> ...0001-meson.build-Fix-Buildroot-build.patch | 34 +++++++++++++++++++
> package/drm_info/Config.in | 8 +++++
> package/drm_info/drm_info.hash | 5 +++
> package/drm_info/drm_info.mk | 15 ++++++++
> 5 files changed, 63 insertions(+)
The package should be named drm-info, not drm_info.
Also, please add an entry in the DEVELOPERS file.
> diff --git a/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
> new file mode 100644
> index 0000000000..b709ab8a1f
> --- /dev/null
> +++ b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
> @@ -0,0 +1,34 @@
> +From 785525a74878bdf688c5466d83e193e207abed6a Mon Sep 17 00:00:00 2001
> +From: Kory Maincent <kory.maincent@bootlin.com>
> +Date: Wed, 11 Mar 2026 19:03:46 +0100
> +Subject: [PATCH] meson.build: Fix Buildroot build
> +
> +In cross compilation case pc_sysrootdir variable contains the sysroot path,
> +but includedir from pkgconfig already contains the full absolute path
> +(sysroot + /usr/include), so concatenating them double the sysroot prefix.
> +
> +The fix removes pc_sysrootdir + so includedir is used directly, which
> +already points to the correct absolute path on the filesystem.
> +
> +Upstream: N/A
Clearly doing cross-compilation properly with meson is possible. So an
upstreamable patch must be possible for this. I think using
pc_sysrootdir here is incorrect, but I haven't checked thoroughly. But
in any case, this is not a "fix Buildroot build" patch, as this issue
is unrelated to Buildroot, any other cross-compilation scenario would
encounter the same issue. This means a patch must be submitted
upstream.
> diff --git a/package/drm_info/Config.in b/package/drm_info/Config.in
> new file mode 100644
> index 0000000000..a664485d03
> --- /dev/null
> +++ b/package/drm_info/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_DRM_INFO
> + bool "drm_info"
depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
must be added here.
> + select BR2_PACKAGE_LIBDRM
> + select BR2_PACKAGE_JSON_C
> + help
> + Small utility to dump info about DRM devices.
> +
> + https://gitlab.freedesktop.org/emersion/drm_info
And:
comment "drm-info needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
> diff --git a/package/drm_info/drm_info.mk b/package/drm_info/drm_info.mk
> new file mode 100644
> index 0000000000..dd2698247b
> --- /dev/null
> +++ b/package/drm_info/drm_info.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# drm_info
drm-info
> +#
> +################################################################################
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] package: Add drm_info
2026-03-15 16:34 ` Thomas Petazzoni via buildroot
@ 2026-03-16 10:29 ` Kory Maincent via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Kory Maincent via buildroot @ 2026-03-16 10:29 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Louis Chauvet, Eric Le Bihan
On Sun, 15 Mar 2026 17:34:38 +0100
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> Hello Kory,
>
> Thanks for the patch.
>
> The commit title should be:
>
> package/drm-info: new package
>
> On Thu, Mar 12, 2026 at 12:13:30PM +0100, Kory Maincent via buildroot wrote:
> > drm_info is a small utility to dump info about DRM devices.
> >
> > Link: https://gitlab.freedesktop.org/emersion/drm_info
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> > package/Config.in | 1 +
> > ...0001-meson.build-Fix-Buildroot-build.patch | 34 +++++++++++++++++++
> > package/drm_info/Config.in | 8 +++++
> > package/drm_info/drm_info.hash | 5 +++
> > package/drm_info/drm_info.mk | 15 ++++++++
> > 5 files changed, 63 insertions(+)
>
> The package should be named drm-info, not drm_info.
>
> Also, please add an entry in the DEVELOPERS file.
>
> > diff --git a/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
> > b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch new file mode
> > 100644 index 0000000000..b709ab8a1f
> > --- /dev/null
> > +++ b/package/drm_info/0001-meson.build-Fix-Buildroot-build.patch
> > @@ -0,0 +1,34 @@
> > +From 785525a74878bdf688c5466d83e193e207abed6a Mon Sep 17 00:00:00 2001
> > +From: Kory Maincent <kory.maincent@bootlin.com>
> > +Date: Wed, 11 Mar 2026 19:03:46 +0100
> > +Subject: [PATCH] meson.build: Fix Buildroot build
> > +
> > +In cross compilation case pc_sysrootdir variable contains the sysroot path,
> > +but includedir from pkgconfig already contains the full absolute path
> > +(sysroot + /usr/include), so concatenating them double the sysroot prefix.
> > +
> > +The fix removes pc_sysrootdir + so includedir is used directly, which
> > +already points to the correct absolute path on the filesystem.
> > +
> > +Upstream: N/A
>
> Clearly doing cross-compilation properly with meson is possible. So an
> upstreamable patch must be possible for this. I think using
> pc_sysrootdir here is incorrect, but I haven't checked thoroughly. But
> in any case, this is not a "fix Buildroot build" patch, as this issue
> is unrelated to Buildroot, any other cross-compilation scenario would
> encounter the same issue. This means a patch must be submitted
> upstream.
I first wanted to send this patch upsteam but a specific patch added the
pc_sysrootdir part, so as I am not a meson expert I supposed there was a
valuable reason for that.
cde9414 Find drm_fourcc.h in sysroot
When PKG_CONFIG_SYSROOT_DIR is set, the pkg-config variable `includedir`
only contains the path inside the sysroot. To find the actual file,
prepend the sysroot (defaults to `/`).
I will take a deeper look at it.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-16 10:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 11:13 [Buildroot] [PATCH] package: Add drm_info Kory Maincent via buildroot
2026-03-15 16:34 ` Thomas Petazzoni via buildroot
2026-03-16 10:29 ` Kory Maincent via buildroot
-- strict thread matches above, loose matches on Subject: below --
2026-03-12 11:12 Kory Maincent via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.