From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/4] package/vkmark: add vmkark benchmarking tool
Date: Fri, 23 Aug 2024 19:26:51 +0200 [thread overview]
Message-ID: <20240823192651.13bebd6d@windsurf> (raw)
In-Reply-To: <20240822130220.4135741-3-alex.bennee@linaro.org>
Hello Alex,
Thanks for this patch! See below for some comments.
On Thu, 22 Aug 2024 14:02:18 +0100
Alex Bennée <alex.bennee@linaro.org> wrote:
> We build from the current master as we need fairly upto date bits for
> cross compile support.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> package/Config.in | 1 +
> package/vkmark/Config.in | 39 ++++++++++++++++++++++++++++++++++++++
> package/vkmark/vkmark.hash | 3 +++
> package/vkmark/vkmark.mk | 28 +++++++++++++++++++++++++++
> 4 files changed, 71 insertions(+)
This new package needs an entry in the DEVELOPERS file.
> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
> new file mode 100644
> index 0000000000..15d8e380ed
> --- /dev/null
> +++ b/package/vkmark/Config.in
> @@ -0,0 +1,39 @@
> +config BR2_PACKAGE_VKMARK_FLAVOR_ANY
> + bool
> +
> +config BR2_PACKAGE_VKMARK_FLAVOR_KMS
> + bool
> + default y
> + depends on BR2_PACKAGE_HAS_LIBGBM
> + select BR2_PACKAGE_LIBDRM
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
Indentation issue.
But more importantly, this option that you've added means that *ALL*
Buildroot configurations now have BR2_PACKAGE_LIBDRM forcefully
selected. Indeed, BR2_PACKAGE_VKMARK_FLAVOR_KMS is a blind option that
is default y (so always enabled) and it selects BR2_PACKAGE_LIBDRM.
> +config BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> + bool
> + default n
"default n" is useless, as an option is disabled by default.
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
This cannot have any impact, because BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
is never enabled by anything.
> +config BR2_PACKAGE_VKMARK_FLAVOR_X11
> + bool
> + default n
Same comment as above.
> + select BR2_PACKAGE_LIBXCB
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
Same comment as above: these selects are no-ops, as
BR2_PACKAGE_VKMARK_FLAVOR_X11 is never going to be "enabled", as it's a
blind option that nothing selects/enables.
If you want to do something like you did, you need to do something like
this:
config BR2_PACKAGE_VKMARK_FLAVOR_ANY
bool
config BR2_PACKAGE_VKMARK_FLAVOR_KMS
bool
default y if BR2_PACKAGE_HAS_LIBGBM
select BR2_PACKAGE_VKMARK_FLAVOR_ANY
config BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
bool
default y if BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_VKMARK_FLAVOR_ANY
config BR2_PACKAGE_VKMARK_FLAVOR_X11
bool
default y if BR2_PACKAGE_XORG7
select BR2_PACKAGE_VKMARK_FLAVOR_ANY
> +config BR2_PACKAGE_VKMARK
> + bool "vkmark"
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
> + depends on BR2_PACKAGE_VKMARK_FLAVOR_ANY
> + select BR2_PACKAGE_VULKAN_HEADERS
> + select BR2_PACKAGE_VULKAN_LOADER
You need to replicate those dependencies:
depends on !BR2_STATIC_LIBS # vulkan-loader
depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
> + select BR2_PACKAGE_GLM
> + select BR2_PACKAGE_ASSIMP
And also:
depends on BR2_USE_WCHAR # assimp
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
and perhaps for C++ you need to:
depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_VKMARK_FLAVOR_KMS
> + help
> + vmmark is an Vulkan GPU benchmark.
> +
> + https://github.com/vkmark/vkmark
> +
> +comment "vkmark needs a toolchain w/ C++, dynamic library, threads"
> + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HAS_THREADS
Update this comment to reflect all the dependencies above. Also, only
show the comment if BR2_PACKAGE_VKMARK_FLAVOR_ANY is true.
> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
> new file mode 100644
> index 0000000000..494d0c4808
> --- /dev/null
> +++ b/package/vkmark/vkmark.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256 9f106a67ce1e2aa4140bbf9325cc5837157d64f945534bc9e57286d690b08346 vkmark-2017.08.tar.gz
Hash not needed.
> +sha256 d08143e8828d5b9ed005cb6dcef4d88a49df0ac4c9e1356ace739b449c165f54 vkmark-ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15.tar.gz
We need the hash of the license file.
> diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
> new file mode 100644
> index 0000000000..19d796a9b0
> --- /dev/null
> +++ b/package/vkmark/vkmark.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# vkmark
> +#
> +################################################################################
> +
> +VKMARK_VERSION = ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15
> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
> +VKMARK_LICENSE = LGPL-2.1
> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
> +VKMARK_DEPENDENCIES = host-pkgconf vulkan-headers vulkan-loader glm
No build dependency on assimp? Then why do you select it?
> +ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_KMS),y)
> +VKMARK_DEPENDENCIES += libdrm libgbm
> +VKMARK_CONF_OPTS += -Dkms=true
else
VKMARK_CONF_OPTS += -Dkms=false
> +endif
> +
> +ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND),y)
> +VKMARK_DEPENDENCIES += wayland wayland-protocols
> +VKMARK_CONF_OPTS += -Dwayland=true
else
VKMARK_CONF_OPTS += -Dwayland=false
> +endif
> +
> +ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_X11),y)
> +VKMARK_DEPENDENCIES += libxcb
> +VKMARK_CONF_OPTS += -Dxcb=true
else
VKMARK_CONF_OPTS += -Dxcb=false
> +endif
> +
> +$(eval $(meson-package))
--
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
next prev parent reply other threads:[~2024-08-23 17:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 13:02 [Buildroot] [PATCH 0/4] Update Mesa and enable vkmark Alex Bennée
2024-08-22 13:02 ` [Buildroot] [PATCH 1/4] package/mesa3d: add option to enable VIRTIO vulkan driver Alex Bennée
2024-08-22 13:02 ` [Buildroot] [PATCH 2/4] package/vkmark: add vmkark benchmarking tool Alex Bennée
2024-08-23 17:26 ` Thomas Petazzoni via buildroot [this message]
2024-08-22 13:02 ` [Buildroot] [PATCH 3/4] board/qemu: add post-build script to aarch64_virt_defconfig Alex Bennée
2024-08-23 17:27 ` Thomas Petazzoni via buildroot
2024-08-22 13:02 ` [Buildroot] [PATCH 4/4] package/mesa3d: bump to 24.2.0 Alex Bennée
2024-08-22 15:56 ` Yann E. MORIN
2024-08-22 16:58 ` Alex Bennée
2024-08-22 17:24 ` Yann E. MORIN
2024-08-22 19:41 ` Alex Bennée
2024-08-22 20:02 ` Yann E. MORIN
2024-08-22 17:25 ` [Buildroot] [PATCH 0/4] Update Mesa and enable vkmark Alex Bennée
[not found] ` <20240822130220.4135741-5-alex.bennee__3974.23927658878$1724331783$gmane$org@linaro.org>
2024-08-22 17:59 ` [Buildroot] [PATCH 4/4] package/mesa3d: bump to 24.2.0 Bernd Kuhls
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=20240823192651.13bebd6d@windsurf \
--to=buildroot@buildroot.org \
--cc=alex.bennee@linaro.org \
--cc=eric.le.bihan.dev@free.fr \
--cc=thomas.petazzoni@bootlin.com \
/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