initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
+103
View File
@@ -0,0 +1,103 @@
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
# Library binaries are linked against libdrm.so.2, except framebuffer
# output on ARM
select BR2_PACKAGE_LIBDRM if !(BR2_arm && BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB)
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBGLES
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 DRI plugin for X11. 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.
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 X11 rendering.
Choose here which version to install.
config BR2_PACKAGE_IMX_GPU_VIV_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
depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
bool "Framebuffer"
# The i.MX8 blob doesn't support FB output
depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
bool "Wayland"
select BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
endchoice
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT
string
default "x11" if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
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"
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
@@ -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,96 @@
################################################################################
#
# imx-gpu-viv
#
################################################################################
ifeq ($(BR2_aarch64),y)
IMX_GPU_VIV_VERSION = 6.4.3.p2.0-aarch64
else
IMX_GPU_VIV_VERSION = 6.4.3.p2.0-aarch32
endif
IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE)
IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION).bin
IMX_GPU_VIV_INSTALL_STAGING = YES
IMX_GPU_VIV_LICENSE = NXP Semiconductor Software License Agreement
IMX_GPU_VIV_LICENSE_FILES = EULA COPYING
IMX_GPU_VIV_REDISTRIBUTE = NO
IMX_GPU_VIV_PROVIDES = libegl libgles libopencl libopenvg
IMX_GPU_VIV_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT))
ifeq ($(IMX_GPU_VIV_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.
IMX_GPU_VIV_DEPENDENCIES += xlib_libXdamage xlib_libXext xlib_libXfixes
endif
# Libraries are linked against libdrm, except framebuffer output on ARM
ifneq ($(IMX_GPU_VIV_LIB_TARGET)$(BR2_arm),fby)
IMX_GPU_VIV_DEPENDENCIES += libdrm
endif
ifeq ($(IMX_GPU_VIV_LIB_TARGET),wayland)
IMX_GPU_VIV_DEPENDENCIES += wayland
endif
define IMX_GPU_VIV_EXTRACT_CMDS
$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_GPU_VIV_DL_DIR)/$(IMX_GPU_VIV_SOURCE))
endef
ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
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_LIB_TARGET),wayland)
define IMX_GPU_VIV_FIXUP_PKGCONFIG
ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
endef
else ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11)
define IMX_GPU_VIV_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 IMX_GPU_VIV_BUILD_CMDS
cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
$(foreach backend,fb x11 wayland, \
$(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
)
$(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
$(INSTALL) -D -m 0644 $(@D)/gpu-core/etc/Vivante.icd $(TARGET_DIR)/etc/OpenCL/vendors/Vivante.icd
endef
$(eval $(generic-package))