This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,118 @@
This patch adjusts the omap3630 portion of the powervr driver to use the new
clk kernel api.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
[yann.morin.1998@free.fr: rebased ontop of 5.01.00.01]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c
--- ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-12-23 15:44:20.000000000 +0100
+++ ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2014-02-26 19:17:39.829571846 +0100
@@ -182,6 +182,49 @@
@Return PVRSRV_ERROR
******************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
+int clk_disable_unprepare(struct clk *clk)
+{
+ return clk_disable(clk);
+}
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+int clk_disable_unprepare(struct clk *clk)
+{
+ res = clk_disable(clk);
+ if (res < 0)
+ return res;
+
+ res = clk_unprepare(clk);
+ if (ret < 0)
+ return res;
+
+ return 0;
+}
+#endif
+
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
+int clk_prepare_enable(struct clk *clk)
+{
+ return clk_enable(clk);
+}
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+int clk_prepare_enable(struct clk *clk)
+{
+ res = clk_prepare(clk);
+ if (ret < 0)
+ return res;
+
+ res = clk_enable(clk);
+ if (res < 0) {
+ clk_unprepare(clk);
+ return res;
+ }
+
+ return 0;
+}
+#endif
+
PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
{
#if !defined(NO_HARDWARE)
@@ -198,7 +241,7 @@
#if !defined(PM_RUNTIME_SUPPORT)
PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks"));
- res=clk_enable(psSysSpecData->psSGX_FCK);
+ res=clk_prepare_enable(psSysSpecData->psSGX_FCK);
if (res < 0)
{
PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res));
@@ -324,7 +367,7 @@
PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks"));
#if !defined(PM_RUNTIME_SUPPORT)
- clk_disable(psSysSpecData->psSGX_FCK);
+ clk_disable_unprepare(psSysSpecData->psSGX_FCK);
#endif
SysDisableSGXInterrupts(psSysData);
@@ -540,14 +583,14 @@
rate = clk_get_rate(psSysSpecData->psGPT11_FCK);
PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate)));
- res = clk_enable(psSysSpecData->psGPT11_FCK);
+ res = clk_prepare_enable(psSysSpecData->psGPT11_FCK);
if (res < 0)
{
PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 functional clock (%d)", res));
goto ExitError;
}
- res = clk_enable(psSysSpecData->psGPT11_ICK);
+ res = clk_prepare_enable(psSysSpecData->psGPT11_ICK);
if (res < 0)
{
PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res));
@@ -610,9 +653,9 @@
ExitDisableGPT11ICK:
#if defined(PVR_OMAP4_TIMING_PRCM)
- clk_disable(psSysSpecData->psGPT11_ICK);
+ clk_disable_unprepare(psSysSpecData->psGPT11_ICK);
ExitDisableGPT11FCK:
- clk_disable(psSysSpecData->psGPT11_FCK);
+ clk_disable_unprepare(psSysSpecData->psGPT11_FCK);
ExitError:
#endif /* defined(PVR_OMAP4_TIMING_PRCM) */
eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED;
@@ -664,9 +707,9 @@
psSysSpecData->sTimerRegPhysBase.uiAddr = 0;
#endif
#if defined(PVR_OMAP4_TIMING_PRCM)
- clk_disable(psSysSpecData->psGPT11_ICK);
+ clk_disable_unprepare(psSysSpecData->psGPT11_ICK);
- clk_disable(psSysSpecData->psGPT11_FCK);
+ clk_disable_unprepare(psSysSpecData->psGPT11_FCK);
#endif /* defined(PVR_OMAP4_TIMING_PRCM) */
}
#endif /* PVR_OMAP_USE_DM_TIMER_API */

View File

@@ -0,0 +1,21 @@
Since commit a73fdc647417699833f22d0f239affe22e062827 in the kernel,
omap_dss_device's 'output' is renamed 'src'.
Fix build with at least es5.x selected (AM35xx).
Signed-off-by: Hadrien Boutteville <hadrien.boutteville@gmail.com>
--- a/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c
+++ b/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c
@@ -176,8 +176,10 @@
#define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev) != NULL ? (dev)->driver : NULL
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->manager : NULL
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0))
#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->output->manager : NULL
+#else
+#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->src->manager : NULL
#endif
#define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync)

View File

@@ -0,0 +1,19 @@
Patch to add modules_install target to the modules makefile. This makes
installation a little easier.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
----
Index: ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile
===================================================================
--- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/Makefile 2013-03-07 11:00:11.000000000 -0600
+++ ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile 2013-05-23 01:36:29.356676281 -0500
@@ -479,6 +479,9 @@
all:
$(MAKE) -C $(KERNELDIR) M=`pwd` $*
+install:
+ $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install
+
clean:
@find . -name "*.o" -exec rm -r {} \;
@find . -name "*.ko" -exec rm -r {} \;

84
package/ti-gfx/Config.in Normal file
View File

@@ -0,0 +1,84 @@
config BR2_PACKAGE_TI_GFX
bool "ti-gfx"
depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBGLES
select BR2_PACKAGE_HAS_POWERVR
select BR2_PACKAGE_FBSET if !BR2_PACKAGE_BUSYBOX # Runtime dependency only
select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
help
Graphics libraries for TI boards using SGX acceleration.
Supports OMAP35xx, DM37xx/AM37xx, DM816x, DM814x, AM335x and
AM43xx.
For newer CPUs or kernels use the ti-sgx-{km,um} packages.
http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/
if BR2_PACKAGE_TI_GFX
config BR2_PACKAGE_PROVIDES_LIBEGL
default "ti-gfx"
config BR2_PACKAGE_PROVIDES_LIBGLES
default "ti-gfx"
config BR2_PACKAGE_PROVIDES_POWERVR
default "ti-gfx"
config BR2_PACKAGE_TI_GFX_DEBUG
bool "enable debug support"
help
Turns on debugging in the kernel module, install libraries
built with debugging enabled, installs various tests and
installs esrev script.
config BR2_PACKAGE_TI_GFX_DEMOS
bool "install demos"
default y
help
Install the OGLES2ChameleonMan and OGLES2MagicLantern demos
config BR2_PACKAGE_TI_GFX_EGLIMAGE
bool "install eglimage version of libraries"
help
Installs OpenGL libaries which support the eglimage api.
choice
prompt "Target"
default BR2_PACKAGE_TI_GFX_ES3
help
Select the SOC for which you would like to install
drivers. Please use the chart at
http://processors.wiki.ti.com/index.php/OMAP35x_Graphics_SDK_Getting_Started_Guide
config BR2_PACKAGE_TI_GFX_ES3
bool "es3.x (OMAP35xx, AM35xx Rev 3.1+)"
help
OMAP35xx, AM35xx Rev 3.1+
config BR2_PACKAGE_TI_GFX_ES5
bool "es5.x (AM37xx, DM37xx)"
help
AM37xx, DM37xx
config BR2_PACKAGE_TI_GFX_ES6
bool "es6.x (AM387x, DMA814x, AM389x, DM816x)"
help
AM387x, DM814x, AM389x, DM816x
config BR2_PACKAGE_TI_GFX_ES8
bool "es8.x (AM335x)"
help
AM335x
endchoice
endif
comment "ti-gfx needs a glibc toolchain and a Linux kernel to be built"
depends on BR2_arm
depends on !(BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC)

53
package/ti-gfx/S80ti-gfx Normal file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
start() {
echo "ti-gfx: starting pvr driver"
BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')"
YRES="$(fbset | awk '/geom/ {print $3}')"
# Set RGBA ordering to something the drivers like
if [ "$BITSPERPIXEL" = "32" ] ; then
fbset -rgba 8/16,8/8,8/0,8/24
fi
# Try to enable triple buffering when there's enough VRAM
fbset -vyres $(( YRES*3 ))
modprobe pvrsrvkm
modprobe omaplfb
modprobe bufferclass_ti
pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices)
rm -f /dev/pvrsrvkm
mknod /dev/pvrsrvkm c $pvr_maj 0
chmod 600 /dev/pvrsrvkm
if ! /usr/bin/pvrsrvctl --start --no-module; then
echo "ti-gfx: unable to start server"
fi
}
stop() {
echo "ti-gfx: stopping pvr driver"
rmmod bufferclass_ti
rmmod omaplfb
rmmod pvrsrvkm
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "ti-gfx: Please use start, stop, or restart."
exit 1
;;
esac

11
package/ti-gfx/egl.pc Normal file
View File

@@ -0,0 +1,11 @@
prefix=/usr/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: egl
Description: TI Graphics SDK implementation of EGL
Version: 1.9.2188537
Requires:
Libs: -L${libdir} -lEGL -lGLESv2 -lIMGegl
Cflags: -I${includedir}

60
package/ti-gfx/esrev.sh Normal file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
# Debug script to determine proper ES revision for the current board. The
# pvrsrvkm module must be insmoded before attempting to get the es rev.
machine_id() { # return the machine ID
awk 'BEGIN { FS=": " } /Hardware/ \
{ gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
}
if [ "$(machine_id)" = "ti8168evm" ] ; then
CPUTYPE=TI816x
elif [ "$(machine_id)" = "am335xevm" ] ; then
CPUTYPE=TI33XX
else
CPUTYPE=$(devmem 0x4800244c | sed -e 's/0x00005C00/OMAP3503/' \
-e 's/0x00001C00/OMAP3515/' \
-e 's/0x00004C00/OMAP3525/' \
-e 's/0x00000C00/OMAP3530/' \
-e 's/0x00005E00/OMAP3503/' \
-e 's/0x00001E00/OMAP3515/' \
-e 's/0x00004E00/OMAP3525/' \
-e 's/0x00000E00/OMAP3530/' \
-e 's/0x00000CC0/OMAP3530/' )
if [[ "$(echo $CPUTYPE | grep OMAP)" == "" ]]; then
echo "Unable to determine CPU type"
exit 1
fi
fi
case $CPUTYPE in
"OMAP3530")
devmem 0x48004B48 w 0x2
devmem 0x48004B10 w 0x1
devmem 0x48004B00 w 0x2
ES_REVISION="$(devmem 0x50000014 | sed -e s:0x00010205:5: \
-e s:0x00010201:3: -e s:0x00010003:2:)"
;;
"TI33XX")
devmem 0x44e01104 w 0x0
devmem 0x44e00904 w 0x2
ES_REVISION="$(devmem 0x56000014 | sed -e s:0x00010205:8:)"
;;
"TI816x")
devmem 0x48180F04 w 0x0
devmem 0x48180900 w 0x2
devmem 0x48180920 w 0x2
ES_REVISION="$(devmem 0x56000014 | sed -e s:0x00010205:6: \
-e s:0x00010201:3: -e s:0x00010003:2:)"
;;
*)
echo Unable to determine SGX hardware
exit 2
;;
esac
echo $ES_REVISION

11
package/ti-gfx/glesv2.pc Normal file
View File

@@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: glesv2
Description: TI Graphics SDK implementation of OpenGL ESv2
Version: 1.9.2188537
Requires:
Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
Cflags: -I${includedir}

View File

@@ -0,0 +1,2 @@
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so

View File

@@ -0,0 +1,3 @@
# Locally computed:
sha256 54641222cdb49b03f996cbd6412de227198d9e084f5647d706bbf4217e8cdb07 Graphics_SDK_setuplinux_hardfp_5_01_01_02.bin
sha256 99dae9d33790c87860e828505ac07c5b864ef65d8372b39117704db6b78494ff Graphics_SDK_setuplinux_softfp_5_01_00_01.bin

212
package/ti-gfx/ti-gfx.mk Normal file
View File

@@ -0,0 +1,212 @@
################################################################################
#
# ti-gfx
#
################################################################################
# SDK 5_01_01_01 only support EABIhf so we downgrade to 5_01_00_01 if EABIhf is
# not available.
ifeq ($(BR2_ARM_EABIHF),y)
TI_GFX_VERSION = 5_01_01_02
TI_GFX_SOURCE = Graphics_SDK_setuplinux_hardfp_$(TI_GFX_VERSION).bin
else
TI_GFX_VERSION = 5_01_00_01
TI_GFX_SOURCE = Graphics_SDK_setuplinux_softfp_$(TI_GFX_VERSION).bin
endif
TI_GFX_SO_VERSION = 1.10.2359475
TI_GFX_SITE = http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/$(TI_GFX_VERSION)/exports
TI_GFX_LICENSE = Technology / Software Publicly Available
TI_GFX_LICENSE_FILES = TSPA.txt
TI_GFX_INSTALL_STAGING = YES
TI_GFX_DEPENDENCIES = linux
TI_GFX_PROVIDES = libegl libgles powervr
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)
TI_GFX_OMAPES = 6.x
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
chmod +x $(TI_GFX_DL_DIR)/$(TI_GFX_SOURCE)
printf "Y\nY\n qY\n\n" | $(TI_GFX_DL_DIR)/$(TI_GFX_SOURCE) \
--prefix $(@D) \
--mode console
endef
define TI_GFX_BUILD_KM_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM all
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
$(TARGET_MAKE_ENV) $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM install
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
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
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))

View File

@@ -0,0 +1,11 @@
[Unit]
Description=TI graphics driver
[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/scripts/ti-gfx start
ExecStop=/usr/lib/systemd/scripts/ti-gfx stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target