Add Wayland with GPU support.
Cherry-pick from http://192.168.110.45/sdk/buildroot/-/commit/ed70e2b79cbc7a504792899e2cd3577777fd54bd
This commit is contained in:
@@ -9,3 +9,4 @@ source "package/starfive/v4l2_test/Config.in"
|
||||
source "package/starfive/mailbox-test/Config.in"
|
||||
source "package/starfive/e24-test/Config.in"
|
||||
source "package/starfive/stfisp_setfile/Config.in.host"
|
||||
source "package/starfive/img-gpu-powervr/Config.in"
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
comment "img-gpu-powervr needs a glibc toolchain"
|
||||
depends on BR2_riscv
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR
|
||||
bool "img-gpu-powervr"
|
||||
# Pre-built binaries only available for RISCV
|
||||
depends on BR2_riscv
|
||||
# Library binaries are linked against libc.so.6
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
# Library binaries are linked against libdrm.so.2, except framebuffer
|
||||
# output on RISCV
|
||||
select BR2_PACKAGE_LIBDRM if !(BR2_riscv && BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_FB)
|
||||
select BR2_PACKAGE_HAS_LIBEGL
|
||||
select BR2_PACKAGE_HAS_LIBGLES
|
||||
select BR2_PACKAGE_HAS_LIBOPENCL
|
||||
select BR2_PACKAGE_HAS_LIBVULKAN
|
||||
select BR2_PACKAGE_MESA3D
|
||||
select BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER_PVR
|
||||
help
|
||||
Userspace libraries for Imagination PowerGPU GPU on StarFive platforms
|
||||
|
||||
It contains libraries and headers for GLES, OpenCL, and
|
||||
Vulkan. It also contains a DRI plugin for X11. It also
|
||||
contains a plugin for DirectFB-1.4.0.
|
||||
|
||||
This library is provided by StarFive as-is and doesn't have
|
||||
an upstream.
|
||||
|
||||
if BR2_PACKAGE_IMG_GPU_POWERVR
|
||||
|
||||
choice
|
||||
prompt "Output option"
|
||||
help
|
||||
There are two versions of this library: one for
|
||||
direct framebuffer access, one for X11 rendering.
|
||||
Choose here which version to install.
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_X11
|
||||
bool "X11"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
# The i.MX8 blob doesn't support X11 output
|
||||
depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
|
||||
select BR2_PACKAGE_XLIB_LIBXDAMAGE
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT
|
||||
select BR2_PACKAGE_XLIB_LIBXFIXES
|
||||
|
||||
comment "X11 backend needs Xorg package"
|
||||
depends on !BR2_PACKAGE_XORG7
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_FB
|
||||
bool "Framebuffer"
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_WL
|
||||
bool "Wayland"
|
||||
select BR2_PACKAGE_WAYLAND
|
||||
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT
|
||||
string
|
||||
default "x11" if BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_X11
|
||||
default "fb" if BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_FB
|
||||
default "wayland" if BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_WL
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBEGL
|
||||
default "img-gpu-powervr"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGLES
|
||||
default "img-gpu-powervr"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBOPENCL
|
||||
default "img-gpu-powervr"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBVULKAN
|
||||
default "img-gpu-powervr"
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_EXAMPLES
|
||||
bool "install examples"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
Copy the PowerVR examples to the target.
|
||||
|
||||
Warning: examples take approximately 150 MB of disk space.
|
||||
|
||||
comment "img-gpu-powervr-examples need a toolchain w/ C++ support"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_IMG_GPU_POWERVR_GMEM_INFO
|
||||
bool "install gmem_info tool"
|
||||
help
|
||||
Copy the gmem_info tool to the target which provides
|
||||
information about GPU memory consumption.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally calculated
|
||||
# sha256 1324b1aaf190110b80ad9a6f6533f4f50dce9e9ab8d49d8503f59764b151d219 imx-gpu-viv-6.4.3.p2.0-aarch32.bin
|
||||
# sha256 003c30baefb1655790b475c3cdfa5cefbf81ea89ef37c6649b64f151dd23a52e imx-gpu-viv-6.4.3.p2.0-aarch64.bin
|
||||
# sha256 ea58636bf34f589048fcd46e38497c47229fde8498df086ff5fb52f9ef8e15ee COPYING
|
||||
# sha256 50099e283cfd307f84f159aeb1a6f462351320273dbcdb80d7f2c9db0494b71c EULA
|
||||
@@ -0,0 +1,99 @@
|
||||
################################################################################
|
||||
#
|
||||
# img-gpu-powervr
|
||||
#
|
||||
# This file is for Imagination PowerVR GPU, modified from freescale-imx/imx-gpu-viv
|
||||
#
|
||||
# Windsome Zeng <windsome.zeng@starfivetech.com>
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# ifeq ($(BR2_aarch64),y)
|
||||
# IMG_GPU_POWERVR_VERSION = 6.4.3.p2.0-aarch64
|
||||
# else
|
||||
# IMG_GPU_POWERVR_VERSION = 6.4.3.p2.0-aarch32
|
||||
# endif
|
||||
# IMG_GPU_POWERVR_SITE = $(FREESCALE_IMX_SITE)
|
||||
# IMG_GPU_POWERVR_SOURCE = imx-gpu-viv-$(IMG_GPU_POWERVR_VERSION).bin
|
||||
|
||||
IMG_GPU_POWERVR_INSTALL_STAGING = YES
|
||||
|
||||
IMG_GPU_POWERVR_LICENSE = Strictly Confidential
|
||||
IMG_GPU_POWERVR_REDISTRIBUTE = NO
|
||||
|
||||
IMG_GPU_POWERVR_PROVIDES = libgles libopencl
|
||||
IMG_GPU_POWERVR_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT))
|
||||
|
||||
ifeq ($(IMG_GPU_POWERVR_LIB_TARGET),x11)
|
||||
# The libGAL.so library provided by imx-gpu-viv uses X functions. Packages
|
||||
# may want to link against libGAL.so (QT5 Base with OpenGL and X support
|
||||
# does so). For this to work we need build dependencies to libXdamage,
|
||||
# libXext and libXfixes so that X functions used in libGAL.so are referenced.
|
||||
IMG_GPU_POWERVR_DEPENDENCIES += xlib_libXdamage xlib_libXext xlib_libXfixes
|
||||
endif
|
||||
|
||||
# Libraries are linked against libdrm, except framebuffer output on ARM
|
||||
ifneq ($(IMG_GPU_POWERVR_LIB_TARGET)$(BR2_riscv),fby)
|
||||
IMG_GPU_POWERVR_DEPENDENCIES += libdrm
|
||||
endif
|
||||
|
||||
ifeq ($(IMG_GPU_POWERVR_LIB_TARGET),wayland)
|
||||
IMG_GPU_POWERVR_DEPENDENCIES += wayland
|
||||
endif
|
||||
|
||||
# define IMG_GPU_POWERVR_EXTRACT_CMDS
|
||||
# $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMG_GPU_POWERVR_DL_DIR)/$(IMG_GPU_POWERVR_SOURCE))
|
||||
# endef
|
||||
|
||||
# ifeq ($(IMG_GPU_POWERVR_LIB_TARGET),fb)
|
||||
# define IMG_GPU_POWERVR_FIXUP_PKGCONFIG
|
||||
# ln -sf egl_linuxfb.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
|
||||
# endef
|
||||
# else ifeq ($(IMG_GPU_POWERVR_LIB_TARGET),wayland)
|
||||
# define IMG_GPU_POWERVR_FIXUP_PKGCONFIG
|
||||
# ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
|
||||
# endef
|
||||
# else ifeq ($(IMG_GPU_POWERVR_LIB_TARGET),x11)
|
||||
# define IMG_GPU_POWERVR_FIXUP_PKGCONFIG
|
||||
# $(foreach lib,egl gbm glesv1_cm glesv2 vg, \
|
||||
# ln -sf $(lib)_x11.pc $(@D)/gpu-core/usr/lib/pkgconfig/$(lib).pc
|
||||
# )
|
||||
# endef
|
||||
# endif
|
||||
|
||||
# Instead of building, we fix up the inconsistencies that exist
|
||||
# in the upstream archive here. We also remove unused backend files.
|
||||
# Make sure these commands are idempotent.
|
||||
# define IMG_GPU_POWERVR_BUILD_CMDS
|
||||
# cp -dpfr $(@D)/gpu-core/usr/lib/$(IMG_GPU_POWERVR_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
|
||||
# $(foreach backend,fb x11 wayland, \
|
||||
# $(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
|
||||
# )
|
||||
# $(IMG_GPU_POWERVR_FIXUP_PKGCONFIG)
|
||||
# endef
|
||||
#
|
||||
# define IMG_GPU_POWERVR_INSTALL_STAGING_CMDS
|
||||
# cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr
|
||||
# endef
|
||||
|
||||
# ifeq ($(BR2_PACKAGE_IMG_GPU_POWERVR_EXAMPLES),y)
|
||||
# define IMG_GPU_POWERVR_INSTALL_EXAMPLES
|
||||
# mkdir -p $(TARGET_DIR)/usr/share/examples/
|
||||
# cp -r $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/
|
||||
# endef
|
||||
# endif
|
||||
#
|
||||
# ifeq ($(BR2_PACKAGE_IMG_GPU_POWERVR_GMEM_INFO),y)
|
||||
# define IMG_GPU_POWERVR_INSTALL_GMEM_INFO
|
||||
# cp -dpfr $(@D)/gpu-tools/gmem-info/usr/bin/* $(TARGET_DIR)/usr/bin/
|
||||
# endef
|
||||
# endif
|
||||
|
||||
# define IMG_GPU_POWERVR_INSTALL_TARGET_CMDS
|
||||
# $(IMG_GPU_POWERVR_INSTALL_EXAMPLES)
|
||||
# $(IMG_GPU_POWERVR_INSTALL_GMEM_INFO)
|
||||
# cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
|
||||
# $(INSTALL) -D -m 0644 $(@D)/gpu-core/etc/Vivante.icd $(TARGET_DIR)/etc/OpenCL/vendors/Vivante.icd
|
||||
# endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user