Initial Commit
- initial default booting image
This commit is contained in:
112
package/freescale-imx/imx-gpu-viv/Config.in
Normal file
112
package/freescale-imx/imx-gpu-viv/Config.in
Normal file
@@ -0,0 +1,112 @@
|
||||
comment "imx-gpu-viv needs a glibc toolchain with armhf enabled"
|
||||
depends on BR2_arm
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF
|
||||
|
||||
comment "imx-gpu-viv needs a glibc toolchain"
|
||||
depends on BR2_aarch64
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV
|
||||
bool "imx-gpu-viv"
|
||||
# Pre-built binaries only available for ARM EABIhf
|
||||
depends on (BR2_arm && BR2_ARM_EABIHF) || BR2_aarch64
|
||||
# Library binaries are linked against libc.so.6
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_HAS_LIBEGL
|
||||
select BR2_PACKAGE_HAS_LIBGLES
|
||||
# gbm is only available in the aarch64 blobs
|
||||
select BR2_PACKAGE_HAS_LIBGBM if BR2_aarch64
|
||||
select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF if BR2_aarch64
|
||||
select BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT if BR2_aarch64
|
||||
select BR2_PACKAGE_HAS_LIBOPENCL
|
||||
select BR2_PACKAGE_HAS_LIBOPENVG
|
||||
help
|
||||
Userspace libraries for Vivante GPU on i.MX platforms
|
||||
|
||||
It contains libraries and headers for GLES, OpenCL, and
|
||||
OpenVG. It also contains a plugin for DirectFB-1.4.0, but
|
||||
that doesn't work together with buildroot's DirectFB
|
||||
version.
|
||||
|
||||
This library is provided by Freescale as-is and doesn't have
|
||||
an upstream.
|
||||
|
||||
# Library binaries are linked against libdrm.so.2 and libwayland,
|
||||
# except framebuffer output on ARM
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND
|
||||
bool
|
||||
select BR2_PACKAGE_LIBDRM
|
||||
select BR2_PACKAGE_WAYLAND
|
||||
|
||||
if BR2_PACKAGE_IMX_GPU_VIV
|
||||
|
||||
choice
|
||||
prompt "Output option"
|
||||
help
|
||||
There are two versions of this library: one for
|
||||
direct framebuffer access, one for wayland rendering.
|
||||
Choose here which version to install.
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
|
||||
bool "Framebuffer"
|
||||
# Yes, the ARM64 framebuffer libraries link against
|
||||
# libdrm/libwayland.
|
||||
select BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND if BR2_aarch64
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
bool "Wayland"
|
||||
select BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT
|
||||
string
|
||||
default "fb" if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
|
||||
default "wayland" if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBEGL
|
||||
default "imx-gpu-viv"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGLES
|
||||
default "imx-gpu-viv"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBOPENCL
|
||||
default "imx-gpu-viv"
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBOPENVG
|
||||
default "imx-gpu-viv"
|
||||
|
||||
if BR2_aarch64
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGBM
|
||||
default "imx-gpu-viv"
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_PLATFORM
|
||||
string
|
||||
default "mx8mn" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
|
||||
default "mx8mp" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
|
||||
default "mx8mq" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
|
||||
default "mx8qm" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
|
||||
default "mx8qxp" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES
|
||||
bool "install examples"
|
||||
# example binaries are linked against libstdc++.so.6
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
Copy the Vivante examples to the target.
|
||||
|
||||
Warning: examples take approximately 150 MB of disk space.
|
||||
|
||||
comment "imx-gpu-viv-examples need a toolchain w/ C++ support"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO
|
||||
bool "install gmem_info tool"
|
||||
help
|
||||
Copy the gmem_info tool to the target which provides
|
||||
information about GPU memory consumption.
|
||||
|
||||
endif
|
||||
6
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash
Normal file
6
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# Locally calculated
|
||||
sha256 19a6377c817e0049f8b6bddb78badc18adccb2075429c27c89aee95d44196113 imx-gpu-viv-6.4.11.p4.2-aarch32-846e12e.bin
|
||||
sha256 aa120f37d9010fbddabc60387300fabaf43b2cf30894b6e7b5973947ec6bbe62 imx-gpu-viv-6.4.11.p4.2-aarch64-846e12e.bin
|
||||
sha256 3001cf84018c5cb10d183a678f6ec8a928c797616ba06b398d7ca93c0779aaa2 COPYING
|
||||
sha256 a829b109a0a406a6a2fec19975a332feca225098ce66bfab2220c6608db8fce5 EULA
|
||||
sha256 ab20fa3f527fce99087d8d3cd4e2cf4b9cfdfaaa98b3d766a2b5953a981323d3 SCR-imx-gpu-viv.txt
|
||||
103
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
Normal file
103
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
Normal file
@@ -0,0 +1,103 @@
|
||||
################################################################################
|
||||
#
|
||||
# imx-gpu-viv
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IMX_GPU_VIV_REVISION = 846e12e
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
IMX_GPU_VIV_VERSION = 6.4.11.p4.2-aarch64
|
||||
else
|
||||
IMX_GPU_VIV_VERSION = 6.4.11.p4.2-aarch32
|
||||
endif
|
||||
IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE)
|
||||
IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION)-$(IMX_GPU_VIV_REVISION).bin
|
||||
|
||||
IMX_GPU_VIV_INSTALL_STAGING = YES
|
||||
|
||||
IMX_GPU_VIV_LICENSE = NXP Semiconductor Software License Agreement
|
||||
IMX_GPU_VIV_LICENSE_FILES = EULA COPYING SCR-imx-gpu-viv.txt
|
||||
IMX_GPU_VIV_REDISTRIBUTE = NO
|
||||
|
||||
IMX_GPU_VIV_PROVIDES = libegl libgles libopencl libopenvg
|
||||
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
IMX_GPU_VIV_PROVIDES += libgbm
|
||||
endif
|
||||
|
||||
IMX_GPU_VIV_OUTPUT = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT))
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND),y)
|
||||
IMX_GPU_VIV_DEPENDENCIES += libdrm wayland
|
||||
IMX_GPU_VIV_LIBDIR = wayland
|
||||
else
|
||||
IMX_GPU_VIV_LIBDIR = fb
|
||||
endif
|
||||
|
||||
define IMX_GPU_VIV_EXTRACT_CMDS
|
||||
$(call NXP_EXTRACT_HELPER,$(IMX_GPU_VIV_DL_DIR)/$(IMX_GPU_VIV_SOURCE))
|
||||
endef
|
||||
|
||||
# The package comes with multiple versions of egl.pc,
|
||||
# depending on the output the original egl.pc is replaced
|
||||
# with a symlink:
|
||||
# - arm/frambuffer: symlink to egl_linuxfb.pc
|
||||
# - aarch64/framebuffer: original egl.pc without a symlink
|
||||
# - wayland: symblink to egl_wayland.pc
|
||||
ifeq ($(IMX_GPU_VIV_OUTPUT):$(BR2_arm),fb:y)
|
||||
define IMX_GPU_VIV_FIXUP_PKGCONFIG
|
||||
ln -sf egl_linuxfb.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
|
||||
endef
|
||||
else ifeq ($(IMX_GPU_VIV_OUTPUT),wayland)
|
||||
define IMX_GPU_VIV_FIXUP_PKGCONFIG
|
||||
ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
|
||||
endef
|
||||
endif
|
||||
|
||||
IMX_GPU_VIV_PLATFORM_DIR = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_PLATFORM))
|
||||
ifneq ($(IMX_GPU_VIV_PLATFORM_DIR),)
|
||||
define IMX_GPU_VIV_COPY_PLATFORM
|
||||
cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_PLATFORM_DIR)/* $(@D)/gpu-core/usr/lib/
|
||||
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 IMX_GPU_VIV_BUILD_CMDS
|
||||
cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIBDIR)/* $(@D)/gpu-core/usr/lib/
|
||||
$(foreach backend,fb wayland, \
|
||||
$(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
|
||||
)
|
||||
$(IMX_GPU_VIV_COPY_PLATFORM)
|
||||
$(foreach platform,mx8mn mx8mp mx8mq mx8qm mx8qxp mx8ulp, \
|
||||
$(RM) -r $(@D)/gpu-core/usr/lib/$(platform)
|
||||
)
|
||||
$(IMX_GPU_VIV_FIXUP_PKGCONFIG)
|
||||
endef
|
||||
|
||||
define IMX_GPU_VIV_INSTALL_STAGING_CMDS
|
||||
cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES),y)
|
||||
define IMX_GPU_VIV_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_IMX_GPU_VIV_GMEM_INFO),y)
|
||||
define IMX_GPU_VIV_INSTALL_GMEM_INFO
|
||||
cp -dpfr $(@D)/gpu-tools/gmem-info/usr/bin/* $(TARGET_DIR)/usr/bin/
|
||||
endef
|
||||
endif
|
||||
|
||||
define IMX_GPU_VIV_INSTALL_TARGET_CMDS
|
||||
$(IMX_GPU_VIV_INSTALL_EXAMPLES)
|
||||
$(IMX_GPU_VIV_INSTALL_GMEM_INFO)
|
||||
cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
|
||||
cp -r $(@D)/gpu-core/etc/* $(TARGET_DIR)/etc
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user