Skip to contentSkip to conversation

package/onevpl: new package

PATCH Applied Bernd Kuhls 3 participants 6 messages Aug 8, 2023 – Jan 14, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 package/onevpl: new package

From: Bernd Kuhls <[email protected]>

---
v4: no changes
v3: bumped version to 2023.3.1
v2: no changes

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 .../0001-Don-t-force-fstack-protector.patch   | 32 ++++++++++++++
 package/onevpl/Config.in                      | 26 +++++++++++
 package/onevpl/onevpl.hash                    |  3 ++
 package/onevpl/onevpl.mk                      | 43 +++++++++++++++++++
 6 files changed, 106 insertions(+)
 create mode 100644 package/onevpl/0001-Don-t-force-fstack-protector.patch
 create mode 100644 package/onevpl/Config.in
 create mode 100644 package/onevpl/onevpl.hash
 create mode 100644 package/onevpl/onevpl.mk
DEVELOPERS +1 -0
index 9915143a04..eb703d52c7 100644
@@ -417,6 +417,7 @@ F:	package/mjpg-streamer/
 F:	package/mpg123/
 F:	package/ntp/
 F:	package/nut/
+F:	package/onevpl/
 F:	package/opus/
 F:	package/pciutils/
 F:	package/perl-crypt-openssl-guess/
package/Config.in +1 -0
index e12ee34e9f..58e653dcd9 100644
@@ -1642,6 +1642,7 @@ menu "Graphics"
 	source "package/libvips/Config.in"
 	source "package/libwpe/Config.in"
 	source "package/menu-cache/Config.in"
+	source "package/onevpl/Config.in"
 	source "package/opencl-clhpp/Config.in"
 	source "package/opencv3/Config.in"
 	source "package/opencv4/Config.in"
package/onevpl/0001-Don-t-force-fstack-protector.patch new file +32 -0
new file mode 100644
index 0000000000..14948e28cc
@@ -0,0 +1,32 @@
+From 682a9eabc71c2e33ebbbba2e75d0ba7caa08c7c8 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Mon, 8 May 2023 20:03:22 +0200
+Subject: [PATCH] Don't force -fstack-protector
+
+This allows the environment to decide whether SSP should be used or
+not, for example to support toolchains that don't have SSP support.
+
+Upstream: Not applicable
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ cmake/CompileOptions.cmake | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake
+index 9923f1c..5b24622 100644
+--- a/cmake/CompileOptions.cmake
++++ b/cmake/CompileOptions.cmake
+@@ -54,9 +54,6 @@ else()
+       add_definitions("-D_FORTIFY_SOURCE=2")
+     endif()
+   endif()
+-  if(NOT MINGW)
+-    add_compile_options("-fstack-protector-strong")
+-  endif()
+   if(NOT MINGW)
+     add_link_options("-Wl,-z,relro,-z,now,-z,noexecstack")
+   endif()
+-- 
+2.39.2
+
package/onevpl/Config.in new file +26 -0
new file mode 100644
index 0000000000..65a34185e3
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	bool
+	default y if BR2_ARCH_IS_64
+	default y if BR2_arm
+
+config BR2_PACKAGE_ONEVPL
+	bool "onevpl"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_LIBDRM_INTEL if BR2_PACKAGE_LIBVA
+	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	help
+	  oneAPI Video Processing Library (oneVPL) dispatcher,
+	  tools, and examples
+
+	  https://github.com/oneapi-src/oneVPL
+
+comment "onevpl needs a toolchain w/ dynamic library, gcc >= 7, C++, threads"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/onevpl/onevpl.hash new file +3 -0
new file mode 100644
index 0000000000..c9ca1e6c04
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  4411543519486a2450f6f5af06a077596e7888a551768594e9dfa2a46b23b6f5  onevpl-2023.3.1.tar.gz
+sha256  bf1cfac2e2792b6e1e995ce103d70796aecaf2ec7e4c5fe5474f7acec7b4a677  LICENSE
package/onevpl/onevpl.mk new file +43 -0

43 lines not on this page · raw message

Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v4 2/2 package/onevpl-intel-gpu: new package

From: Bernd Kuhls <[email protected]>

---
v4: bump to 23.3.1
v3: bump to 23.3.0
v2: bump to 23.2.4

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/onevpl-intel-gpu/Config.in            | 23 +++++++++++++++++++
 .../onevpl-intel-gpu/onevpl-intel-gpu.hash    |  3 +++
 package/onevpl-intel-gpu/onevpl-intel-gpu.mk  | 13 +++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/onevpl-intel-gpu/Config.in
 create mode 100644 package/onevpl-intel-gpu/onevpl-intel-gpu.hash
 create mode 100644 package/onevpl-intel-gpu/onevpl-intel-gpu.mk
DEVELOPERS +1 -0
index eb703d52c7..7b6010a556 100644
@@ -418,6 +418,7 @@ F:	package/mpg123/
 F:	package/ntp/
 F:	package/nut/
 F:	package/onevpl/
+F:	package/onevpl-intel-gpu/
 F:	package/opus/
 F:	package/pciutils/
 F:	package/perl-crypt-openssl-guess/
package/Config.in +1 -0
index 58e653dcd9..1617f7488a 100644
@@ -1643,6 +1643,7 @@ menu "Graphics"
 	source "package/libwpe/Config.in"
 	source "package/menu-cache/Config.in"
 	source "package/onevpl/Config.in"
+	source "package/onevpl-intel-gpu/Config.in"
 	source "package/opencl-clhpp/Config.in"
 	source "package/opencv3/Config.in"
 	source "package/opencv4/Config.in"
package/onevpl-intel-gpu/Config.in new file +23 -0
new file mode 100644
index 0000000000..a0ca9e3d7d
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_ONEVPL_INTEL_GPU
+	bool "onevpl-intel-gpu"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS # onevpl
+	depends on BR2_INSTALL_LIBSTDCPP # onevpl
+	depends on !BR2_STATIC_LIBS # onevpl
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # onevpl
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1 # intel-mediadriver -> mesa3d
+	depends on BR2_TOOLCHAIN_HAS_THREADS # onevpl
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # intel-mediadriver -> mesa3d
+	select BR2_PACKAGE_INTEL_MEDIADRIVER # runtime
+	select BR2_PACKAGE_LIBVA
+	select BR2_PACKAGE_ONEVPL
+	help
+	  Intel® oneVPL GPU Runtime is a Runtime implementation of
+	  oneVPL API for Intel Gen GPUs, starting with Tiger Lake.
+
+	  https://github.com/oneapi-src/oneVPL-intel-gpu
+
+comment "onevpl-intel-gpu needs a toolchain w/ dynamic library, gcc >= 7, C++, NPTL"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/onevpl-intel-gpu/onevpl-intel-gpu.hash new file +3 -0
new file mode 100644
index 0000000000..fa8e96959b
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  51052b2cb0c1d0e628aa1e04b19ffdcd5098993c6c368045a79d87d21ca4ebe5  onevpl-intel-gpu-23.3.1.tar.gz
+sha256  c31c3cc5fd66d1250dbca1c3d9011a9f874537442ac71c8de80f2f0fed13f297  LICENSE
package/onevpl-intel-gpu/onevpl-intel-gpu.mk new file +13 -0
new file mode 100644
index 0000000000..33b32b5d94
@@ -0,0 +1,13 @@
+################################################################################
+#
+# onevpl-intel-gpu
+#
+################################################################################
+
+ONEVPL_INTEL_GPU_VERSION = 23.3.1
+ONEVPL_INTEL_GPU_SITE = $(call github,oneapi-src,oneVPL-intel-gpu,intel-onevpl-$(ONEVPL_INTEL_GPU_VERSION))
+ONEVPL_INTEL_GPU_LICENSE = MIT
+ONEVPL_INTEL_GPU_LICENSE_FILES = LICENSE
+ONEVPL_INTEL_GPU_DEPENDENCIES = libva onevpl
+
+$(eval $(cmake-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH/next v4 2/2] package/onevpl-intel-gpu: new package

Quoted 7 lines · On Tue, 8 Aug 2023 08:41:07 +0200 Bernd Kuhls <[email protected]> wrote:

From: Bernd Kuhls <[email protected]>

---
v4: bump to 23.3.1
v3: bump to 23.3.0
v2: bump to 23.2.4

Applied to next, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Bernd Kuhls
Quoted 3 lines · On Tue, 8 Aug 2023 08:41:06 +0200 Bernd Kuhls <[email protected]> wrote:

From: Bernd Kuhls <[email protected]>

I've applied to next, but I have a few comments nevertheless, see below.

Quoted 6 lines
package/onevpl/0001-Don-t-force-fstack-protector.patch new file +0 -0
new file mode 100644
index 0000000000..14948e28cc

package/onevpl/0001-Don-t-force-fstack-protector.patch line 9

Quoted 9 lines
package/onevpl/0001-Don-t-force-fstack-protector.patch new file +9 -0
@@ -0,0 +1,32 @@
+From 682a9eabc71c2e33ebbbba2e75d0ba7caa08c7c8 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Mon, 8 May 2023 20:03:22 +0200
+Subject: [PATCH] Don't force -fstack-protector
+
+This allows the environment to decide whether SSP should be used or
+not, for example to support toolchains that don't have SSP support.
+
+Upstream: Not applicable

I'd like to challenge the fact that it's not applicable upstream. You could add a CMake option that allows to enable/disable -fstack-protector-strong, enabled by default so that it preserves upstream behavior while allowing us to do what we think needs to be done.

package/onevpl/Config.in line 4

Quoted 10 lines
package/onevpl/Config.in new file +4 -0
new file mode 100644
index 0000000000..65a34185e3
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	bool
+	default y if BR2_ARCH_IS_64
+	default y if BR2_arm

Could you clarify where this architecture dependency comes from? Would be good to add a comment about it (through a follow-up patch).

package/onevpl/Config.in line 14

Quoted 9 lines
package/onevpl/Config.in new file +9 -0
+config BR2_PACKAGE_ONEVPL
+	bool "onevpl"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_LIBDRM_INTEL if BR2_PACKAGE_LIBVA

I added a short comment above this select because it was not obvious why it was needed, as we don't depend on libdrm. Turns out that for the VA stuff in OneVPL to work, it needs libdrm to have been built with the intel driver in.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Bernd Kuhls

Bernd, All,

On 2023-08-08 08:41 +0200, Bernd Kuhls spake thusly:

Quoted 4 lines

From: Bernd Kuhls <[email protected]>

---

[--SNIP--]

Quoted 10 lines
package/onevpl/Config.in new file +4 -0
new file mode 100644
index 0000000000..65a34185e3
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	bool
+	default y if BR2_ARCH_IS_64
+	default y if BR2_arm

package/onevpl/Config.in line 14

Quoted 10 lines
package/onevpl/Config.in new file +10 -0
+
+config BR2_PACKAGE_ONEVPL
+	bool "onevpl"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_LIBDRM_INTEL if BR2_PACKAGE_LIBVA

This is incorrect, as BR2_PACKAGE_LIBDRM_INTEL needs i386 or x86_64, but BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS allows any 64-bit arch, like aarch64, mips64, ppc64...

This is causing build failures, such as:

http://autobuild.buildroot.org/results/8fa/8fa0f2cd7a027d3d8fae56125621b0b814e132da/

make: Entering directory '/home/buildroot/autobuild/run/instance-0/buildroot'
Makefile:576: *** libpciaccess is in the dependency chain of libdrm that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in. Stop.
make: Leaving directory '/home/buildroot/autobuild/run/instance-0/buildroot'

Can you look into that, please (note that you renamed the package to libvpl later, so it would be nice to have a fix for master and one for the 2023.11.x branch.

Regards,
Yann E. MORIN.

Quoted 77 lines
package/onevpl/Config.in new file +12 -0
+	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	help
+	  oneAPI Video Processing Library (oneVPL) dispatcher,
+	  tools, and examples
+
+	  https://github.com/oneapi-src/oneVPL
+
+comment "onevpl needs a toolchain w/ dynamic library, gcc >= 7, C++, threads"
+	depends on BR2_PACKAGE_ONEVPL_ARCH_SUPPORTS
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/onevpl/onevpl.hash new file +3 -0
new file mode 100644
index 0000000000..c9ca1e6c04
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  4411543519486a2450f6f5af06a077596e7888a551768594e9dfa2a46b23b6f5  onevpl-2023.3.1.tar.gz
+sha256  bf1cfac2e2792b6e1e995ce103d70796aecaf2ec7e4c5fe5474f7acec7b4a677  LICENSE
package/onevpl/onevpl.mk new file +43 -0
new file mode 100644
index 0000000000..2033f755c0
@@ -0,0 +1,43 @@
+################################################################################
+#
+# onevpl
+#
+################################################################################
+
+ONEVPL_VERSION = 2023.3.1
+ONEVPL_SITE = $(call github,oneapi-src,oneVPL,v$(ONEVPL_VERSION))
+ONEVPL_LICENSE = MIT
+ONEVPL_LICENSE_FILES = LICENSE
+ONEVPL_INSTALL_STAGING = YES
+ONEVPL_DEPENDENCIES = host-pkgconf
+
+ONEVPL_CONF_OPTS = \
+	-DINSTALL_EXAMPLE_CODE=OFF
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+ONEVPL_CONF_OPTS += \
+	-DCMAKE_CXX_FLAGS="-latomic"
+endif
+
+ifeq ($(BR2_PACKAGE_LIBVA),y)
+ONEVPL_CONF_OPTS += -DENABLE_VA=ON
+ONEVPL_DEPENDENCIES += libva
+else
+ONEVPL_CONF_OPTS += -DENABLE_VA=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+ONEVPL_CONF_OPTS += -DENABLE_WAYLAND=ON
+ONEVPL_DEPENDENCIES += wayland wayland-protocols
+else
+ONEVPL_CONF_OPTS += -DENABLE_WAYLAND=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+ONEVPL_CONF_OPTS += -DENABLE_X11=ON
+ONEVPL_DEPENDENCIES += libxcb xlib_libX11
+else
+ONEVPL_CONF_OPTS += -DENABLE_X11=OFF
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): ZaO79g0Pj7qf7V2i__30467.7474939794$1705229332$gmane$org@landeda

#6 lore raw

Am Sun, 14 Jan 2024 11:48:22 +0100 schrieb Yann E. MORIN:

Quoted 3 lines

Can you look into that, please (note that you renamed the package to libvpl later, so it would be nice to have a fix for master and one for the 2023.11.x branch.

Hi Yann,

done:
https://patchwork.ozlabs.org/project/buildroot/patch/
[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/
[email protected]/

Regards, Bernd

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot