2013-07-22 07:56:13 +02:00
|
|
|
################################################################################
|
2013-07-15 23:44:19 +02:00
|
|
|
#
|
|
|
|
# ti-gfx
|
|
|
|
#
|
2013-07-22 07:56:13 +02:00
|
|
|
################################################################################
|
2013-07-15 23:44:19 +02:00
|
|
|
|
2014-06-10 23:50:38 +02:00
|
|
|
# SDK 5_01_01_01 only support EABIhf so we downgrade to 5_01_00_01 if EABIhf is
|
|
|
|
# not available.
|
2013-07-18 08:50:34 +02:00
|
|
|
ifeq ($(BR2_ARM_EABIHF),y)
|
2015-04-02 19:43:55 +02:00
|
|
|
TI_GFX_VERSION = 5_01_01_02
|
2014-02-13 19:38:33 +01:00
|
|
|
TI_GFX_SOURCE = Graphics_SDK_setuplinux_hardfp_$(TI_GFX_VERSION).bin
|
2013-07-15 23:44:19 +02:00
|
|
|
else
|
2014-06-10 23:50:38 +02:00
|
|
|
TI_GFX_VERSION = 5_01_00_01
|
2014-02-13 19:38:33 +01:00
|
|
|
TI_GFX_SOURCE = Graphics_SDK_setuplinux_softfp_$(TI_GFX_VERSION).bin
|
2013-07-15 23:44:19 +02:00
|
|
|
endif
|
|
|
|
|
2014-06-10 23:50:38 +02:00
|
|
|
TI_GFX_SO_VERSION = 1.10.2359475
|
2014-07-31 10:46:58 +02:00
|
|
|
TI_GFX_SITE = http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/$(TI_GFX_VERSION)/exports
|
2013-07-15 23:44:19 +02:00
|
|
|
TI_GFX_LICENSE = Technology / Software Publicly Available
|
|
|
|
TI_GFX_LICENSE_FILES = TSPA.txt
|
|
|
|
TI_GFX_INSTALL_STAGING = YES
|
|
|
|
|
|
|
|
TI_GFX_DEPENDENCIES = linux
|
2015-09-03 14:54:21 +02:00
|
|
|
|
2014-05-15 19:37:05 +02:00
|
|
|
TI_GFX_PROVIDES = libegl libgles powervr
|
2013-07-15 23:44:19 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_ES3),y)
|
|
|
|
TI_GFX_OMAPES = 3.x
|
|
|
|
TI_GFX_PLATFORM = omap3
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_ES5),y)
|
|
|
|
TI_GFX_OMAPES = 5.x
|
|
|
|
TI_GFX_PLATFORM = omap3630
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_ES6),y)
|
2013-09-02 17:18:48 +02:00
|
|
|
TI_GFX_OMAPES = 6.x
|
2013-07-15 23:44:19 +02:00
|
|
|
TI_GFX_PLATFORM = ti81xx
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_ES8),y)
|
|
|
|
TI_GFX_OMAPES = 8.x
|
|
|
|
TI_GFX_PLATFORM = ti335x
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG),y)
|
|
|
|
TI_GFX_DEBUG_LIB = dbg
|
|
|
|
TI_GFX_DEBUG_KM = debug
|
|
|
|
else
|
|
|
|
TI_GFX_DEBUG_LIB = rel
|
|
|
|
TI_GFX_DEBUG_KM = release
|
|
|
|
endif
|
|
|
|
|
|
|
|
TI_GFX_BIN_PATH = gfx_$(TI_GFX_DEBUG_LIB)_es$(TI_GFX_OMAPES)
|
|
|
|
|
|
|
|
TI_GFX_KM_MAKE_OPTS = \
|
|
|
|
$(LINUX_MAKE_FLAGS) \
|
|
|
|
BUILD=$(TI_GFX_DEBUG_KM) \
|
|
|
|
TI_PLATFORM=$(TI_GFX_PLATFORM) \
|
|
|
|
OMAPES=$(TI_GFX_OMAPES) \
|
|
|
|
SUPPORT_XORG=0 \
|
|
|
|
KERNELDIR=$(LINUX_DIR)
|
|
|
|
|
|
|
|
TI_GFX_DEMO_MAKE_OPTS = \
|
|
|
|
PLATFORM=LinuxARMV7 \
|
|
|
|
X11BUILD=0 \
|
|
|
|
PLAT_CC="$(TARGET_CC)" \
|
|
|
|
PLAT_CPP="$(TARGET_CXX)" \
|
|
|
|
PLAT_AR="$(TARGET_AR)"
|
|
|
|
|
|
|
|
# The only required binary is pvrsrvctl all others are optional
|
|
|
|
TI_GFX_BIN = pvrsrvctl
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG),y)
|
|
|
|
TI_GFX_BIN += \
|
|
|
|
eglinfo ews_server ews_server_es2 ews_test_gles1 ews_test_gles2 \
|
|
|
|
ews_test_swrender gles1test1 gles2test1 pvr2d_test services_test \
|
|
|
|
sgx_blit_test sgx_clipblit_test sgx_flip_test sgx_init_test \
|
|
|
|
sgx_render_flip_test xeglinfo xgles1test1 xgles2test1 xmultiegltest
|
|
|
|
endif
|
|
|
|
|
|
|
|
TI_GFX_LIBS = \
|
|
|
|
libews libpvr2d libpvrEWS_WSEGL libpvrPVR2D_BLITWSEGL libpvrPVR2D_DRIWSEGL \
|
|
|
|
libpvrPVR2D_FLIPWSEGL libpvrPVR2D_FRONTWSEGL libpvrPVR2D_LINUXFBWSEGL \
|
|
|
|
libPVRScopeServices libsrv_init libsrv_um libusc pvr_drv
|
|
|
|
|
|
|
|
TI_GFX_EGLIMAGE_LIBS = \
|
|
|
|
libEGL libGLES_CM libGLESv2 libglslcompiler libIMGegl
|
|
|
|
|
|
|
|
TI_GFX_DEMOS = ChameleonMan MagicLantern
|
|
|
|
TI_GFX_DEMOS_LOC = GFX_Linux_SDK/OGLES2/SDKPackage/Demos
|
|
|
|
TI_GFX_DEMOS_MAKE_LOC = OGLES2/Build/LinuxGeneric
|
|
|
|
TI_GFX_DEMOS_BIN_LOC = OGLES2/Build/LinuxARMV7/ReleaseRaw/
|
|
|
|
|
|
|
|
TI_GFX_HDR_DIRS = OGLES2/EGL OGLES2/EWS OGLES2/GLES2 OGLES2/KHR \
|
|
|
|
OGLES/GLES bufferclass_ti/ pvr2d/ wsegl/
|
|
|
|
|
|
|
|
define TI_GFX_EXTRACT_CMDS
|
2018-04-02 15:09:24 +02:00
|
|
|
chmod +x $(TI_GFX_DL_DIR)/$(TI_GFX_SOURCE)
|
|
|
|
printf "Y\nY\n qY\n\n" | $(TI_GFX_DL_DIR)/$(TI_GFX_SOURCE) \
|
2013-07-15 23:44:19 +02:00
|
|
|
--prefix $(@D) \
|
|
|
|
--mode console
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TI_GFX_BUILD_KM_CMDS
|
2016-10-17 18:06:47 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM all
|
2013-07-15 23:44:19 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS),y)
|
|
|
|
define TI_GFX_BUILD_DEMO_CMDS
|
|
|
|
$(foreach demo, $(TI_GFX_DEMOS), \
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE1) -C \
|
|
|
|
$(@D)/$(TI_GFX_DEMOS_LOC)/$(demo)/$(TI_GFX_DEMOS_MAKE_LOC) \
|
|
|
|
$(TI_GFX_DEMO_MAKE_OPTS) all
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define TI_GFX_BUILD_CMDS
|
|
|
|
$(TI_GFX_BUILD_KM_CMDS)
|
|
|
|
$(TI_GFX_BUILD_DEMO_CMDS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Install libs
|
|
|
|
# argument 1 is the location to install to (e.g. STAGING_DIR, TARGET_DIR)
|
|
|
|
define TI_GFX_INSTALL_LIBS
|
|
|
|
$(foreach lib,$(TI_GFX_LIBS),
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib).so \
|
|
|
|
$(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION); \
|
|
|
|
ln -sf $(lib).so.$(TI_GFX_SO_VERSION) \
|
|
|
|
$(1)/usr/lib/$(lib).so
|
|
|
|
)
|
|
|
|
$(foreach lib,$(TI_GFX_EGLIMAGE_LIBS),
|
|
|
|
$(if $(BR2_PACKAGE_TI_GFX_EGLIMAGE),
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib)_eglimage.so \
|
|
|
|
$(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION);
|
|
|
|
,
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib).so \
|
|
|
|
$(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION);
|
|
|
|
)
|
|
|
|
ln -sf $(lib).so.$(TI_GFX_SO_VERSION) \
|
|
|
|
$(1)/usr/lib/$(lib).so
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TI_GFX_INSTALL_STAGING_CMDS
|
|
|
|
$(foreach incdir,$(TI_GFX_HDR_DIRS),
|
|
|
|
$(INSTALL) -d $(STAGING_DIR)/usr/include/$(notdir $(incdir)); \
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/include/$(incdir)/*.h \
|
|
|
|
$(STAGING_DIR)/usr/include/$(notdir $(incdir))/
|
|
|
|
)
|
|
|
|
$(call TI_GFX_INSTALL_LIBS,$(STAGING_DIR))
|
|
|
|
|
|
|
|
$(INSTALL) -D -m 0644 package/ti-gfx/egl.pc \
|
|
|
|
$(STAGING_DIR)/usr/lib/pkgconfig/egl.pc
|
|
|
|
$(INSTALL) -D -m 0644 package/ti-gfx/glesv2.pc \
|
|
|
|
$(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TI_GFX_INSTALL_KM_CMDS
|
2016-10-17 18:06:47 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM install
|
2013-07-15 23:44:19 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define TI_GFX_INSTALL_BINS_CMDS
|
|
|
|
$(foreach bin,$(TI_GFX_BIN),
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$(TI_GFX_BIN_PATH)/$(bin) \
|
|
|
|
$(TARGET_DIR)/usr/bin/$(bin)
|
|
|
|
)
|
|
|
|
$(if $(BR2_PACKAGE_TI_GFX_DEBUG),
|
|
|
|
$(INSTALL) -D -m 0755 package/ti-gfx/esrev.sh \
|
|
|
|
$(TARGET_DIR)/usr/sbin/esrev
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TI_GFX_INSTALL_CONF_CMDS
|
|
|
|
# libs use the following file for configuration.
|
|
|
|
$(INSTALL) -D -m 0644 package/ti-gfx/powervr.ini \
|
|
|
|
$(TARGET_DIR)/etc/powervr.ini
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS),y)
|
|
|
|
define TI_GFX_INSTALL_DEMOS_CMDS
|
|
|
|
$(foreach demo,$(TI_GFX_DEMOS),
|
|
|
|
$(INSTALL) -D -m 0755 \
|
|
|
|
$(@D)/$(TI_GFX_DEMOS_LOC)/$(demo)/$(TI_GFX_DEMOS_BIN_LOC)/OGLES2$(demo) \
|
|
|
|
$(TARGET_DIR)/usr/bin/OGLES2$(demo)
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define TI_GFX_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/ti-gfx/S80ti-gfx \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S80ti-gfx
|
|
|
|
endef
|
|
|
|
|
2015-05-23 12:07:32 +02:00
|
|
|
define TI_GFX_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 755 package/ti-gfx/S80ti-gfx \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/scripts/ti-gfx
|
|
|
|
$(INSTALL) -D -m 644 package/ti-gfx/ti-gfx.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/ti-gfx.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -sf ../../../../usr/lib/systemd/system/ti-gfx.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ti-gfx.service
|
|
|
|
endef
|
|
|
|
|
2013-07-15 23:44:19 +02:00
|
|
|
define TI_GFX_INSTALL_TARGET_CMDS
|
|
|
|
$(TI_GFX_INSTALL_KM_CMDS)
|
|
|
|
$(TI_GFX_INSTALL_BINS_CMDS)
|
|
|
|
$(call TI_GFX_INSTALL_LIBS,$(TARGET_DIR))
|
|
|
|
$(TI_GFX_INSTALL_CONF_CMDS)
|
|
|
|
$(TI_GFX_INSTALL_DEMOS_CMDS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|