All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v1 2/6] package/vulkan-loader: new package
Date: Wed, 23 Dec 2020 23:45:49 +0100	[thread overview]
Message-ID: <20201223224553.8570-3-ps.report@gmx.net> (raw)
In-Reply-To: <20201223224553.8570-1-ps.report@gmx.net>

---
 package/Config.in                             |  1 +
 .../0001-loader-fix-asm_offset-call.patch     | 32 +++++++++++++++++++
 package/vulkan-loader/Config.in               | 14 ++++++++
 package/vulkan-loader/vulkan-loader.hash      |  3 ++
 package/vulkan-loader/vulkan-loader.mk        | 22 +++++++++++++
 5 files changed, 72 insertions(+)
 create mode 100644 package/vulkan-loader/0001-loader-fix-asm_offset-call.patch
 create mode 100644 package/vulkan-loader/Config.in
 create mode 100644 package/vulkan-loader/vulkan-loader.hash
 create mode 100644 package/vulkan-loader/vulkan-loader.mk

diff --git a/package/Config.in b/package/Config.in
index 9ede3b770f..8b96a61e33 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -335,6 +335,7 @@ comment "Graphic libraries"
 	source "package/sdl2_ttf/Config.in"
 	source "package/tk/Config.in"
 	source "package/vulkan-headers/Config.in"
+	source "package/vulkan-loader/Config.in"
 
 comment "Other GUIs"
 	source "package/qt5/Config.in"
diff --git a/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch b/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch
new file mode 100644
index 0000000000..d62b9390d8
--- /dev/null
+++ b/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch
@@ -0,0 +1,32 @@
+From 45098898f7fa25dfd12d2c4f1aed889f678aa870 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Wed, 23 Dec 2020 14:46:02 +0100
+Subject: [PATCH] loader: fix asm_offset call
+
+Disable assembler usage (not cross compile capable):
+
+  [ 21%] Generating gen_defines.asm
+  /bin/sh: asm_offset: command not found
+  make[3]: *** [loader/CMakeFiles/loader_asm_gen_files.dir/build.make:80: loader/gen_defines.asm] Error 127
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ loader/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
+index ba9f460f1..dbebfb058 100644
+--- a/loader/CMakeLists.txt
++++ b/loader/CMakeLists.txt
+@@ -187,7 +187,7 @@ else(UNIX AND NOT APPLE) # i.e.: Linux
+     endif()
+     set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+     try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/asm_test.S)
+-    if(ASSEMBLER_WORKS)
++    if(FALSE)
+         set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.S)
+         add_executable(asm_offset asm_offset.c)
+         target_link_libraries(asm_offset Vulkan::Headers)
+-- 
+2.29.2
+
diff --git a/package/vulkan-loader/Config.in b/package/vulkan-loader/Config.in
new file mode 100644
index 0000000000..9c215dc9ce
--- /dev/null
+++ b/package/vulkan-loader/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_VULKAN_LOADER
+	bool "vulkan-loader"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_VULKAN_HEADERS
+	help
+	  The Khronos official Vulkan ICD desktop loader.
+
+	  https://github.com/KhronosGroup/Vulkan-Loader
+
+comment "vulkan-loader needs a toolchain w/ C++, dynamic library, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/vulkan-loader/vulkan-loader.hash b/package/vulkan-loader/vulkan-loader.hash
new file mode 100644
index 0000000000..c70ed90be6
--- /dev/null
+++ b/package/vulkan-loader/vulkan-loader.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  e582dce35051a34af82db2a8fcd38fbc5837b4506e76e6cda685dca02dee01c7  vulkan-loader-1.2.162.tar.gz
+sha256  43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece  LICENSE.txt
diff --git a/package/vulkan-loader/vulkan-loader.mk b/package/vulkan-loader/vulkan-loader.mk
new file mode 100644
index 0000000000..ff6c0f869b
--- /dev/null
+++ b/package/vulkan-loader/vulkan-loader.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# vulkan-loader
+#
+################################################################################
+
+VULKAN_LOADER_VERSION = 1.2.162
+VULKAN_LOADER_SITE = $(call github,KhronosGroup,Vulkan-Loader,v$(VULKAN_LOADER_VERSION))
+VULKAN_LOADER_LICENSE = Apache-2.0 License
+VULKAN_LOADER_LICENSE_FILES = LICENSE.txt
+VULKAN_LOADER_INSTALL_STAGING = YES
+
+VULKAN_LOADER_DEPENDENCIES = vulkan-headers
+
+VULKAN_LOADER_CONF_OPTS += \
+	-DBUILD_WSI_XCB_SUPPORT=OFF \
+	-DBUILD_WSI_XLIB_SUPPORT=OFF \
+	-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
+	-DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
+	-DUSE_CCACHE=OFF
+
+$(eval $(cmake-package))
-- 
2.29.2

  parent reply	other threads:[~2020-12-23 22:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 22:45 [Buildroot] [RFC v1 0/6] Vulkan support Peter Seiderer
2020-12-23 22:45 ` [Buildroot] [RFC v1 1/6] package/vulkan-headers: new package Peter Seiderer
2020-12-30  8:42   ` Yann E. MORIN
2020-12-30 14:23     ` Peter Seiderer
2020-12-23 22:45 ` Peter Seiderer [this message]
2020-12-30  8:54   ` [Buildroot] [RFC v1 2/6] package/vulkan-loader: " Yann E. MORIN
2020-12-23 22:45 ` [Buildroot] [RFC v1 3/6] package/vulkan-tools: " Peter Seiderer
2020-12-30  9:00   ` Yann E. MORIN
2020-12-30 14:32     ` Peter Seiderer
2020-12-23 22:45 ` [Buildroot] [RFC v1 4/6] package/mesa3d: add vulkan broadcom driver support Peter Seiderer
2020-12-30  9:07   ` Yann E. MORIN
2020-12-23 22:45 ` [Buildroot] [RFC v1 5/6] package/mesa3d: add vulkan swrast " Peter Seiderer
2020-12-30  9:15   ` Yann E. MORIN
2020-12-23 22:45 ` [Buildroot] [RFC v1 6/6] package/qt5base: add vulkan option Peter Seiderer
2020-12-30  8:39 ` [Buildroot] [RFC v1 0/6] Vulkan support Yann E. MORIN

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20201223224553.8570-3-ps.report@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

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

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