From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 01/10] package/wlroots: add hwdata and hwdata_pnp_ids as a dependency
Date: Fri, 22 Dec 2023 18:02:40 +0100 [thread overview]
Message-ID: <ZYXBME0BTWxAc9an@landeda> (raw)
In-Reply-To: <20231221153620.237439-1-adam.duskett@amarulasolutions.com>
Adam, All,
Thanks for the updated patch. You respun too fast, I did not have time
to further comment after Thomas' review of v3. So there it is.
On 2023-12-21 08:36 -0700, Adam Duskett spake thusly:
> As per backend/drm/meson.build:1-7
>
> hwdata = dependency('hwdata', required: false, native: true)
> if hwdata.found()
> hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir')
> pnp_ids = files(hwdata_dir / 'pnp.ids')
> else
> pnp_ids = files('/usr/share/hwdata/pnp.ids')
> endif
First, this code excerpt does not bring much in a commit log; a code
snippet on its own is not a substitute for a proper explanation for why
a change is needed in Buildroot (otherwise we would have all our commit
logs be just snippets of upstream code...)
> On a build in a fresh debian container with a minimal config
>
> BR2_x86_64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_PACKAGE_MESA3D=y
> BR2_PACKAGE_MESA3D_OSMESA_GALLIUM=y
> BR2_PACKAGE_MESA3D_OPENGL_EGL=y
> BR2_PACKAGE_MESA3D_OPENGL_ES=y
> BR2_PACKAGE_WLROOTS=y
>
> The build fails as neither hwdata nor the pnp.ids are found.
Thanks for the reproducer. :-) However, Thomas was also wondering why
this was never caught in our autobuilders. Do you have an idea why it
was never caught? Since the autobuilders did not help, we have no idea
when this started to occur, so we have no idea whether we need to
backport the fix. Having an explanation why the autobuilder did not
catch the issue will help decide whether this needs to be backported.
Second, hwdata does not provide a library or headers, just data files
that describe the VID/PID mappings to human-readable names; those are
supposed to be used at runtime to do the conversion (e.g. lspci or lsusb
do that).
And as you report a build failure, it means those are used at build
time, which is weird.
So, what does wlroots do?
In fact, the build scans the pnp.ids and generates a C file with a big
switch-case mapping all the PNP ids to their vendor string, and thus
hwdata is not needed on the target, but is needed at build time.
So, it means we end up with the hwdata on the target for nothing. The
default config will install about 2.1MiB, which is arguably not too much
if one builds a system with wlroots (the stack is already big). Still,
this is noticeable.
Of course, this is not your fault! :-) But it would have been good to
provide this info in the commit log, even as a terse sentence, to avoid
the maintainers trying to understand this (i.e. try to understand the
reason why the data files are needed at build time rather than are
runtime).
Third and finally, hwdata is not mandatory in wlroots; it is only
required for the DRM backend, so it should not be unconditional. Except
that in Buildroot, we do enable the DRM backend unconditionally, so
hwdata indeed becomes an unconditional dependency.
So yes, it does indeed take some time to come up with the underlying
reasons for why a change is needed, and to digest them into a commit
log. But if submitters don't do that work on their end, it means the
maintainers have do it, and that means even more time is spent reviewing
and replying to each patch, which makes the patch queue grow, and
ultimately makes everyone grumpy, submitters first.
Regards,
Yann E. MORIN.
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> v3 -> v4: Add a more comprehensive commit with a minimal defconfig.
>
> package/wlroots/Config.in | 2 ++
> package/wlroots/wlroots.mk | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in
> index fb23e9069c..7622a3033b 100644
> --- a/package/wlroots/Config.in
> +++ b/package/wlroots/Config.in
> @@ -16,6 +16,8 @@ config BR2_PACKAGE_WLROOTS
> depends on BR2_PACKAGE_HAS_LIBEGL
> depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> depends on BR2_PACKAGE_HAS_LIBGLES
> + select BR2_PACKAGE_HWDATA
> + select BR2_PACKAGE_HWDATA_PNP_IDS
> select BR2_PACKAGE_LIBDRM
> select BR2_PACKAGE_LIBINPUT
> select BR2_PACKAGE_LIBXKBCOMMON
> diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk
> index b478e57abb..bb5c8f497d 100644
> --- a/package/wlroots/wlroots.mk
> +++ b/package/wlroots/wlroots.mk
> @@ -13,6 +13,7 @@ WLROOTS_INSTALL_STAGING = YES
> WLROOTS_DEPENDENCIES = \
> host-pkgconf \
> host-wayland \
> + hwdata \
> libinput \
> libxkbcommon \
> libegl \
> --
> 2.43.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-12-22 17:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 15:36 [Buildroot] [PATCH v4 01/10] package/wlroots: add hwdata and hwdata_pnp_ids as a dependency Adam Duskett
2023-12-21 15:36 ` [Buildroot] [PATCH v4 02/10] package/dmenu-wayland: new package Adam Duskett
2023-12-24 18:55 ` Yann E. MORIN
2023-12-21 15:36 ` [Buildroot] [PATCH v4 03/10] package/foot: " Adam Duskett
2023-12-24 21:38 ` Yann E. MORIN
2023-12-21 15:36 ` [Buildroot] [PATCH v4 04/10] package/ncurses: install foot terminfo if foot is selected Adam Duskett
2023-12-24 21:49 ` Yann E. MORIN
2023-12-21 15:36 ` [Buildroot] [PATCH v4 05/10] package/sway: enable bash-completion support Adam Duskett
2023-12-24 22:25 ` Yann E. MORIN
2023-12-21 15:36 ` [Buildroot] [PATCH v4 06/10] package/sway: enable default-wallpaper support Adam Duskett
2023-12-21 15:36 ` [Buildroot] [PATCH v4 07/10] package/sway: enable swaybar support Adam Duskett
2023-12-21 15:36 ` [Buildroot] [PATCH v4 08/10] package/sway: enable swaybar tray support Adam Duskett
2023-12-21 15:36 ` [Buildroot] [PATCH v4 09/10] package/sway: enable swaynag support Adam Duskett
2023-12-21 15:36 ` [Buildroot] [PATCH v4 10/10] package/sway/Config.in: Add a help note about the default terminal Adam Duskett
2023-12-22 17:02 ` Yann E. MORIN [this message]
2023-12-23 14:45 ` [Buildroot] [PATCH v4 01/10] package/wlroots: add hwdata and hwdata_pnp_ids as a dependency Thomas Petazzoni via buildroot
2023-12-23 14:51 ` Thomas Petazzoni via buildroot
-- strict thread matches above, loose matches on Subject: below --
2023-12-21 15:35 Adam Duskett
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=ZYXBME0BTWxAc9an@landeda \
--to=yann.morin.1998@free.fr \
--cc=adam.duskett@amarulasolutions.com \
--cc=buildroot@buildroot.org \
/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