* [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-05-31 22:40 ` Julien Olivain
2025-06-12 20:04 ` Arnout Vandecappelle via buildroot
2025-03-03 16:15 ` [Buildroot] [PATCH v4 2/6] package/vulkan-sdk: new package Alex Bennée
` (4 subsequent siblings)
5 siblings, 2 replies; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett
The aarch64 virt platform doesn't have any default VGA devices so we
don't need to configure them here.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
support/testing/tests/package/test_flutter.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
index e4040ca7dc..19406b7cb1 100644
--- a/support/testing/tests/package/test_flutter.py
+++ b/support/testing/tests/package/test_flutter.py
@@ -48,8 +48,6 @@ class TestFlutter(infra.basetest.BRTest, GraphicsBase):
"-cpu", "cortex-a57",
"-m", "512M",
"-smp", "4",
- "-vga", "std",
- "-vnc", "none",
"-drive", f"file={img},if=virtio,format=raw"])
self.emulator.login()
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation
2025-03-03 16:15 ` [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation Alex Bennée
@ 2025-05-31 22:40 ` Julien Olivain
2025-06-12 20:04 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 19+ messages in thread
From: Julien Olivain @ 2025-05-31 22:40 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Adam Duskett
On 03/03/2025 17:15, Alex Bennée wrote:
> The aarch64 virt platform doesn't have any default VGA devices so we
> don't need to configure them here.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation
2025-03-03 16:15 ` [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation Alex Bennée
2025-05-31 22:40 ` Julien Olivain
@ 2025-06-12 20:04 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 19+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-06-12 20:04 UTC (permalink / raw)
To: Alex Bennée, buildroot; +Cc: Adam Duskett
On 03/03/2025 17:15, Alex Bennée wrote:
> The aarch64 virt platform doesn't have any default VGA devices so we
> don't need to configure them here.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
> support/testing/tests/package/test_flutter.py | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
> index e4040ca7dc..19406b7cb1 100644
> --- a/support/testing/tests/package/test_flutter.py
> +++ b/support/testing/tests/package/test_flutter.py
> @@ -48,8 +48,6 @@ class TestFlutter(infra.basetest.BRTest, GraphicsBase):
> "-cpu", "cortex-a57",
> "-m", "512M",
> "-smp", "4",
> - "-vga", "std",
> - "-vnc", "none",
> "-drive", f"file={img},if=virtio,format=raw"])
> self.emulator.login()
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH v4 2/6] package/vulkan-sdk: new package
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 3/6] package/vulkan-[headers|loader|tools]: bump to 1.4.307 release Alex Bennée
` (3 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot
The principle component of this is the new volk meta-loader which is
required for more recent versions of vulkan-tools.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
package/Config.in | 1 +
package/vulkan-sdk/Config.in | 8 ++++++++
package/vulkan-sdk/vulkan-sdk.hash | 3 +++
package/vulkan-sdk/vulkan-sdk.mk | 18 ++++++++++++++++++
4 files changed, 30 insertions(+)
create mode 100644 package/vulkan-sdk/Config.in
create mode 100644 package/vulkan-sdk/vulkan-sdk.hash
create mode 100644 package/vulkan-sdk/vulkan-sdk.mk
diff --git a/package/Config.in b/package/Config.in
index aa025d9024..30ba7c206a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -374,6 +374,7 @@ comment "Graphic libraries"
source "package/tk/Config.in"
source "package/vulkan-headers/Config.in"
source "package/vulkan-loader/Config.in"
+ source "package/vulkan-sdk/Config.in"
source "package/vulkan-tools/Config.in"
comment "Other GUIs"
diff --git a/package/vulkan-sdk/Config.in b/package/vulkan-sdk/Config.in
new file mode 100644
index 0000000000..05bda237bb
--- /dev/null
+++ b/package/vulkan-sdk/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_VULKAN_SDK
+ bool "vulkan-sdk"
+ select BR2_PACKAGE_VULKAN_HEADERS
+
+ help
+ The Vulkan meta-loader
+
+ https://github.com/zeux/volk
diff --git a/package/vulkan-sdk/vulkan-sdk.hash b/package/vulkan-sdk/vulkan-sdk.hash
new file mode 100644
index 0000000000..5106e53527
--- /dev/null
+++ b/package/vulkan-sdk/vulkan-sdk.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 ab3d4a8ccaeb32652259cdd008399504a41792675b0421d90b67729ee274746f 1.4.304.tar.gz
+sha256 33c831f76b79501665e66c23ac8f876020457c216d44526a8f747da897999b35 LICENSE.md
diff --git a/package/vulkan-sdk/vulkan-sdk.mk b/package/vulkan-sdk/vulkan-sdk.mk
new file mode 100644
index 0000000000..d6ad0819c7
--- /dev/null
+++ b/package/vulkan-sdk/vulkan-sdk.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# vulkan-sdk
+#
+################################################################################
+
+VULKAN_SDK_VERSION = 1.4.304
+VULKAN_SDK_SITE = https://github.com/zeux/volk/archive
+VULKAN_SDK_SOURCE= $(VULKAN_SDK_VERSION).tar.gz
+VULKAN_SDK_LICENSE = MIT
+VULKAN_SDK_LICENSE_FILES = LICENSE.md
+VULKAN_SDK_INSTALL_STAGING = YES
+
+VULKAN_SDK_DEPENDENCIES = vulkan-headers
+
+VULKAN_SDK_CONF_OPTS += -DVOLK_INSTALL=ON
+
+$(eval $(cmake-package))
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH v4 3/6] package/vulkan-[headers|loader|tools]: bump to 1.4.307 release
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 1/6] testing: drop unneeded vga/vnc stanzas from QEMU invocation Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 2/6] package/vulkan-sdk: new package Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed Alex Bennée
` (2 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot
Update to the current release. We now need the recently added
vulkan-sdk to have access to the volk loader.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- fix up comment, properly select the SDK package
---
| 2 +-
| 2 +-
package/vulkan-loader/vulkan-loader.hash | 2 +-
package/vulkan-tools/Config.in | 3 ++-
package/vulkan-tools/vulkan-tools.hash | 2 +-
package/vulkan-tools/vulkan-tools.mk | 3 ++-
6 files changed, 8 insertions(+), 6 deletions(-)
--git a/package/vulkan-headers/vulkan-headers.hash b/package/vulkan-headers/vulkan-headers.hash
index b38bfcff47..c38fb2c402 100644
--- a/package/vulkan-headers/vulkan-headers.hash
+++ b/package/vulkan-headers/vulkan-headers.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 317e467a5fb2eaa6a18b984ec70fdbfaccd93595a3e6f4bcceca7d3fab280505 vulkan-headers-1.3.262.tar.gz
+sha256 6e8445bc12c1e2702c27f4f02d1a057fb83f40cc56c6a8e4583141d4eaad90d4 vulkan-headers-1.4.307.tar.gz
sha256 ac24e5ea920e4318e4d02c4086ae51f53cfb03feed06c18df1019e7ada1ec7bc LICENSE.md
--git a/package/vulkan-headers/vulkan-headers.mk b/package/vulkan-headers/vulkan-headers.mk
index 20b248364d..b889de690e 100644
--- a/package/vulkan-headers/vulkan-headers.mk
+++ b/package/vulkan-headers/vulkan-headers.mk
@@ -6,7 +6,7 @@
# Note: changing this version will also affect vulkan-loader and
# vulkan-tools, so please update those packages as well.
-VULKAN_HEADERS_VERSION = 1.3.262
+VULKAN_HEADERS_VERSION = 1.4.307
VULKAN_HEADERS_SITE = $(call github,KhronosGroup,Vulkan-Headers,v$(VULKAN_HEADERS_VERSION))
VULKAN_HEADERS_LICENSE = Apache-2.0, MIT
VULKAN_HEADERS_LICENSE_FILES = LICENSE.md
diff --git a/package/vulkan-loader/vulkan-loader.hash b/package/vulkan-loader/vulkan-loader.hash
index e09ecda8a9..72271b7450 100644
--- a/package/vulkan-loader/vulkan-loader.hash
+++ b/package/vulkan-loader/vulkan-loader.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 3bbaa5ee64058a89949eb777de66ce94bfe3141892514172cfc9451c756802d5 vulkan-loader-1.3.262.tar.gz
+sha256 661f7b7d1536538420771372dd8050f2d224fcf3a023f31d66ea76d8af7b911e vulkan-loader-1.4.307.tar.gz
sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txt
diff --git a/package/vulkan-tools/Config.in b/package/vulkan-tools/Config.in
index 54fa539dab..bb0dce8282 100644
--- a/package/vulkan-tools/Config.in
+++ b/package/vulkan-tools/Config.in
@@ -6,12 +6,13 @@ config BR2_PACKAGE_VULKAN_TOOLS
depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
select BR2_PACKAGE_VULKAN_HEADERS
select BR2_PACKAGE_VULKAN_LOADER
+ select BR2_PACKAGE_VULKAN_SDK
help
The Khronos official Vulkan Tools and Utilities.
https://github.com/KhronosGroup/Vulkan-Tools
-comment "vulkan-tools needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.9"
+comment "vulkan-tools needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.9, vulkan-sdk"
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/vulkan-tools/vulkan-tools.hash b/package/vulkan-tools/vulkan-tools.hash
index 24c0697784..4c9bf59e08 100644
--- a/package/vulkan-tools/vulkan-tools.hash
+++ b/package/vulkan-tools/vulkan-tools.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 8c77d02694d0516ae2ba3f3718745647e87e788ef93faabb2e3674ff32608010 vulkan-tools-1.3.262.tar.gz
+sha256 4f0baeaf078c2a9d298b87d6d6ef85c3faf08f0f95b8a7d7d7ff243c6de2707c vulkan-tools-1.4.307.tar.gz
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
diff --git a/package/vulkan-tools/vulkan-tools.mk b/package/vulkan-tools/vulkan-tools.mk
index 9f5bf46b79..9deeda6086 100644
--- a/package/vulkan-tools/vulkan-tools.mk
+++ b/package/vulkan-tools/vulkan-tools.mk
@@ -11,7 +11,8 @@ VULKAN_TOOLS_LICENSE_FILES = LICENSE.txt
VULKAN_TOOLS_DEPENDENCIES = \
vulkan-headers \
- vulkan-loader
+ vulkan-loader \
+ vulkan-sdk
VULKAN_TOOLS_CONF_OPTS += \
-DBUILD_CUBE=OFF \
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
` (2 preceding siblings ...)
2025-03-03 16:15 ` [Buildroot] [PATCH v4 3/6] package/vulkan-[headers|loader|tools]: bump to 1.4.307 release Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-05-31 21:28 ` Julien Olivain
2025-03-03 16:15 ` [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool Alex Bennée
2025-03-03 16:15 ` [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package Alex Bennée
5 siblings, 1 reply; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot
This applies NO_SYSTEM_FROM_IMPORTED 1 to the vulkaninfo build to
prevent -isystem being passed, breaking the build with:
... aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15: fatal error: stdlib.h: No such file or directory
79 | #include_next <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
...aninfo-suppress-isystem-being-passed.patch | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
diff --git a/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
new file mode 100644
index 0000000000..26f8c4a55f
--- /dev/null
+++ b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
@@ -0,0 +1,57 @@
+From 932a9902f923aa0b6423ceee8fb0289665a1d157 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>
+Date: Fri, 14 Feb 2025 10:44:58 +0000
+Subject: [PATCH] vulkaninfo: suppress -isystem being passed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+During the process of updating vulkan-tools in buildroot I ran into
+the following build failure:
+
+ [ 50%] Building CXX object vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o
+ In file included from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/bits/stl_algo.h:71,
+ from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/algorithm:61,
+ from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/./vulkaninfo.h:31,
+ from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/generated/vulkaninfo.hpp:28,
+ from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/vulkaninfo.cpp:34:
+ /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15: fatal error: stdlib.h: No such file or directory
+ 79 | #include_next <stdlib.h>
+ | ^~~~~~~~~~
+ compilation terminated.
+ make[2]: *** [vulkaninfo/CMakeFiles/vulkaninfo.dir/build.make:76: vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o] Error 1
+ make[1]: *** [CMakeFiles/Makefile2:116: vulkaninfo/CMakeFiles/vulkaninfo.dir/all] Error 2
+ make: *** [Makefile:136: all] Error 2
+
+The underlying reason was -isystem being passed to the build which I
+think resets the include path for system includes. This might be a bug
+in cmake but from looking at the CMake source I found some examples
+that set: NO_SYSTEM_FROM_IMPORTED 1 as a target property which seems
+to do the job.
+
+This doesn't seem to affect the normal non-cross build although I
+wouldn't expect you need to pass -isystem anyway.
+
+Upstream: https://github.com/KhronosGroup/Vulkan-Tools/pull/1077
+Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
+---
+ vulkaninfo/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
+index 7e51bb2d..d4f7e1fa 100644
+--- a/vulkaninfo/CMakeLists.txt
++++ b/vulkaninfo/CMakeLists.txt
+@@ -22,7 +22,8 @@ set(VULKANINFO_NAME vulkaninfo)
+ set(GENERATED generated)
+
+ add_executable(vulkaninfo)
+-set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME ${VULKANINFO_NAME})
++set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME ${VULKANINFO_NAME}
++ NO_SYSTEM_FROM_IMPORTED 1)
+
+ target_sources(vulkaninfo PRIVATE vulkaninfo.cpp)
+
+--
+2.39.5
+
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed
2025-03-03 16:15 ` [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed Alex Bennée
@ 2025-05-31 21:28 ` Julien Olivain
2025-06-03 13:39 ` Alex Bennée
0 siblings, 1 reply; 19+ messages in thread
From: Julien Olivain @ 2025-05-31 21:28 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot
Hi Alex,
Thanks for the patch!
If the vulkan-tools package is known to be broken from its bump to
1.4.307 from the previous patch, this patch should preferably be
squashed with the bump. We are trying to keep each commit functional
to make git bisect easier.
Could you squash this patch with the previous one, please?
On 03/03/2025 17:15, Alex Bennée wrote:
> This applies NO_SYSTEM_FROM_IMPORTED 1 to the vulkaninfo build to
> prevent -isystem being passed, breaking the build with:
>
> ... aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15:
> fatal error: stdlib.h: No such file or directory
> 79 | #include_next <stdlib.h>
> | ^~~~~~~~~~
> compilation terminated.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> ...aninfo-suppress-isystem-being-passed.patch | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644
> package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
>
> diff --git
> a/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
> b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
> new file mode 100644
> index 0000000000..26f8c4a55f
> --- /dev/null
> +++
> b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
> @@ -0,0 +1,57 @@
> +From 932a9902f923aa0b6423ceee8fb0289665a1d157 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>
> +Date: Fri, 14 Feb 2025 10:44:58 +0000
> +Subject: [PATCH] vulkaninfo: suppress -isystem being passed
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +During the process of updating vulkan-tools in buildroot I ran into
> +the following build failure:
> +
> + [ 50%] Building CXX object
> vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o
> + In file included from
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/bits/stl_algo.h:71,
> + from
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/algorithm:61,
> + from
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/./vulkaninfo.h:31,
> + from
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/generated/vulkaninfo.hpp:28,
> + from
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/vulkaninfo.cpp:34:
> +
> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15:
> fatal error: stdlib.h: No such file or directory
> + 79 | #include_next <stdlib.h>
> + | ^~~~~~~~~~
> + compilation terminated.
> + make[2]: *** [vulkaninfo/CMakeFiles/vulkaninfo.dir/build.make:76:
> vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o] Error 1
> + make[1]: *** [CMakeFiles/Makefile2:116:
> vulkaninfo/CMakeFiles/vulkaninfo.dir/all] Error 2
> + make: *** [Makefile:136: all] Error 2
> +
> +The underlying reason was -isystem being passed to the build which I
> +think resets the include path for system includes. This might be a bug
> +in cmake but from looking at the CMake source I found some examples
> +that set: NO_SYSTEM_FROM_IMPORTED 1 as a target property which seems
> +to do the job.
> +
> +This doesn't seem to affect the normal non-cross build although I
> +wouldn't expect you need to pass -isystem anyway.
> +
> +Upstream: https://github.com/KhronosGroup/Vulkan-Tools/pull/1077
> +Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> +---
> + vulkaninfo/CMakeLists.txt | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
> +index 7e51bb2d..d4f7e1fa 100644
> +--- a/vulkaninfo/CMakeLists.txt
> ++++ b/vulkaninfo/CMakeLists.txt
> +@@ -22,7 +22,8 @@ set(VULKANINFO_NAME vulkaninfo)
> + set(GENERATED generated)
> +
> + add_executable(vulkaninfo)
> +-set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME
> ${VULKANINFO_NAME})
> ++set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME
> ${VULKANINFO_NAME}
> ++ NO_SYSTEM_FROM_IMPORTED
> 1)
> +
> + target_sources(vulkaninfo PRIVATE vulkaninfo.cpp)
> +
> +--
> +2.39.5
> +
> --
> 2.39.5
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed
2025-05-31 21:28 ` Julien Olivain
@ 2025-06-03 13:39 ` Alex Bennée
0 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2025-06-03 13:39 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot
Julien Olivain <ju.o@free.fr> writes:
> Hi Alex,
>
> Thanks for the patch!
>
> If the vulkan-tools package is known to be broken from its bump to
> 1.4.307 from the previous patch, this patch should preferably be
> squashed with the bump. We are trying to keep each commit functional
> to make git bisect easier.
>
> Could you squash this patch with the previous one, please?
After bumping the versions the build seems to work without the patch so
I can drop it now.
>
> On 03/03/2025 17:15, Alex Bennée wrote:
>> This applies NO_SYSTEM_FROM_IMPORTED 1 to the vulkaninfo build to
>> prevent -isystem being passed, breaking the build with:
>> ... aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15:
>> fatal error: stdlib.h: No such file or directory
>> 79 | #include_next <stdlib.h>
>> | ^~~~~~~~~~
>> compilation terminated.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> ...aninfo-suppress-isystem-being-passed.patch | 57 +++++++++++++++++++
>> 1 file changed, 57 insertions(+)
>> create mode 100644
>> package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
>> diff --git
>> a/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
>> b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
>> new file mode 100644
>> index 0000000000..26f8c4a55f
>> --- /dev/null
>> +++
>> b/package/vulkan-tools/0001-vulkaninfo-suppress-isystem-being-passed.patch
>> @@ -0,0 +1,57 @@
>> +From 932a9902f923aa0b6423ceee8fb0289665a1d157 Mon Sep 17 00:00:00 2001
>> +From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>
>> +Date: Fri, 14 Feb 2025 10:44:58 +0000
>> +Subject: [PATCH] vulkaninfo: suppress -isystem being passed
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>> +
>> +During the process of updating vulkan-tools in buildroot I ran into
>> +the following build failure:
>> +
>> + [ 50%] Building CXX object
>> vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o
>> + In file included from
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/bits/stl_algo.h:71,
>> + from
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/algorithm:61,
>> + from
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/./vulkaninfo.h:31,
>> + from
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/generated/vulkaninfo.hpp:28,
>> + from
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/vulkaninfo.cpp:34:
>> +
>> /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15:
>> fatal error: stdlib.h: No such file or directory
>> + 79 | #include_next <stdlib.h>
>> + | ^~~~~~~~~~
>> + compilation terminated.
>> + make[2]: *** [vulkaninfo/CMakeFiles/vulkaninfo.dir/build.make:76:
>> vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o] Error 1
>> + make[1]: *** [CMakeFiles/Makefile2:116:
>> vulkaninfo/CMakeFiles/vulkaninfo.dir/all] Error 2
>> + make: *** [Makefile:136: all] Error 2
>> +
>> +The underlying reason was -isystem being passed to the build which I
>> +think resets the include path for system includes. This might be a bug
>> +in cmake but from looking at the CMake source I found some examples
>> +that set: NO_SYSTEM_FROM_IMPORTED 1 as a target property which seems
>> +to do the job.
>> +
>> +This doesn't seem to affect the normal non-cross build although I
>> +wouldn't expect you need to pass -isystem anyway.
>> +
>> +Upstream: https://github.com/KhronosGroup/Vulkan-Tools/pull/1077
>> +Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> +---
>> + vulkaninfo/CMakeLists.txt | 3 ++-
>> + 1 file changed, 2 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
>> +index 7e51bb2d..d4f7e1fa 100644
>> +--- a/vulkaninfo/CMakeLists.txt
>> ++++ b/vulkaninfo/CMakeLists.txt
>> +@@ -22,7 +22,8 @@ set(VULKANINFO_NAME vulkaninfo)
>> + set(GENERATED generated)
>> +
>> + add_executable(vulkaninfo)
>> +-set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME
>> ${VULKANINFO_NAME})
>> ++set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME
>> ${VULKANINFO_NAME}
>> ++
>> NO_SYSTEM_FROM_IMPORTED 1)
>> +
>> + target_sources(vulkaninfo PRIVATE vulkaninfo.cpp)
>> +
>> +--
>> +2.39.5
>> +
>> --
>> 2.39.5
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
>
> Best regards,
>
> Julien.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
` (3 preceding siblings ...)
2025-03-03 16:15 ` [Buildroot] [PATCH v4 4/6] package/vulkan-tools: suppress isystem being passed Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-05-28 14:00 ` Heiko Thiery
2025-05-31 21:31 ` Julien Olivain
2025-03-03 16:15 ` [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package Alex Bennée
5 siblings, 2 replies; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot; +Cc: Eric Le Bihan
We build from the recent 2025.1 release although we need one commit
from master to better handle the missing KHR_display extension.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v4
- fix tab vs space damage
- don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
- make comments properly depend
- use the new 2025.01 release
- add sha256sum of COPYING-LGPL2.1
- alphabetic sort of initial VKMARK_DEPENDENCIES
- add vulkan error probing patch
v3
- add xcb-util-wm deps under X11
- add assimp directly to VKMARK_DEPENDENCIES
- drop duplicate BR2_INSTALL_LIBSTDCPP
- drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
v2
- fix whitespace errors in Config.in
- fix sorting of sources
- add DEVELOPERS entry
- rework KConfig based on review
- drop unused sha256sum
- explicitly enable/disable the backends
---
DEVELOPERS | 3 +
package/Config.in | 1 +
...-handle-Vulkan-errors-during-probing.patch | 77 +++++++++++++++++++
package/vkmark/Config.in | 48 ++++++++++++
package/vkmark/vkmark.hash | 3 +
package/vkmark/vkmark.mk | 34 ++++++++
6 files changed, 166 insertions(+)
create mode 100644 package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
create mode 100644 package/vkmark/Config.in
create mode 100644 package/vkmark/vkmark.hash
create mode 100644 package/vkmark/vkmark.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1f04dd2a1e..03af6cb426 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
N: Alexandre Belloni <alexandre.belloni@bootlin.com>
F: package/tz/
+N: Alex Bennée <alex.bennee@linaro.org>
+F: package/vkmark/
+
N: Alexandre Esse <alexandre.esse.dev@gmail.com>
F: package/kvazaar/
F: package/v4l2loopback/
diff --git a/package/Config.in b/package/Config.in
index 30ba7c206a..7b9615efe6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -338,6 +338,7 @@ comment "Graphic applications"
source "package/swaybg/Config.in"
source "package/tesseract-ocr/Config.in"
source "package/tinifier/Config.in"
+ source "package/vkmark/Config.in"
comment "Graphic libraries"
source "package/cegui/Config.in"
diff --git a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
new file mode 100644
index 0000000000..7e2e43a946
--- /dev/null
+++ b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
@@ -0,0 +1,77 @@
+From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 27 Feb 2025 14:33:49 +0200
+Subject: [PATCH] display: Properly handle Vulkan errors during probing
+
+The vk::createInstance() function throws an exception on error,
+so handle it instead of checking for a null return value.
+
+Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
+Upstream: https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
+
+---
+ src/ws/display_window_system_plugin.cpp | 39 ++++++++++++-------------
+ 1 file changed, 19 insertions(+), 20 deletions(-)
+
+diff --git a/src/ws/display_window_system_plugin.cpp b/src/ws/display_window_system_plugin.cpp
+index 523092b..fcbd949 100644
+--- a/src/ws/display_window_system_plugin.cpp
++++ b/src/ws/display_window_system_plugin.cpp
+@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const& options)
+ .setPApplicationInfo(&app_info)
+ .setEnabledExtensionCount(exts.size())
+ .setPpEnabledExtensionNames(exts.data());
+- auto vk_instance = ManagedResource<vk::Instance>{
+- vk::createInstance(create_info),
+- [] (auto& i) { i.destroy(); }};
+- if (!vk_instance.raw)
+- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
+-
+- auto physical_devices = vk_instance.raw.enumeratePhysicalDevices();
+- auto physical_device = options.use_device_with_uuid ?
+- std::find_if(
+- physical_devices.begin(), physical_devices.end(),
+- [&options] (auto pd) {
+- return static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
+- options.use_device_with_uuid; }) :
+- physical_devices.begin();
+-
+- if (physical_device != physical_devices.end())
++
++ try
+ {
+- try
++ auto vk_instance = ManagedResource<vk::Instance>{
++ vk::createInstance(create_info),
++ [] (auto& i) { i.destroy(); }};
++ auto physical_devices = vk_instance.raw.enumeratePhysicalDevices();
++ auto physical_device = options.use_device_with_uuid ?
++ std::find_if(
++ physical_devices.begin(), physical_devices.end(),
++ [&options] (auto pd) {
++ return static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
++ options.use_device_with_uuid; }) :
++ physical_devices.begin();
++
++ if (physical_device != physical_devices.end())
+ {
+ auto display_index = std::stoi(get_display_index_option(options));
+ if (display_index < 0)
+@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const& options)
+ DisplayNativeSystem::get_display_surface_create_info(*physical_device, display_index);
+ return VKMARK_WINDOW_SYSTEM_PROBE_OK + VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
+ }
+- catch (...)
+- {
+- }
+ }
++ catch (...)
++ {
++ }
++
+
+ return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
+ }
+--
+2.39.5
+
diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
new file mode 100644
index 0000000000..032eb47dc9
--- /dev/null
+++ b/package/vkmark/Config.in
@@ -0,0 +1,48 @@
+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_PACKAGE_VKMARK_FLAVOR_ANY
+ select BR2_PACKAGE_VULKAN_HEADERS
+ select BR2_PACKAGE_VULKAN_LOADER
+ depends on !BR2_STATIC_LIBS # vulkan-loader
+ depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
+ select BR2_PACKAGE_GLM
+ depends on BR2_USE_WCHAR # assimp
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
+ depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
+ select BR2_PACKAGE_ASSIMP
+ select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
+ select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
+ select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads, wchar, gcc >= 7, C++"
+ depends on BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_HAS_THREADS || \
+ !BR2_USE_WCHAR || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+ !BR2_INSTALL_LIBSTDCPP
+
+comment "vkmark needs a backend: gbm, wayland or xcb"
+ depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
new file mode 100644
index 0000000000..2650f4ccd4
--- /dev/null
+++ b/package/vkmark/vkmark.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc vkmark-2025.01.tar.gz
+sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING-LGPL2.1
diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
new file mode 100644
index 0000000000..7b721c6c99
--- /dev/null
+++ b/package/vkmark/vkmark.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# vkmark
+#
+################################################################################
+
+VKMARK_VERSION = 2025.01
+VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
+VKMARK_LICENSE = LGPL-2.1
+VKMARK_LICENSE_FILES = COPYING-LGPL2.1
+VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers vulkan-loader
+
+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 xcb-util-wm
+VKMARK_CONF_OPTS += -Dxcb=true
+else
+VKMARK_CONF_OPTS += -Dxcb=false
+endif
+
+$(eval $(meson-package))
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-03-03 16:15 ` [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool Alex Bennée
@ 2025-05-28 14:00 ` Heiko Thiery
2025-05-29 13:27 ` Heiko Thiery
2025-05-31 21:14 ` Julien Olivain
2025-05-31 21:31 ` Julien Olivain
1 sibling, 2 replies; 19+ messages in thread
From: Heiko Thiery @ 2025-05-28 14:00 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Eric Le Bihan
[-- Attachment #1.1: Type: text/plain, Size: 15891 bytes --]
Hi Alex,
thank you for these series.
Am Mo., 3. März 2025 um 17:16 Uhr schrieb Alex Bennée <
alex.bennee@linaro.org>:
> We build from the recent 2025.1 release although we need one commit
> from master to better handle the missing KHR_display extension.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v4
> - fix tab vs space damage
> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
> - make comments properly depend
> - use the new 2025.01 release
> - add sha256sum of COPYING-LGPL2.1
> - alphabetic sort of initial VKMARK_DEPENDENCIES
> - add vulkan error probing patch
> v3
> - add xcb-util-wm deps under X11
> - add assimp directly to VKMARK_DEPENDENCIES
> - drop duplicate BR2_INSTALL_LIBSTDCPP
> - drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> v2
> - fix whitespace errors in Config.in
> - fix sorting of sources
> - add DEVELOPERS entry
> - rework KConfig based on review
> - drop unused sha256sum
> - explicitly enable/disable the backends
> ---
> DEVELOPERS | 3 +
> package/Config.in | 1 +
> ...-handle-Vulkan-errors-during-probing.patch | 77 +++++++++++++++++++
> package/vkmark/Config.in | 48 ++++++++++++
> package/vkmark/vkmark.hash | 3 +
> package/vkmark/vkmark.mk | 34 ++++++++
> 6 files changed, 166 insertions(+)
> create mode 100644
> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> create mode 100644 package/vkmark/Config.in
> create mode 100644 package/vkmark/vkmark.hash
> create mode 100644 package/vkmark/vkmark.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 1f04dd2a1e..03af6cb426 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
> N: Alexandre Belloni <alexandre.belloni@bootlin.com>
> F: package/tz/
>
> +N: Alex Bennée <alex.bennee@linaro.org>
> +F: package/vkmark/
> +
> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
> F: package/kvazaar/
> F: package/v4l2loopback/
> diff --git a/package/Config.in b/package/Config.in
> index 30ba7c206a..7b9615efe6 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -338,6 +338,7 @@ comment "Graphic applications"
> source "package/swaybg/Config.in"
> source "package/tesseract-ocr/Config.in"
> source "package/tinifier/Config.in"
> + source "package/vkmark/Config.in"
>
> comment "Graphic libraries"
> source "package/cegui/Config.in"
> diff --git
> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> new file mode 100644
> index 0000000000..7e2e43a946
> --- /dev/null
> +++
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> @@ -0,0 +1,77 @@
> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00 2001
> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
> +Date: Thu, 27 Feb 2025 14:33:49 +0200
> +Subject: [PATCH] display: Properly handle Vulkan errors during probing
> +
> +The vk::createInstance() function throws an exception on error,
> +so handle it instead of checking for a null return value.
> +
> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
> +Upstream:
> https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
> +
> +---
> + src/ws/display_window_system_plugin.cpp | 39 ++++++++++++-------------
> + 1 file changed, 19 insertions(+), 20 deletions(-)
> +
> +diff --git a/src/ws/display_window_system_plugin.cpp
> b/src/ws/display_window_system_plugin.cpp
> +index 523092b..fcbd949 100644
> +--- a/src/ws/display_window_system_plugin.cpp
> ++++ b/src/ws/display_window_system_plugin.cpp
> +@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const& options)
> + .setPApplicationInfo(&app_info)
> + .setEnabledExtensionCount(exts.size())
> + .setPpEnabledExtensionNames(exts.data());
> +- auto vk_instance = ManagedResource<vk::Instance>{
> +- vk::createInstance(create_info),
> +- [] (auto& i) { i.destroy(); }};
> +- if (!vk_instance.raw)
> +- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> +-
> +- auto physical_devices = vk_instance.raw.enumeratePhysicalDevices();
> +- auto physical_device = options.use_device_with_uuid ?
> +- std::find_if(
> +- physical_devices.begin(), physical_devices.end(),
> +- [&options] (auto pd) {
> +- return
> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> +- options.use_device_with_uuid; }) :
> +- physical_devices.begin();
> +-
> +- if (physical_device != physical_devices.end())
> ++
> ++ try
> + {
> +- try
> ++ auto vk_instance = ManagedResource<vk::Instance>{
> ++ vk::createInstance(create_info),
> ++ [] (auto& i) { i.destroy(); }};
> ++ auto physical_devices =
> vk_instance.raw.enumeratePhysicalDevices();
> ++ auto physical_device = options.use_device_with_uuid ?
> ++ std::find_if(
> ++ physical_devices.begin(), physical_devices.end(),
> ++ [&options] (auto pd) {
> ++ return
> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> ++ options.use_device_with_uuid; }) :
> ++ physical_devices.begin();
> ++
> ++ if (physical_device != physical_devices.end())
> + {
> + auto display_index =
> std::stoi(get_display_index_option(options));
> + if (display_index < 0)
> +@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const& options)
> +
> DisplayNativeSystem::get_display_surface_create_info(*physical_device,
> display_index);
> + return VKMARK_WINDOW_SYSTEM_PROBE_OK +
> VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
> + }
> +- catch (...)
> +- {
> +- }
> + }
> ++ catch (...)
> ++ {
> ++ }
> ++
> +
> + return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> + }
> +--
> +2.39.5
> +
> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
> new file mode 100644
> index 0000000000..032eb47dc9
> --- /dev/null
> +++ b/package/vkmark/Config.in
> @@ -0,0 +1,48 @@
> +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_PACKAGE_VKMARK_FLAVOR_ANY
> + select BR2_PACKAGE_VULKAN_HEADERS
> + select BR2_PACKAGE_VULKAN_LOADER
> + depends on !BR2_STATIC_LIBS # vulkan-loader
> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
> + select BR2_PACKAGE_GLM
> + depends on BR2_USE_WCHAR # assimp
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp,
> vkmark
> + select BR2_PACKAGE_ASSIMP
> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if
> BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
> + select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads, wchar, gcc
> >= 7, C++"
> + depends on BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HAS_THREADS || \
> + !BR2_USE_WCHAR || \
> + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> + !BR2_INSTALL_LIBSTDCPP
> +
> +comment "vkmark needs a backend: gbm, wayland or xcb"
> + depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
> new file mode 100644
> index 0000000000..2650f4ccd4
> --- /dev/null
> +++ b/package/vkmark/vkmark.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc
> vkmark-2025.01.tar.gz
> +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
> COPYING-LGPL2.1
> diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
> new file mode 100644
> index 0000000000..7b721c6c99
> --- /dev/null
> +++ b/package/vkmark/vkmark.mk
> @@ -0,0 +1,34 @@
>
> +################################################################################
> +#
> +# vkmark
> +#
>
> +################################################################################
> +
> +VKMARK_VERSION = 2025.01
> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
> +VKMARK_LICENSE = LGPL-2.1
> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
> +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers vulkan-loader
> +
> +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 xcb-util-wm
> +VKMARK_CONF_OPTS += -Dxcb=true
> +else
> +VKMARK_CONF_OPTS += -Dxcb=false
> +endif
> +
> +$(eval $(meson-package))
> --
> 2.39.5
>
>
I tried to build vkmark but get this error:
>>> vkmark custom Configuring
rm -rf
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
mkdir -p
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
sed -e "/^\[binaries\]$/s:$::" -e "/^\[properties\]$/s:$::" -e
"s%@TARGET_CC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc%g"
-e "s%@TARGET_CXX@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++%g"
-e "s%@TARGET_AR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc-ar%g"
-e "s%@TARGET_FC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gfortran%g"
-e "s%@TARGET_STRIP@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-strip%g"
-e "s%@TARGET_ARCH@%aarch64%g" -e "s%@TARGET_CPU@%cortex-a53%g" -e
"s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%%g" -e
"s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE',
'-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0',
'-D_FORTIFY_SOURCE=1'%g" -e "s%@TARGET_LDFLAGS@%%g" -e
"s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE',
'-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0',
'-D_FORTIFY_SOURCE=1'%g" -e
"s%@BR2_CMAKE@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake%g"
-e "s%@PKGCONF_HOST_BINARY@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf%g"
-e "s%@HOST_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host%g" -e
"s%@STAGING_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/aarch64-buildroot-linux-gnu/sysroot%g"
-e "s%@STATIC@%false%g"
/srv/storage/hthiery/sources/sa67/buildroot/support/misc/
cross-compilation.conf.in >
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
PATH="/srv/storage/hthiery/sources/sa67/out-graphic/host/bin:/srv/storage/hthiery/sources/sa67/out-graphic/host/sbin:/home/hthiery/.local/bin:/home/hthiery/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
CC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++"
PYTHONNOUSERSITE=y
/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/meson setup
--prefix=/usr --libdir=lib --default-library=shared --buildtype=release
--cross-file=/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
-Db_pie=false -Db_staticpic=true -Dstrip=false
-Dbuild.pkg_config_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/pkgconfig
-Dbuild.cmake_prefix_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/cmake
-Dkms=true -Dwayland=false -Dxcb=false
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
The Meson build system
Version: 1.7.0
Source dir:
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom
Build dir:
/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/buildroot-build
Build type: cross build
Project name: vkmark
Project version: 2025.01
C compiler for the host machine:
/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
(gcc 14.2.0 "aarch64-linux-gcc.br_real (Buildroot
2021.11-12449-g1bef613319) 14.2.0")
C linker for the host machine:
/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
ld.bfd 2.42
C++ compiler for the host machine:
/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
(gcc 14.2.0 "aarch64-linux-g++.br_real (Buildroot
2021.11-12449-g1bef613319) 14.2.0")
C++ linker for the host machine:
/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
ld.bfd 2.42
C compiler for the build machine: /usr/bin/gcc (gcc 8.3.0 "gcc (Debian
8.3.0-6) 8.3.0")
C linker for the build machine: /usr/bin/gcc ld.bfd 2.31.1
C++ compiler for the build machine: /usr/bin/g++ (gcc 8.3.0 "g++ (Debian
8.3.0-6) 8.3.0")
C++ linker for the build machine: /usr/bin/g++ ld.bfd 2.31.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: cortex-a53
Target machine cpu family: aarch64
Target machine cpu: cortex-a53
Found pkg-config: YES
(/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkg-config) 2.3.0
Build-time dependency vulkan found: YES 1.4.307
Library dl found: YES
Found pkg-config: YES
(/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf) 2.3.0
Found CMake: /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake
(3.31.5)
Run-time dependency glm found: YES 1.0.0
Run-time dependency assimp found: YES 5.4.3
Run-time dependency xcb found: NO (tried pkgconfig and cmake)
Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-protocols found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)
Run-time dependency libdrm found: YES 2.4.124
Run-time dependency gbm found: YES 25.0.6
Program python3 found: YES
(/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/python3)
../out-graphic/build/vkmark-custom/src/meson.build:9:19: ERROR: File
/usr/share/vulkan/registry/vk.xml does not exist
Is the vk.xml file installed on your system in
/usr/share/vulkan/registry/vk.xml? I think the problem is related to the
vulkan.pc file that has a wrong prefix value set.
Can you confirm that?
---
Heiko
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>
[-- Attachment #1.2: Type: text/html, Size: 19253 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-05-28 14:00 ` Heiko Thiery
@ 2025-05-29 13:27 ` Heiko Thiery
2025-05-31 21:14 ` Julien Olivain
1 sibling, 0 replies; 19+ messages in thread
From: Heiko Thiery @ 2025-05-29 13:27 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Eric Le Bihan
[-- Attachment #1.1: Type: text/plain, Size: 16871 bytes --]
Hi Alex,
Am Mi., 28. Mai 2025 um 16:00 Uhr schrieb Heiko Thiery <
heiko.thiery@gmail.com>:
> Hi Alex,
>
> thank you for these series.
>
> Am Mo., 3. März 2025 um 17:16 Uhr schrieb Alex Bennée <
> alex.bennee@linaro.org>:
>
>> We build from the recent 2025.1 release although we need one commit
>> from master to better handle the missing KHR_display extension.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>
>> ---
>> v4
>> - fix tab vs space damage
>> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
>> - make comments properly depend
>> - use the new 2025.01 release
>> - add sha256sum of COPYING-LGPL2.1
>> - alphabetic sort of initial VKMARK_DEPENDENCIES
>> - add vulkan error probing patch
>> v3
>> - add xcb-util-wm deps under X11
>> - add assimp directly to VKMARK_DEPENDENCIES
>> - drop duplicate BR2_INSTALL_LIBSTDCPP
>> - drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
>> v2
>> - fix whitespace errors in Config.in
>> - fix sorting of sources
>> - add DEVELOPERS entry
>> - rework KConfig based on review
>> - drop unused sha256sum
>> - explicitly enable/disable the backends
>> ---
>> DEVELOPERS | 3 +
>> package/Config.in | 1 +
>> ...-handle-Vulkan-errors-during-probing.patch | 77 +++++++++++++++++++
>> package/vkmark/Config.in | 48 ++++++++++++
>> package/vkmark/vkmark.hash | 3 +
>> package/vkmark/vkmark.mk | 34 ++++++++
>> 6 files changed, 166 insertions(+)
>> create mode 100644
>> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> create mode 100644 package/vkmark/Config.in
>> create mode 100644 package/vkmark/vkmark.hash
>> create mode 100644 package/vkmark/vkmark.mk
>>
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index 1f04dd2a1e..03af6cb426 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
>> N: Alexandre Belloni <alexandre.belloni@bootlin.com>
>> F: package/tz/
>>
>> +N: Alex Bennée <alex.bennee@linaro.org>
>> +F: package/vkmark/
>> +
>> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
>> F: package/kvazaar/
>> F: package/v4l2loopback/
>> diff --git a/package/Config.in b/package/Config.in
>> index 30ba7c206a..7b9615efe6 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -338,6 +338,7 @@ comment "Graphic applications"
>> source "package/swaybg/Config.in"
>> source "package/tesseract-ocr/Config.in"
>> source "package/tinifier/Config.in"
>> + source "package/vkmark/Config.in"
>>
>> comment "Graphic libraries"
>> source "package/cegui/Config.in"
>> diff --git
>> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> new file mode 100644
>> index 0000000000..7e2e43a946
>> --- /dev/null
>> +++
>> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> @@ -0,0 +1,77 @@
>> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00 2001
>> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
>> +Date: Thu, 27 Feb 2025 14:33:49 +0200
>> +Subject: [PATCH] display: Properly handle Vulkan errors during probing
>> +
>> +The vk::createInstance() function throws an exception on error,
>> +so handle it instead of checking for a null return value.
>> +
>> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
>> +Upstream:
>> https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
>> +
>> +---
>> + src/ws/display_window_system_plugin.cpp | 39 ++++++++++++-------------
>> + 1 file changed, 19 insertions(+), 20 deletions(-)
>> +
>> +diff --git a/src/ws/display_window_system_plugin.cpp
>> b/src/ws/display_window_system_plugin.cpp
>> +index 523092b..fcbd949 100644
>> +--- a/src/ws/display_window_system_plugin.cpp
>> ++++ b/src/ws/display_window_system_plugin.cpp
>> +@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const&
>> options)
>> + .setPApplicationInfo(&app_info)
>> + .setEnabledExtensionCount(exts.size())
>> + .setPpEnabledExtensionNames(exts.data());
>> +- auto vk_instance = ManagedResource<vk::Instance>{
>> +- vk::createInstance(create_info),
>> +- [] (auto& i) { i.destroy(); }};
>> +- if (!vk_instance.raw)
>> +- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
>> +-
>> +- auto physical_devices = vk_instance.raw.enumeratePhysicalDevices();
>> +- auto physical_device = options.use_device_with_uuid ?
>> +- std::find_if(
>> +- physical_devices.begin(), physical_devices.end(),
>> +- [&options] (auto pd) {
>> +- return
>> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
>> +- options.use_device_with_uuid; }) :
>> +- physical_devices.begin();
>> +-
>> +- if (physical_device != physical_devices.end())
>> ++
>> ++ try
>> + {
>> +- try
>> ++ auto vk_instance = ManagedResource<vk::Instance>{
>> ++ vk::createInstance(create_info),
>> ++ [] (auto& i) { i.destroy(); }};
>> ++ auto physical_devices =
>> vk_instance.raw.enumeratePhysicalDevices();
>> ++ auto physical_device = options.use_device_with_uuid ?
>> ++ std::find_if(
>> ++ physical_devices.begin(), physical_devices.end(),
>> ++ [&options] (auto pd) {
>> ++ return
>> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
>> ++ options.use_device_with_uuid; }) :
>> ++ physical_devices.begin();
>> ++
>> ++ if (physical_device != physical_devices.end())
>> + {
>> + auto display_index =
>> std::stoi(get_display_index_option(options));
>> + if (display_index < 0)
>> +@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const&
>> options)
>> +
>> DisplayNativeSystem::get_display_surface_create_info(*physical_device,
>> display_index);
>> + return VKMARK_WINDOW_SYSTEM_PROBE_OK +
>> VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
>> + }
>> +- catch (...)
>> +- {
>> +- }
>> + }
>> ++ catch (...)
>> ++ {
>> ++ }
>> ++
>> +
>> + return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
>> + }
>> +--
>> +2.39.5
>> +
>> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
>> new file mode 100644
>> index 0000000000..032eb47dc9
>> --- /dev/null
>> +++ b/package/vkmark/Config.in
>> @@ -0,0 +1,48 @@
>> +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_PACKAGE_VKMARK_FLAVOR_ANY
>> + select BR2_PACKAGE_VULKAN_HEADERS
>> + select BR2_PACKAGE_VULKAN_LOADER
>> + depends on !BR2_STATIC_LIBS # vulkan-loader
>> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
>> + select BR2_PACKAGE_GLM
>> + depends on BR2_USE_WCHAR # assimp
>> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
>> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp,
>> vkmark
>> + select BR2_PACKAGE_ASSIMP
>> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if
>> BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
>> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
>> + select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads, wchar,
>> gcc >= 7, C++"
>> + depends on BR2_STATIC_LIBS || \
>> + !BR2_TOOLCHAIN_HAS_THREADS || \
>> + !BR2_USE_WCHAR || \
>> + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
>> + !BR2_INSTALL_LIBSTDCPP
>> +
>> +comment "vkmark needs a backend: gbm, wayland or xcb"
>> + depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
>> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
>> new file mode 100644
>> index 0000000000..2650f4ccd4
>> --- /dev/null
>> +++ b/package/vkmark/vkmark.hash
>> @@ -0,0 +1,3 @@
>> +# Locally computed
>> +sha256
>> 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc
>> vkmark-2025.01.tar.gz
>> +sha256
>> dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
>> COPYING-LGPL2.1
>> diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
>> new file mode 100644
>> index 0000000000..7b721c6c99
>> --- /dev/null
>> +++ b/package/vkmark/vkmark.mk
>> @@ -0,0 +1,34 @@
>>
>> +################################################################################
>> +#
>> +# vkmark
>> +#
>>
>> +################################################################################
>> +
>> +VKMARK_VERSION = 2025.01
>> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
>> +VKMARK_LICENSE = LGPL-2.1
>> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
>> +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers
>> vulkan-loader
>> +
>> +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 xcb-util-wm
>> +VKMARK_CONF_OPTS += -Dxcb=true
>> +else
>> +VKMARK_CONF_OPTS += -Dxcb=false
>> +endif
>> +
>> +$(eval $(meson-package))
>> --
>> 2.39.5
>>
>>
>
> I tried to build vkmark but get this error:
>
> >>> vkmark custom Configuring
> rm -rf
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> mkdir -p
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> sed -e "/^\[binaries\]$/s:$::" -e "/^\[properties\]$/s:$::" -e
> "s%@TARGET_CC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc%g"
> -e "s%@TARGET_CXX@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++%g"
> -e "s%@TARGET_AR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc-ar%g"
> -e "s%@TARGET_FC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gfortran%g"
> -e "s%@TARGET_STRIP@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-strip%g"
> -e "s%@TARGET_ARCH@%aarch64%g" -e "s%@TARGET_CPU@%cortex-a53%g" -e
> "s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%%g" -e
> "s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE',
> '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'%g" -e
> "s%@TARGET_LDFLAGS@%%g" -e "s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE',
> '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0',
> '-D_FORTIFY_SOURCE=1'%g" -e "s%@BR2_CMAKE@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake%g"
> -e "s%@PKGCONF_HOST_BINARY@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf%g"
> -e "s%@HOST_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host%g" -e
> "s%@STAGING_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/aarch64-buildroot-linux-gnu/sysroot%g"
> -e "s%@STATIC@%false%g"
> /srv/storage/hthiery/sources/sa67/buildroot/support/misc/
> cross-compilation.conf.in >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> PATH="/srv/storage/hthiery/sources/sa67/out-graphic/host/bin:/srv/storage/hthiery/sources/sa67/out-graphic/host/sbin:/home/hthiery/.local/bin:/home/hthiery/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
> CC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++"
> PYTHONNOUSERSITE=y
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/meson setup
> --prefix=/usr --libdir=lib --default-library=shared --buildtype=release
> --cross-file=/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> -Db_pie=false -Db_staticpic=true -Dstrip=false
> -Dbuild.pkg_config_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/pkgconfig
> -Dbuild.cmake_prefix_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/cmake
> -Dkms=true -Dwayland=false -Dxcb=false
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> The Meson build system
> Version: 1.7.0
> Source dir:
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom
> Build dir:
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/buildroot-build
> Build type: cross build
> Project name: vkmark
> Project version: 2025.01
> C compiler for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> (gcc 14.2.0 "aarch64-linux-gcc.br_real (Buildroot
> 2021.11-12449-g1bef613319) 14.2.0")
> C linker for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> ld.bfd 2.42
> C++ compiler for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> (gcc 14.2.0 "aarch64-linux-g++.br_real (Buildroot
> 2021.11-12449-g1bef613319) 14.2.0")
> C++ linker for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> ld.bfd 2.42
> C compiler for the build machine: /usr/bin/gcc (gcc 8.3.0 "gcc (Debian
> 8.3.0-6) 8.3.0")
> C linker for the build machine: /usr/bin/gcc ld.bfd 2.31.1
> C++ compiler for the build machine: /usr/bin/g++ (gcc 8.3.0 "g++ (Debian
> 8.3.0-6) 8.3.0")
> C++ linker for the build machine: /usr/bin/g++ ld.bfd 2.31.1
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
> Host machine cpu family: aarch64
> Host machine cpu: cortex-a53
> Target machine cpu family: aarch64
> Target machine cpu: cortex-a53
> Found pkg-config: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkg-config) 2.3.0
> Build-time dependency vulkan found: YES 1.4.307
> Library dl found: YES
> Found pkg-config: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf) 2.3.0
> Found CMake: /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake
> (3.31.5)
> Run-time dependency glm found: YES 1.0.0
> Run-time dependency assimp found: YES 5.4.3
> Run-time dependency xcb found: NO (tried pkgconfig and cmake)
> Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
> Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)
> Run-time dependency wayland-protocols found: NO (tried pkgconfig and cmake)
> Run-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)
> Run-time dependency libdrm found: YES 2.4.124
> Run-time dependency gbm found: YES 25.0.6
> Program python3 found: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/python3)
>
> ../out-graphic/build/vkmark-custom/src/meson.build:9:19: ERROR: File
> /usr/share/vulkan/registry/vk.xml does not exist
>
>
>
> Is the vk.xml file installed on your system in
> /usr/share/vulkan/registry/vk.xml? I think the problem is related to the
> vulkan.pc file that has a wrong prefix value set.
>
I did some more debugging on that failure and see that on another host it
builds just fine. It is not related to the vulkan.pc file, because on the
machine where the build successfully builds the content is the same. There
seems to be another problem. I did some more tests but cannot find the root
cause of the failure at the moment.
--
Heiko
>
> Can you confirm that?
>
> ---
> Heiko
>
>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
>>
>
[-- Attachment #1.2: Type: text/html, Size: 20295 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-05-28 14:00 ` Heiko Thiery
2025-05-29 13:27 ` Heiko Thiery
@ 2025-05-31 21:14 ` Julien Olivain
2025-06-02 8:19 ` Heiko Thiery
1 sibling, 1 reply; 19+ messages in thread
From: Julien Olivain @ 2025-05-31 21:14 UTC (permalink / raw)
To: Heiko Thiery; +Cc: Eric Le Bihan, buildroot
Hi Heiko, Alex,
On 28/05/2025 16:00, Heiko Thiery wrote:
> Hi Alex,
>
> thank you for these series.
>
> Am Mo., 3. März 2025 um 17:16 Uhr schrieb Alex Bennée
> <alex.bennee@linaro.org>:
>
>> We build from the recent 2025.1 release although we need one commit
>> from master to better handle the missing KHR_display extension.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>
>> ---
>> v4
>> - fix tab vs space damage
>> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
>> - make comments properly depend
>> - use the new 2025.01 release
>> - add sha256sum of COPYING-LGPL2.1
>> - alphabetic sort of initial VKMARK_DEPENDENCIES
>> - add vulkan error probing patch
>> v3
>> - add xcb-util-wm deps under X11
>> - add assimp directly to VKMARK_DEPENDENCIES
>> - drop duplicate BR2_INSTALL_LIBSTDCPP
>> - drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
>> v2
>> - fix whitespace errors in Config.in
>> - fix sorting of sources
>> - add DEVELOPERS entry
>> - rework KConfig based on review
>> - drop unused sha256sum
>> - explicitly enable/disable the backends
>> ---
>> DEVELOPERS | 3 +
>> package/Config.in | 1 +
>> ...-handle-Vulkan-errors-during-probing.patch | 77
>> +++++++++++++++++++
>> package/vkmark/Config.in | 48 ++++++++++++
>> package/vkmark/vkmark.hash | 3 +
>> package/vkmark/vkmark.mk [1] | 34 ++++++++
>> 6 files changed, 166 insertions(+)
>> create mode 100644
>>
> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> create mode 100644 package/vkmark/Config.in
>> create mode 100644 package/vkmark/vkmark.hash
>> create mode 100644 package/vkmark/vkmark.mk [1]
>>
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index 1f04dd2a1e..03af6cb426 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
>> N: Alexandre Belloni <alexandre.belloni@bootlin.com>
>> F: package/tz/
>>
>> +N: Alex Bennée <alex.bennee@linaro.org>
>> +F: package/vkmark/
>> +
>> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
>> F: package/kvazaar/
>> F: package/v4l2loopback/
>> diff --git a/package/Config.in b/package/Config.in
>> index 30ba7c206a..7b9615efe6 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -338,6 +338,7 @@ comment "Graphic applications"
>> source "package/swaybg/Config.in"
>> source "package/tesseract-ocr/Config.in"
>> source "package/tinifier/Config.in"
>> + source "package/vkmark/Config.in"
>>
>> comment "Graphic libraries"
>> source "package/cegui/Config.in"
>> diff --git
>>
> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>>
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> new file mode 100644
>> index 0000000000..7e2e43a946
>> --- /dev/null
>> +++
>>
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> @@ -0,0 +1,77 @@
>> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00
>> 2001
>> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
>> +Date: Thu, 27 Feb 2025 14:33:49 +0200
>> +Subject: [PATCH] display: Properly handle Vulkan errors during
>> probing
>> +
>> +The vk::createInstance() function throws an exception on error,
>> +so handle it instead of checking for a null return value.
>> +
>> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
>> +Upstream:
>>
> https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
>> +
>> +---
>> + src/ws/display_window_system_plugin.cpp | 39
>> ++++++++++++-------------
>> + 1 file changed, 19 insertions(+), 20 deletions(-)
>> +
>> +diff --git a/src/ws/display_window_system_plugin.cpp
>> b/src/ws/display_window_system_plugin.cpp
>> +index 523092b..fcbd949 100644
>> +--- a/src/ws/display_window_system_plugin.cpp
>> ++++ b/src/ws/display_window_system_plugin.cpp
>> +@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const&
>> options)
>> + .setPApplicationInfo(&app_info)
>> + .setEnabledExtensionCount(exts.size())
>> + .setPpEnabledExtensionNames(exts.data());
>> +- auto vk_instance = ManagedResource<vk::Instance>{
>> +- vk::createInstance(create_info),
>> +- [] (auto& i) { i.destroy(); }};
>> +- if (!vk_instance.raw)
>> +- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
>> +-
>> +- auto physical_devices =
>> vk_instance.raw.enumeratePhysicalDevices();
>> +- auto physical_device = options.use_device_with_uuid ?
>> +- std::find_if(
>> +- physical_devices.begin(), physical_devices.end(),
>> +- [&options] (auto pd) {
>> +- return
>> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
>> +- options.use_device_with_uuid; }) :
>> +- physical_devices.begin();
>> +-
>> +- if (physical_device != physical_devices.end())
>> ++
>> ++ try
>> + {
>> +- try
>> ++ auto vk_instance = ManagedResource<vk::Instance>{
>> ++ vk::createInstance(create_info),
>> ++ [] (auto& i) { i.destroy(); }};
>> ++ auto physical_devices =
>> vk_instance.raw.enumeratePhysicalDevices();
>> ++ auto physical_device = options.use_device_with_uuid ?
>> ++ std::find_if(
>> ++ physical_devices.begin(), physical_devices.end(),
>> ++ [&options] (auto pd) {
>> ++ return
>> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
>> ++ options.use_device_with_uuid; }) :
>> ++ physical_devices.begin();
>> ++
>> ++ if (physical_device != physical_devices.end())
>> + {
>> + auto display_index =
>> std::stoi(get_display_index_option(options));
>> + if (display_index < 0)
>> +@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const&
>> options)
>> +
>>
> DisplayNativeSystem::get_display_surface_create_info(*physical_device,
>> display_index);
>> + return VKMARK_WINDOW_SYSTEM_PROBE_OK +
>> VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
>> + }
>> +- catch (...)
>> +- {
>> +- }
>> + }
>> ++ catch (...)
>> ++ {
>> ++ }
>> ++
>> +
>> + return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
>> + }
>> +--
>> +2.39.5
>> +
>> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
>> new file mode 100644
>> index 0000000000..032eb47dc9
>> --- /dev/null
>> +++ b/package/vkmark/Config.in
>> @@ -0,0 +1,48 @@
>> +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_PACKAGE_VKMARK_FLAVOR_ANY
>> + select BR2_PACKAGE_VULKAN_HEADERS
>> + select BR2_PACKAGE_VULKAN_LOADER
>> + depends on !BR2_STATIC_LIBS # vulkan-loader
>> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
>> + select BR2_PACKAGE_GLM
>> + depends on BR2_USE_WCHAR # assimp
>> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
>> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm,
>> assimp, vkmark
>> + select BR2_PACKAGE_ASSIMP
>> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if
>> BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
>> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
>> + select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads,
>> wchar, gcc >= 7, C++"
>> + depends on BR2_STATIC_LIBS || \
>> + !BR2_TOOLCHAIN_HAS_THREADS || \
>> + !BR2_USE_WCHAR || \
>> + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
>> + !BR2_INSTALL_LIBSTDCPP
>> +
>> +comment "vkmark needs a backend: gbm, wayland or xcb"
>> + depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
>> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
>> new file mode 100644
>> index 0000000000..2650f4ccd4
>> --- /dev/null
>> +++ b/package/vkmark/vkmark.hash
>> @@ -0,0 +1,3 @@
>> +# Locally computed
>> +sha256
>> 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc
>> vkmark-2025.01.tar.gz
>> +sha256
>> dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
>> COPYING-LGPL2.1
>> diff --git a/package/vkmark/vkmark.mk [1] b/package/vkmark/vkmark.mk
>> [1]
>> new file mode 100644
>> index 0000000000..7b721c6c99
>> --- /dev/null
>> +++ b/package/vkmark/vkmark.mk [1]
>> @@ -0,0 +1,34 @@
>>
> +################################################################################
>> +#
>> +# vkmark
>> +#
>>
> +################################################################################
>> +
>> +VKMARK_VERSION = 2025.01
>> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
>> +VKMARK_LICENSE = LGPL-2.1
>> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
>> +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers
>> vulkan-loader
>> +
>> +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 xcb-util-wm
>> +VKMARK_CONF_OPTS += -Dxcb=true
>> +else
>> +VKMARK_CONF_OPTS += -Dxcb=false
>> +endif
>> +
>> +$(eval $(meson-package))
>> --
>> 2.39.5
>
> I tried to build vkmark but get this error:
>
>>>> vkmark custom Configuring
> rm -rf
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> mkdir -p
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> sed -e "/^\[binaries\]$/s:$::" -e "/^\[properties\]$/s:$::" -e
> "s%@TARGET_CC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc%g"
> -e
> "s%@TARGET_CXX@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++%g"
> -e
> "s%@TARGET_AR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc-ar%g"
> -e
> "s%@TARGET_FC@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gfortran%g"
> -e
> "s%@TARGET_STRIP@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-strip%g"
> -e "s%@TARGET_ARCH@%aarch64%g" -e "s%@TARGET_CPU@%cortex-a53%g" -e
> "s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%%g" -e
> "s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE',
> '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'%g" -e
> "s%@TARGET_LDFLAGS@%%g" -e "s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE',
> '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0',
> '-D_FORTIFY_SOURCE=1'%g" -e
> "s%@BR2_CMAKE@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake%g"
> -e
> "s%@PKGCONF_HOST_BINARY@%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf%g"
> -e "s%@HOST_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host%g"
> -e
> "s%@STAGING_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host/aarch64-buildroot-linux-gnu/sysroot%g"
> -e "s%@STATIC@%false%g"
> /srv/storage/hthiery/sources/sa67/buildroot/support/misc/cross-compilation.conf.in
> [2] >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> PATH="/srv/storage/hthiery/sources/sa67/out-graphic/host/bin:/srv/storage/hthiery/sources/sa67/out-graphic/host/sbin:/home/hthiery/.local/bin:/home/hthiery/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
> CC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++"
> PYTHONNOUSERSITE=y
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/meson setup
> --prefix=/usr --libdir=lib --default-library=shared
> --buildtype=release
> --cross-file=/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> -Db_pie=false -Db_staticpic=true -Dstrip=false
> -Dbuild.pkg_config_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/pkgconfig
> -Dbuild.cmake_prefix_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/cmake
> -Dkms=true -Dwayland=false -Dxcb=false
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> The Meson build system
> Version: 1.7.0
> Source dir:
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom
> Build dir:
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/buildroot-build
> Build type: cross build
> Project name: vkmark
> Project version: 2025.01
> C compiler for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> (gcc 14.2.0 "aarch64-linux-gcc.br_real (Buildroot
> 2021.11-12449-g1bef613319) 14.2.0")
> C linker for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> ld.bfd 2.42
> C++ compiler for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> (gcc 14.2.0 "aarch64-linux-g++.br_real (Buildroot
> 2021.11-12449-g1bef613319) 14.2.0")
> C++ linker for the host machine:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> ld.bfd 2.42
> C compiler for the build machine: /usr/bin/gcc (gcc 8.3.0 "gcc (Debian
> 8.3.0-6) 8.3.0")
> C linker for the build machine: /usr/bin/gcc ld.bfd 2.31.1
> C++ compiler for the build machine: /usr/bin/g++ (gcc 8.3.0 "g++
> (Debian 8.3.0-6) 8.3.0")
> C++ linker for the build machine: /usr/bin/g++ ld.bfd 2.31.1
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
> Host machine cpu family: aarch64
> Host machine cpu: cortex-a53
> Target machine cpu family: aarch64
> Target machine cpu: cortex-a53
> Found pkg-config: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkg-config)
> 2.3.0
> Build-time dependency vulkan found: YES 1.4.307
> Library dl found: YES
> Found pkg-config: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf) 2.3.0
> Found CMake:
> /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake (3.31.5)
> Run-time dependency glm found: YES 1.0.0
> Run-time dependency assimp found: YES 5.4.3
> Run-time dependency xcb found: NO (tried pkgconfig and cmake)
> Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
> Run-time dependency wayland-client found: NO (tried pkgconfig and
> cmake)
> Run-time dependency wayland-protocols found: NO (tried pkgconfig and
> cmake)
> Run-time dependency wayland-scanner found: NO (tried pkgconfig and
> cmake)
> Run-time dependency libdrm found: YES 2.4.124
> Run-time dependency gbm found: YES 25.0.6
> Program python3 found: YES
> (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/python3)
>
> ../out-graphic/build/vkmark-custom/src/meson.build:9:19: ERROR: File
> /usr/share/vulkan/registry/vk.xml does not exist
>
> Is the vk.xml file installed on your system in
> /usr/share/vulkan/registry/vk.xml? I think the problem is related to
> the vulkan.pc file that has a wrong prefix value set.
>
> Can you confirm that?
I can reproduce the issue. When using the Buildroot docker
reference image, with the commands:
utils/docker-run
cat >.config <<EOF
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_SYSTEM_DHCP="eth0"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="qemu_aarch64_virt_defconfig"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_VKMARK=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="600M"
# BR2_TARGET_ROOTFS_TAR is not set
EOF
make olddefconfig
make
It fails with:
output/build/vkmark-2025.01/src/meson.build:9:19: ERROR: File
/usr/share/vulkan/registry/vk.xml does not exist.
If I build directly on my host system, which has the vulkan headers
available at /usr/share/vulkan/registry/vk.xml, it works.
vkmark meson should take the file from:
$(STAGING_DIR)/usr/share/vulkan/registry/vk.xml
> ---
> Heiko
>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
>
>
> Links:
> ------
> [1] http://vkmark.mk
> [2] http://cross-compilation.conf.in
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-05-31 21:14 ` Julien Olivain
@ 2025-06-02 8:19 ` Heiko Thiery
0 siblings, 0 replies; 19+ messages in thread
From: Heiko Thiery @ 2025-06-02 8:19 UTC (permalink / raw)
To: Julien Olivain; +Cc: Eric Le Bihan, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 19361 bytes --]
Hi,
Am Sa., 31. Mai 2025 um 23:14 Uhr schrieb Julien Olivain <ju.o@free.fr>:
> Hi Heiko, Alex,
>
> On 28/05/2025 16:00, Heiko Thiery wrote:
> > Hi Alex,
> >
> > thank you for these series.
> >
> > Am Mo., 3. März 2025 um 17:16 Uhr schrieb Alex Bennée
> > <alex.bennee@linaro.org>:
> >
> >> We build from the recent 2025.1 release although we need one commit
> >> from master to better handle the missing KHR_display extension.
> >>
> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >>
> >> ---
> >> v4
> >> - fix tab vs space damage
> >> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
> >> - make comments properly depend
> >> - use the new 2025.01 release
> >> - add sha256sum of COPYING-LGPL2.1
> >> - alphabetic sort of initial VKMARK_DEPENDENCIES
> >> - add vulkan error probing patch
> >> v3
> >> - add xcb-util-wm deps under X11
> >> - add assimp directly to VKMARK_DEPENDENCIES
> >> - drop duplicate BR2_INSTALL_LIBSTDCPP
> >> - drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> >> v2
> >> - fix whitespace errors in Config.in
> >> - fix sorting of sources
> >> - add DEVELOPERS entry
> >> - rework KConfig based on review
> >> - drop unused sha256sum
> >> - explicitly enable/disable the backends
> >> ---
> >> DEVELOPERS | 3 +
> >> package/Config.in | 1 +
> >> ...-handle-Vulkan-errors-during-probing.patch | 77
> >> +++++++++++++++++++
> >> package/vkmark/Config.in | 48 ++++++++++++
> >> package/vkmark/vkmark.hash | 3 +
> >> package/vkmark/vkmark.mk [1] | 34 ++++++++
> >> 6 files changed, 166 insertions(+)
> >> create mode 100644
> >>
> >
> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> >> create mode 100644 package/vkmark/Config.in
> >> create mode 100644 package/vkmark/vkmark.hash
> >> create mode 100644 package/vkmark/vkmark.mk [1]
> >>
> >> diff --git a/DEVELOPERS b/DEVELOPERS
> >> index 1f04dd2a1e..03af6cb426 100644
> >> --- a/DEVELOPERS
> >> +++ b/DEVELOPERS
> >> @@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
> >> N: Alexandre Belloni <alexandre.belloni@bootlin.com>
> >> F: package/tz/
> >>
> >> +N: Alex Bennée <alex.bennee@linaro.org>
> >> +F: package/vkmark/
> >> +
> >> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
> >> F: package/kvazaar/
> >> F: package/v4l2loopback/
> >> diff --git a/package/Config.in b/package/Config.in
> >> index 30ba7c206a..7b9615efe6 100644
> >> --- a/package/Config.in
> >> +++ b/package/Config.in
> >> @@ -338,6 +338,7 @@ comment "Graphic applications"
> >> source "package/swaybg/Config.in"
> >> source "package/tesseract-ocr/Config.in"
> >> source "package/tinifier/Config.in"
> >> + source "package/vkmark/Config.in"
> >>
> >> comment "Graphic libraries"
> >> source "package/cegui/Config.in"
> >> diff --git
> >>
> >
> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> >>
> >
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> >> new file mode 100644
> >> index 0000000000..7e2e43a946
> >> --- /dev/null
> >> +++
> >>
> >
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> >> @@ -0,0 +1,77 @@
> >> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00
> >> 2001
> >> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
> >> +Date: Thu, 27 Feb 2025 14:33:49 +0200
> >> +Subject: [PATCH] display: Properly handle Vulkan errors during
> >> probing
> >> +
> >> +The vk::createInstance() function throws an exception on error,
> >> +so handle it instead of checking for a null return value.
> >> +
> >> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
> >> +Upstream:
> >>
> >
> https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
> >> +
> >> +---
> >> + src/ws/display_window_system_plugin.cpp | 39
> >> ++++++++++++-------------
> >> + 1 file changed, 19 insertions(+), 20 deletions(-)
> >> +
> >> +diff --git a/src/ws/display_window_system_plugin.cpp
> >> b/src/ws/display_window_system_plugin.cpp
> >> +index 523092b..fcbd949 100644
> >> +--- a/src/ws/display_window_system_plugin.cpp
> >> ++++ b/src/ws/display_window_system_plugin.cpp
> >> +@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const&
> >> options)
> >> + .setPApplicationInfo(&app_info)
> >> + .setEnabledExtensionCount(exts.size())
> >> + .setPpEnabledExtensionNames(exts.data());
> >> +- auto vk_instance = ManagedResource<vk::Instance>{
> >> +- vk::createInstance(create_info),
> >> +- [] (auto& i) { i.destroy(); }};
> >> +- if (!vk_instance.raw)
> >> +- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> >> +-
> >> +- auto physical_devices =
> >> vk_instance.raw.enumeratePhysicalDevices();
> >> +- auto physical_device = options.use_device_with_uuid ?
> >> +- std::find_if(
> >> +- physical_devices.begin(), physical_devices.end(),
> >> +- [&options] (auto pd) {
> >> +- return
> >> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> >> +- options.use_device_with_uuid; }) :
> >> +- physical_devices.begin();
> >> +-
> >> +- if (physical_device != physical_devices.end())
> >> ++
> >> ++ try
> >> + {
> >> +- try
> >> ++ auto vk_instance = ManagedResource<vk::Instance>{
> >> ++ vk::createInstance(create_info),
> >> ++ [] (auto& i) { i.destroy(); }};
> >> ++ auto physical_devices =
> >> vk_instance.raw.enumeratePhysicalDevices();
> >> ++ auto physical_device = options.use_device_with_uuid ?
> >> ++ std::find_if(
> >> ++ physical_devices.begin(), physical_devices.end(),
> >> ++ [&options] (auto pd) {
> >> ++ return
> >> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> >> ++ options.use_device_with_uuid; }) :
> >> ++ physical_devices.begin();
> >> ++
> >> ++ if (physical_device != physical_devices.end())
> >> + {
> >> + auto display_index =
> >> std::stoi(get_display_index_option(options));
> >> + if (display_index < 0)
> >> +@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const&
> >> options)
> >> +
> >>
> > DisplayNativeSystem::get_display_surface_create_info(*physical_device,
> >> display_index);
> >> + return VKMARK_WINDOW_SYSTEM_PROBE_OK +
> >> VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
> >> + }
> >> +- catch (...)
> >> +- {
> >> +- }
> >> + }
> >> ++ catch (...)
> >> ++ {
> >> ++ }
> >> ++
> >> +
> >> + return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> >> + }
> >> +--
> >> +2.39.5
> >> +
> >> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
> >> new file mode 100644
> >> index 0000000000..032eb47dc9
> >> --- /dev/null
> >> +++ b/package/vkmark/Config.in
> >> @@ -0,0 +1,48 @@
> >> +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_PACKAGE_VKMARK_FLAVOR_ANY
> >> + select BR2_PACKAGE_VULKAN_HEADERS
> >> + select BR2_PACKAGE_VULKAN_LOADER
> >> + depends on !BR2_STATIC_LIBS # vulkan-loader
> >> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
> >> + select BR2_PACKAGE_GLM
> >> + depends on BR2_USE_WCHAR # assimp
> >> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
> >> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm,
> >> assimp, vkmark
> >> + select BR2_PACKAGE_ASSIMP
> >> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if
> >> BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> >> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
> >> + select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads,
> >> wchar, gcc >= 7, C++"
> >> + depends on BR2_STATIC_LIBS || \
> >> + !BR2_TOOLCHAIN_HAS_THREADS || \
> >> + !BR2_USE_WCHAR || \
> >> + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> >> + !BR2_INSTALL_LIBSTDCPP
> >> +
> >> +comment "vkmark needs a backend: gbm, wayland or xcb"
> >> + depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
> >> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
> >> new file mode 100644
> >> index 0000000000..2650f4ccd4
> >> --- /dev/null
> >> +++ b/package/vkmark/vkmark.hash
> >> @@ -0,0 +1,3 @@
> >> +# Locally computed
> >> +sha256
> >> 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc
> >> vkmark-2025.01.tar.gz
> >> +sha256
> >> dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
> >> COPYING-LGPL2.1
> >> diff --git a/package/vkmark/vkmark.mk [1] b/package/vkmark/vkmark.mk
> >> [1]
> >> new file mode 100644
> >> index 0000000000..7b721c6c99
> >> --- /dev/null
> >> +++ b/package/vkmark/vkmark.mk [1]
> >> @@ -0,0 +1,34 @@
> >>
> >
> +################################################################################
> >> +#
> >> +# vkmark
> >> +#
> >>
> >
> +################################################################################
> >> +
> >> +VKMARK_VERSION = 2025.01
> >> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
> >> +VKMARK_LICENSE = LGPL-2.1
> >> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
> >> +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers
> >> vulkan-loader
> >> +
> >> +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 xcb-util-wm
> >> +VKMARK_CONF_OPTS += -Dxcb=true
> >> +else
> >> +VKMARK_CONF_OPTS += -Dxcb=false
> >> +endif
> >> +
> >> +$(eval $(meson-package))
> >> --
> >> 2.39.5
> >
> > I tried to build vkmark but get this error:
> >
> >>>> vkmark custom Configuring
> > rm -rf
> >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> > mkdir -p
> >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> > sed -e "/^\[binaries\]$/s:$::" -e "/^\[properties\]$/s:$::" -e
> > "s%@TARGET_CC
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc%g"
> > -e
> > "s%@TARGET_CXX
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++%g"
> > -e
> > "s%@TARGET_AR
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc-ar%g"
> > -e
> > "s%@TARGET_FC
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gfortran%g"
> > -e
> > "s%@TARGET_STRIP
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-strip%g"
> > -e "s%@TARGET_ARCH@%aarch64%g" -e "s%@TARGET_CPU@%cortex-a53%g" -e
> > "s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%%g" -e
> > "s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE',
> > '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'%g" -e
> > "s%@TARGET_LDFLAGS@%%g" -e "s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE',
> > '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0',
> > '-D_FORTIFY_SOURCE=1'%g" -e
> > "s%@BR2_CMAKE
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake%g"
> > -e
> > "s%@PKGCONF_HOST_BINARY
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf%g"
> > -e "s%@HOST_DIR@%/srv/storage/hthiery/sources/sa67/out-graphic/host%g"
> > -e
> > "s%@STAGING_DIR
> @%/srv/storage/hthiery/sources/sa67/out-graphic/host/aarch64-buildroot-linux-gnu/sysroot%g"
> > -e "s%@STATIC@%false%g"
> > /srv/storage/hthiery/sources/sa67/buildroot/support/misc/
> cross-compilation.conf.in
> > [2] >
> >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> >
> PATH="/srv/storage/hthiery/sources/sa67/out-graphic/host/bin:/srv/storage/hthiery/sources/sa67/out-graphic/host/sbin:/home/hthiery/.local/bin:/home/hthiery/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
> > CC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++"
> > PYTHONNOUSERSITE=y
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/meson setup
> > --prefix=/usr --libdir=lib --default-library=shared
> > --buildtype=release
> >
> --cross-file=/srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build/cross-compilation.conf
> > -Db_pie=false -Db_staticpic=true -Dstrip=false
> >
> -Dbuild.pkg_config_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/pkgconfig
> >
> -Dbuild.cmake_prefix_path=/srv/storage/hthiery/sources/sa67/out-graphic/host/lib/cmake
> > -Dkms=true -Dwayland=false -Dxcb=false
> > /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/
> >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom//buildroot-build
> > The Meson build system
> > Version: 1.7.0
> > Source dir:
> > /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom
> > Build dir:
> >
> /srv/storage/hthiery/sources/sa67/out-graphic/build/vkmark-custom/buildroot-build
> > Build type: cross build
> > Project name: vkmark
> > Project version: 2025.01
> > C compiler for the host machine:
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> > (gcc 14.2.0 "aarch64-linux-gcc.br_real (Buildroot
> > 2021.11-12449-g1bef613319) 14.2.0")
> > C linker for the host machine:
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-gcc
> > ld.bfd 2.42
> > C++ compiler for the host machine:
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> > (gcc 14.2.0 "aarch64-linux-g++.br_real (Buildroot
> > 2021.11-12449-g1bef613319) 14.2.0")
> > C++ linker for the host machine:
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/aarch64-linux-g++
> > ld.bfd 2.42
> > C compiler for the build machine: /usr/bin/gcc (gcc 8.3.0 "gcc (Debian
> > 8.3.0-6) 8.3.0")
> > C linker for the build machine: /usr/bin/gcc ld.bfd 2.31.1
> > C++ compiler for the build machine: /usr/bin/g++ (gcc 8.3.0 "g++
> > (Debian 8.3.0-6) 8.3.0")
> > C++ linker for the build machine: /usr/bin/g++ ld.bfd 2.31.1
> > Build machine cpu family: x86_64
> > Build machine cpu: x86_64
> > Host machine cpu family: aarch64
> > Host machine cpu: cortex-a53
> > Target machine cpu family: aarch64
> > Target machine cpu: cortex-a53
> > Found pkg-config: YES
> > (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkg-config)
> > 2.3.0
> > Build-time dependency vulkan found: YES 1.4.307
> > Library dl found: YES
> > Found pkg-config: YES
> > (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/pkgconf) 2.3.0
> > Found CMake:
> > /srv/storage/hthiery/sources/sa67/out-graphic/host/bin/cmake (3.31.5)
> > Run-time dependency glm found: YES 1.0.0
> > Run-time dependency assimp found: YES 5.4.3
> > Run-time dependency xcb found: NO (tried pkgconfig and cmake)
> > Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
> > Run-time dependency wayland-client found: NO (tried pkgconfig and
> > cmake)
> > Run-time dependency wayland-protocols found: NO (tried pkgconfig and
> > cmake)
> > Run-time dependency wayland-scanner found: NO (tried pkgconfig and
> > cmake)
> > Run-time dependency libdrm found: YES 2.4.124
> > Run-time dependency gbm found: YES 25.0.6
> > Program python3 found: YES
> > (/srv/storage/hthiery/sources/sa67/out-graphic/host/bin/python3)
> >
> > ../out-graphic/build/vkmark-custom/src/meson.build:9:19: ERROR: File
> > /usr/share/vulkan/registry/vk.xml does not exist
> >
> > Is the vk.xml file installed on your system in
> > /usr/share/vulkan/registry/vk.xml? I think the problem is related to
> > the vulkan.pc file that has a wrong prefix value set.
> >
> > Can you confirm that?
>
> I can reproduce the issue. When using the Buildroot docker
> reference image, with the commands:
>
> utils/docker-run
> cat >.config <<EOF
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
> BR2_SYSTEM_DHCP="eth0"
> BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
> BR2_ROOTFS_POST_SCRIPT_ARGS="qemu_aarch64_virt_defconfig"
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
>
> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> BR2_PACKAGE_VKMARK=y
> BR2_PACKAGE_MESA3D=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
> BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO=y
> BR2_PACKAGE_MESA3D_OPENGL_ES=y
> BR2_TARGET_ROOTFS_EXT2=y
> BR2_TARGET_ROOTFS_EXT2_4=y
> BR2_TARGET_ROOTFS_EXT2_SIZE="600M"
> # BR2_TARGET_ROOTFS_TAR is not set
> EOF
> make olddefconfig
> make
>
> It fails with:
>
> output/build/vkmark-2025.01/src/meson.build:9:19: ERROR: File
> /usr/share/vulkan/registry/vk.xml does not exist.
>
> If I build directly on my host system, which has the vulkan headers
> available at /usr/share/vulkan/registry/vk.xml, it works.
>
> vkmark meson should take the file from:
> $(STAGING_DIR)/usr/share/vulkan/registry/vk.xml
>
You are right. It is related to the location of the vk.xml file. I opened
an issue on the vkmark github page:
https://github.com/vkmark/vkmark/issues/75.
I have a workaround for that but it does not seem like a valid final
solution. See my comment in the github issue.
>
> > ---
> > Heiko
> >
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot@buildroot.org
> >> https://lists.buildroot.org/mailman/listinfo/buildroot
> >
> >
> > Links:
> > ------
> > [1] http://vkmark.mk
> > [2] http://cross-compilation.conf.in
>
> Best regards,
>
> Julien.
>
BR
--
Heiko
[-- Attachment #1.2: Type: text/html, Size: 25520 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-03-03 16:15 ` [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool Alex Bennée
2025-05-28 14:00 ` Heiko Thiery
@ 2025-05-31 21:31 ` Julien Olivain
2025-06-02 12:44 ` Alex Bennée
1 sibling, 1 reply; 19+ messages in thread
From: Julien Olivain @ 2025-05-31 21:31 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Eric Le Bihan
Hi Alex,
Thanks for the patch.
On 03/03/2025 17:15, Alex Bennée wrote:
> We build from the recent 2025.1 release although we need one commit
> from master to better handle the missing KHR_display extension.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v4
> - fix tab vs space damage
> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
> - make comments properly depend
> - use the new 2025.01 release
> - add sha256sum of COPYING-LGPL2.1
> - alphabetic sort of initial VKMARK_DEPENDENCIES
> - add vulkan error probing patch
> v3
> - add xcb-util-wm deps under X11
> - add assimp directly to VKMARK_DEPENDENCIES
> - drop duplicate BR2_INSTALL_LIBSTDCPP
> - drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> v2
> - fix whitespace errors in Config.in
> - fix sorting of sources
> - add DEVELOPERS entry
> - rework KConfig based on review
> - drop unused sha256sum
> - explicitly enable/disable the backends
> ---
> DEVELOPERS | 3 +
> package/Config.in | 1 +
> ...-handle-Vulkan-errors-during-probing.patch | 77 +++++++++++++++++++
> package/vkmark/Config.in | 48 ++++++++++++
> package/vkmark/vkmark.hash | 3 +
> package/vkmark/vkmark.mk | 34 ++++++++
> 6 files changed, 166 insertions(+)
> create mode 100644
> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> create mode 100644 package/vkmark/Config.in
> create mode 100644 package/vkmark/vkmark.hash
> create mode 100644 package/vkmark/vkmark.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 1f04dd2a1e..03af6cb426 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -144,6 +144,9 @@ F: package/liblog4c-localtime/
> N: Alexandre Belloni <alexandre.belloni@bootlin.com>
> F: package/tz/
>
> +N: Alex Bennée <alex.bennee@linaro.org>
> +F: package/vkmark/
> +
> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
> F: package/kvazaar/
> F: package/v4l2loopback/
> diff --git a/package/Config.in b/package/Config.in
> index 30ba7c206a..7b9615efe6 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -338,6 +338,7 @@ comment "Graphic applications"
> source "package/swaybg/Config.in"
> source "package/tesseract-ocr/Config.in"
> source "package/tinifier/Config.in"
> + source "package/vkmark/Config.in"
>
> comment "Graphic libraries"
> source "package/cegui/Config.in"
> diff --git
> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> new file mode 100644
> index 0000000000..7e2e43a946
> --- /dev/null
> +++
> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
> @@ -0,0 +1,77 @@
> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00 2001
> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
> +Date: Thu, 27 Feb 2025 14:33:49 +0200
> +Subject: [PATCH] display: Properly handle Vulkan errors during probing
> +
> +The vk::createInstance() function throws an exception on error,
> +so handle it instead of checking for a null return value.
> +
> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
There is a small typo here. It should be:
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This is reported by "utils/docker-run make check-package".
package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch:0:
missing Signed-off-by in the header
(https://nightly.buildroot.org/#_format_and_licensing_of_the_package_patches)
Could you send an updated version of this patch, please?
> +Upstream:
> https://github.com/vkmark/vkmark/commit/37d0a0d7fa6dcde6f62718d2115e8b76646bff23
> +
> +---
> + src/ws/display_window_system_plugin.cpp | 39
> ++++++++++++-------------
> + 1 file changed, 19 insertions(+), 20 deletions(-)
> +
> +diff --git a/src/ws/display_window_system_plugin.cpp
> b/src/ws/display_window_system_plugin.cpp
> +index 523092b..fcbd949 100644
> +--- a/src/ws/display_window_system_plugin.cpp
> ++++ b/src/ws/display_window_system_plugin.cpp
> +@@ -72,24 +72,22 @@ int vkmark_window_system_probe(Options const&
> options)
> + .setPApplicationInfo(&app_info)
> + .setEnabledExtensionCount(exts.size())
> + .setPpEnabledExtensionNames(exts.data());
> +- auto vk_instance = ManagedResource<vk::Instance>{
> +- vk::createInstance(create_info),
> +- [] (auto& i) { i.destroy(); }};
> +- if (!vk_instance.raw)
> +- return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> +-
> +- auto physical_devices =
> vk_instance.raw.enumeratePhysicalDevices();
> +- auto physical_device = options.use_device_with_uuid ?
> +- std::find_if(
> +- physical_devices.begin(), physical_devices.end(),
> +- [&options] (auto pd) {
> +- return
> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> +- options.use_device_with_uuid; }) :
> +- physical_devices.begin();
> +-
> +- if (physical_device != physical_devices.end())
> ++
> ++ try
> + {
> +- try
> ++ auto vk_instance = ManagedResource<vk::Instance>{
> ++ vk::createInstance(create_info),
> ++ [] (auto& i) { i.destroy(); }};
> ++ auto physical_devices =
> vk_instance.raw.enumeratePhysicalDevices();
> ++ auto physical_device = options.use_device_with_uuid ?
> ++ std::find_if(
> ++ physical_devices.begin(), physical_devices.end(),
> ++ [&options] (auto pd) {
> ++ return
> static_cast<DeviceUUID>(pd.getProperties().pipelineCacheUUID) ==
> ++ options.use_device_with_uuid; }) :
> ++ physical_devices.begin();
> ++
> ++ if (physical_device != physical_devices.end())
> + {
> + auto display_index =
> std::stoi(get_display_index_option(options));
> + if (display_index < 0)
> +@@ -97,10 +95,11 @@ int vkmark_window_system_probe(Options const&
> options)
> +
> DisplayNativeSystem::get_display_surface_create_info(*physical_device,
> display_index);
> + return VKMARK_WINDOW_SYSTEM_PROBE_OK +
> VKMARK_DISPLAY_WINDOW_SYSTEM_PRIORITY;
> + }
> +- catch (...)
> +- {
> +- }
> + }
> ++ catch (...)
> ++ {
> ++ }
> ++
> +
> + return VKMARK_WINDOW_SYSTEM_PROBE_BAD;
> + }
> +--
> +2.39.5
> +
> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
> new file mode 100644
> index 0000000000..032eb47dc9
> --- /dev/null
> +++ b/package/vkmark/Config.in
> @@ -0,0 +1,48 @@
> +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_PACKAGE_VKMARK_FLAVOR_ANY
> + select BR2_PACKAGE_VULKAN_HEADERS
> + select BR2_PACKAGE_VULKAN_LOADER
> + depends on !BR2_STATIC_LIBS # vulkan-loader
> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
> + select BR2_PACKAGE_GLM
> + depends on BR2_USE_WCHAR # assimp
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
> + select BR2_PACKAGE_ASSIMP
> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if
> BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
> + select BR2_PACKAGE_XCB_UTIL_WM 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/ dynamic library, threads, wchar,
> gcc >= 7, C++"
> + depends on BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HAS_THREADS || \
> + !BR2_USE_WCHAR || \
> + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> + !BR2_INSTALL_LIBSTDCPP
> +
> +comment "vkmark needs a backend: gbm, wayland or xcb"
> + depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
> new file mode 100644
> index 0000000000..2650f4ccd4
> --- /dev/null
> +++ b/package/vkmark/vkmark.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256
> 1ae362844344d0f9878b7a3f13005f77eae705108892a4e8abf237d452d37edc
> vkmark-2025.01.tar.gz
> +sha256
> dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
> COPYING-LGPL2.1
> diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
> new file mode 100644
> index 0000000000..7b721c6c99
> --- /dev/null
> +++ b/package/vkmark/vkmark.mk
> @@ -0,0 +1,34 @@
> +################################################################################
> +#
> +# vkmark
> +#
> +################################################################################
> +
> +VKMARK_VERSION = 2025.01
> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
> +VKMARK_LICENSE = LGPL-2.1
> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
> +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers
> vulkan-loader
> +
> +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 xcb-util-wm
> +VKMARK_CONF_OPTS += -Dxcb=true
> +else
> +VKMARK_CONF_OPTS += -Dxcb=false
> +endif
> +
> +$(eval $(meson-package))
> --
> 2.39.5
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool
2025-05-31 21:31 ` Julien Olivain
@ 2025-06-02 12:44 ` Alex Bennée
0 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2025-06-02 12:44 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Eric Le Bihan
Julien Olivain <ju.o@free.fr> writes:
> Hi Alex,
>
> Thanks for the patch.
>
> On 03/03/2025 17:15, Alex Bennée wrote:
>> We build from the recent 2025.1 release although we need one commit
>> from master to better handle the missing KHR_display extension.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> v4
>> - fix tab vs space damage
>> - don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
>> - make comments properly depend
>> - use the new 2025.01 release
>> - add sha256sum of COPYING-LGPL2.1
>> - alphabetic sort of initial VKMARK_DEPENDENCIES
>> - add vulkan error probing patch
<snip>
>> diff --git
>> a/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> new file mode 100644
>> index 0000000000..7e2e43a946
>> --- /dev/null
>> +++
>> b/package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch
>> @@ -0,0 +1,77 @@
>> +From adf1aa346d99d29ad2c5c945c3e4de5e0e3e12cb Mon Sep 17 00:00:00 2001
>> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
>> +Date: Thu, 27 Feb 2025 14:33:49 +0200
>> +Subject: [PATCH] display: Properly handle Vulkan errors during probing
>> +
>> +The vk::createInstance() function throws an exception on error,
>> +so handle it instead of checking for a null return value.
>> +
>> +Signed-of-by: Alex Bennée <alex.bennee@linaro.org>
>
> There is a small typo here. It should be:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> This is reported by "utils/docker-run make check-package".
>
> package/vkmark/0001-display-Properly-handle-Vulkan-errors-during-probing.patch:0:
> missing Signed-off-by in the header
> (https://nightly.buildroot.org/#_format_and_licensing_of_the_package_patches)
>
> Could you send an updated version of this patch, please?
I think this is now handled upstream by:
https://github.com/vkmark/vkmark/pull/72
So I can switch to building from current HEAD or ask the vkmark people
to cut a new release.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package
2025-03-03 16:15 [Buildroot] [PATCH v4 0/6] Add vkmark graphics benchmarking tool Alex Bennée
` (4 preceding siblings ...)
2025-03-03 16:15 ` [Buildroot] [PATCH v4 5/6] package/vkmark: add vkmark benchmarking tool Alex Bennée
@ 2025-03-03 16:15 ` Alex Bennée
2025-05-31 21:51 ` Julien Olivain
5 siblings, 1 reply; 19+ messages in thread
From: Alex Bennée @ 2025-03-03 16:15 UTC (permalink / raw)
To: buildroot; +Cc: Ricardo Martincoski
To test vkmark we need a headless Weston compositor so we can run the
test without messing around with actual displays.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
Currently this won't work with the host QEMU. You will need QEMU 9.2.0
with a modern virglrenderer (as in Trixie) to expose the Vulkan GPU to
the guest.
v2
- add overlay image
- ensure we expose DISPLAY/DBUS env vars
- shorten runtime of vkmark
v3
- fix ordering of select/depend as suggested by check-package
- fix some flake8 complaints
---
package/vkmark/Config.in | 6 +-
support/testing/infra/emulator.py | 4 +-
support/testing/tests/package/test_vkmark.py | 74 +++++++++++++++++++
.../etc/profile.d/10-xdg-runtime.sh | 1 +
4 files changed, 81 insertions(+), 4 deletions(-)
create mode 100644 support/testing/tests/package/test_vkmark.py
create mode 100644 support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh
diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
index 032eb47dc9..b0e85c9c55 100644
--- a/package/vkmark/Config.in
+++ b/package/vkmark/Config.in
@@ -19,14 +19,14 @@ config BR2_PACKAGE_VKMARK_FLAVOR_X11
config BR2_PACKAGE_VKMARK
bool "vkmark"
depends on BR2_PACKAGE_VKMARK_FLAVOR_ANY
- select BR2_PACKAGE_VULKAN_HEADERS
- select BR2_PACKAGE_VULKAN_LOADER
depends on !BR2_STATIC_LIBS # vulkan-loader
depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
- select BR2_PACKAGE_GLM
depends on BR2_USE_WCHAR # assimp
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
+ select BR2_PACKAGE_VULKAN_HEADERS
+ select BR2_PACKAGE_VULKAN_LOADER
+ select BR2_PACKAGE_GLM
select BR2_PACKAGE_ASSIMP
select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
index ef5be2a19e..b7519ed65d 100644
--- a/support/testing/infra/emulator.py
+++ b/support/testing/infra/emulator.py
@@ -120,7 +120,9 @@ class Emulator(object):
host_bin = os.path.join(self.builddir, "host", "bin")
br_path = host_bin + os.pathsep + os.environ["PATH"]
qemu_env = {"QEMU_AUDIO_DRV": "none",
- "PATH": br_path}
+ "PATH": br_path,
+ "DBUS_SESSION_BUS_ADDRESS": os.environ["DBUS_SESSION_BUS_ADDRESS"],
+ "DISPLAY": os.environ["DISPLAY"]}
pexpect.run(f"{qemu_cmd[0]} --version",
encoding='utf-8',
logfile=self.logfile,
diff --git a/support/testing/tests/package/test_vkmark.py b/support/testing/tests/package/test_vkmark.py
new file mode 100644
index 0000000000..43591b1780
--- /dev/null
+++ b/support/testing/tests/package/test_vkmark.py
@@ -0,0 +1,74 @@
+import os
+
+import infra.basetest
+
+VULKANINFO_TIMEOUT = 120
+
+
+class TestVkMark(infra.basetest.BRTest):
+ config = \
+ """
+ BR2_aarch64=y
+ BR2_cortex_a72=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_OPTIMIZE_S=y
+ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+ BR2_ROOTFS_MERGED_USR=y
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+ BR2_PACKAGE_GLMARK2=y
+ BR2_PACKAGE_VKMARK=y
+ BR2_PACKAGE_MESA3D=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
+ BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO=y
+ BR2_PACKAGE_MESA3D_OPENGL_GLX=y
+ BR2_PACKAGE_MESA3D_OPENGL_ES=y
+ BR2_PACKAGE_WESTON=y
+ BR2_PACKAGE_WESTON_HEADLESS=y
+ BR2_PACKAGE_WESTON_XWAYLAND=y
+ BR2_PACKAGE_XORG7=y
+ BR2_PACKAGE_DBUS=y
+ BR2_PACKAGE_LIBMD=y
+ BR2_PACKAGE_LIBDRM_INTEL=y
+ BR2_PACKAGE_LIBDRM_RADEON=y
+ BR2_PACKAGE_LIBEPOXY=y
+ BR2_PACKAGE_UTIL_LINUX_BINARIES=y
+ BR2_PACKAGE_UTIL_LINUX_AGETTY=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+ BR2_TARGET_ROOTFS_EXT2=y
+ BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
+ BR2_ROOTFS_OVERLAY="{}"
+ """.format(
+ infra.filepath("tests/package/test_vkmark/rootfs-overlay"))
+
+ def login(self):
+ img = os.path.join(self.builddir, "images", "rootfs.ext2")
+ kern = os.path.join(self.builddir, "images", "Image")
+
+ # This does rely on having a modern QEMU with Venus support enabled
+ self.emulator.boot(arch="aarch64",
+ kernel=kern,
+ kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
+ options=["-M", "virt", "-cpu", "cortex-a72", "-m", "512",
+ "-drive",
+ f"file={img},if=virtio,format=raw",
+ "-display", "egl-headless",
+ "-display", "dbus,gl=on",
+ "-device", "virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on"])
+
+ self.emulator.login()
+
+ def test_run(self):
+ self.login()
+
+ # The test case verifies that the xserver with GLX is working
+ cmd = "weston -B headless --renderer gl --shell kiosk -- vkmark -b :duration=1.0"
+ output, exit_code = self.emulator.run(cmd, VULKANINFO_TIMEOUT)
+
+ self.assertEqual(exit_code, 0)
+ found_venus = False
+ for line in output:
+ found_venus |= "Virtio-GPU Venus" in line
+
+ self.assertEqual(found_venus, True)
diff --git a/support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh b/support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh
new file mode 100644
index 0000000000..5e0ccb1d3e
--- /dev/null
+++ b/support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh
@@ -0,0 +1 @@
+export XDG_RUNTIME_DIR=/tmp
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package
2025-03-03 16:15 ` [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package Alex Bennée
@ 2025-05-31 21:51 ` Julien Olivain
2025-06-03 13:40 ` Alex Bennée
0 siblings, 1 reply; 19+ messages in thread
From: Julien Olivain @ 2025-05-31 21:51 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Ricardo Martincoski
Hi Alex,
On 03/03/2025 17:15, Alex Bennée wrote:
> To test vkmark we need a headless Weston compositor so we can run the
> test without messing around with actual displays.
This test covers a bit more than the vkmark package. It also test Mesa3D
Vulkan Virtio, which brings new requirements on the host-qemu (to have
the sufficient version and build options) and also on the host itself
(to have a valid vulkan implementation).
The Buildroot test suite currently runs in the Docker reference image,
which include an "old" qemu 7.2.15. Specific runtime tests can request
a build of host-qemu, which is currently version 10.0 but will lack
the virglrenderer support. See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05-rc2/package/qemu/qemu.mk#L465
Finally, if there is no actual Vulkan-capable GPU hardware on the host,
it should then use a host-mesa3d vulkan llvmpipe. This would probably
be a considerable rework (of host-qemu recipe, or reference docker
image).
If merged as is, this test will always fail in the Buildroot Gitlab CI:
https://gitlab.com/buildroot.org/buildroot/-/jobs
Could this test be simplified to run vkmark with Mesa3D Vulkan llvmpipe?
It will no longer test the Vulkan Virtio GPU path, but at least
the vkmark recipe will be tested.
What do you think?
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Buildroot] [PATCH v4 6/6] support/testing: add test for vkmark package
2025-05-31 21:51 ` Julien Olivain
@ 2025-06-03 13:40 ` Alex Bennée
0 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2025-06-03 13:40 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Ricardo Martincoski
Julien Olivain <ju.o@free.fr> writes:
> Hi Alex,
>
> On 03/03/2025 17:15, Alex Bennée wrote:
>> To test vkmark we need a headless Weston compositor so we can run the
>> test without messing around with actual displays.
>
> This test covers a bit more than the vkmark package. It also test Mesa3D
> Vulkan Virtio, which brings new requirements on the host-qemu (to have
> the sufficient version and build options) and also on the host itself
> (to have a valid vulkan implementation).
>
> The Buildroot test suite currently runs in the Docker reference image,
> which include an "old" qemu 7.2.15. Specific runtime tests can request
> a build of host-qemu, which is currently version 10.0 but will lack
> the virglrenderer support. See:
> https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05-rc2/package/qemu/qemu.mk#L465
>
> Finally, if there is no actual Vulkan-capable GPU hardware on the host,
> it should then use a host-mesa3d vulkan llvmpipe. This would probably
> be a considerable rework (of host-qemu recipe, or reference docker
> image).
>
> If merged as is, this test will always fail in the Buildroot Gitlab CI:
> https://gitlab.com/buildroot.org/buildroot/-/jobs
>
> Could this test be simplified to run vkmark with Mesa3D Vulkan llvmpipe?
>
> It will no longer test the Vulkan Virtio GPU path, but at least
> the vkmark recipe will be tested.
I've simplified the test for CI and added the SWRAST driver so vkmark
can run even with an un-accelerated display device. Manually testing
with the latest QEMU works with full acceleration.
>
> What do you think?
>
> Best regards,
>
> Julien.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 19+ messages in thread