1 ################################################################################
5 ################################################################################
7 # SDK 5_01_01_01 only support EABIhf so we downgrade to 5_01_00_01 if EABIhf is
9 ifeq ($(BR2_ARM_EABIHF
),y
)
10 TI_GFX_VERSION
= 5_01_01_02
11 TI_GFX_SOURCE
= Graphics_SDK_setuplinux_hardfp_
$(TI_GFX_VERSION
).bin
13 TI_GFX_VERSION
= 5_01_00_01
14 TI_GFX_SOURCE
= Graphics_SDK_setuplinux_softfp_
$(TI_GFX_VERSION
).bin
17 TI_GFX_SO_VERSION
= 1.10.2359475
18 TI_GFX_SITE
= http
://downloads.ti.com
/dsps
/dsps_public_sw
/sdo_sb
/targetcontent
/gfxsdk
/$(TI_GFX_VERSION
)/exports
19 TI_GFX_LICENSE
= Technology
/ Software Publicly Available
20 TI_GFX_LICENSE_FILES
= TSPA.txt
21 TI_GFX_INSTALL_STAGING
= YES
23 TI_GFX_DEPENDENCIES
= linux
25 TI_GFX_PROVIDES
= libegl libgles powervr
27 ifeq ($(BR2_PACKAGE_TI_GFX_ES3
),y
)
29 TI_GFX_PLATFORM
= omap3
31 ifeq ($(BR2_PACKAGE_TI_GFX_ES5
),y
)
33 TI_GFX_PLATFORM
= omap3630
35 ifeq ($(BR2_PACKAGE_TI_GFX_ES6
),y
)
37 TI_GFX_PLATFORM
= ti81xx
39 ifeq ($(BR2_PACKAGE_TI_GFX_ES8
),y
)
41 TI_GFX_PLATFORM
= ti335x
44 ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG
),y
)
45 TI_GFX_DEBUG_LIB
= dbg
46 TI_GFX_DEBUG_KM
= debug
48 TI_GFX_DEBUG_LIB
= rel
49 TI_GFX_DEBUG_KM
= release
52 TI_GFX_BIN_PATH
= gfx_
$(TI_GFX_DEBUG_LIB
)_es
$(TI_GFX_OMAPES
)
54 TI_GFX_KM_MAKE_OPTS
= \
56 BUILD
=$(TI_GFX_DEBUG_KM
) \
57 TI_PLATFORM
=$(TI_GFX_PLATFORM
) \
58 OMAPES
=$(TI_GFX_OMAPES
) \
60 KERNELDIR
=$(LINUX_DIR
)
62 TI_GFX_DEMO_MAKE_OPTS
= \
65 PLAT_CC
="$(TARGET_CC)" \
66 PLAT_CPP
="$(TARGET_CXX)" \
67 PLAT_AR
="$(TARGET_AR)"
69 # The only required binary is pvrsrvctl all others are optional
70 TI_GFX_BIN
= pvrsrvctl
72 ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG
),y
)
74 eglinfo ews_server ews_server_es2 ews_test_gles1 ews_test_gles2 \
75 ews_test_swrender gles1test1 gles2test1 pvr2d_test services_test \
76 sgx_blit_test sgx_clipblit_test sgx_flip_test sgx_init_test \
77 sgx_render_flip_test xeglinfo xgles1test1 xgles2test1 xmultiegltest
81 libews libpvr2d libpvrEWS_WSEGL libpvrPVR2D_BLITWSEGL libpvrPVR2D_DRIWSEGL \
82 libpvrPVR2D_FLIPWSEGL libpvrPVR2D_FRONTWSEGL libpvrPVR2D_LINUXFBWSEGL \
83 libPVRScopeServices libsrv_init libsrv_um libusc pvr_drv
85 TI_GFX_EGLIMAGE_LIBS
= \
86 libEGL libGLES_CM libGLESv2 libglslcompiler libIMGegl
88 TI_GFX_DEMOS
= ChameleonMan MagicLantern
89 TI_GFX_DEMOS_LOC
= GFX_Linux_SDK
/OGLES2
/SDKPackage
/Demos
90 TI_GFX_DEMOS_MAKE_LOC
= OGLES2
/Build
/LinuxGeneric
91 TI_GFX_DEMOS_BIN_LOC
= OGLES2
/Build
/LinuxARMV7
/ReleaseRaw
/
93 TI_GFX_HDR_DIRS
= OGLES2
/EGL OGLES2
/EWS OGLES2
/GLES2 OGLES2
/KHR \
94 OGLES
/GLES bufferclass_ti
/ pvr2d
/ wsegl
/
96 define TI_GFX_EXTRACT_CMDS
97 chmod
+x
$(DL_DIR
)/$(TI_GFX_SOURCE
)
98 printf
"Y\nY\n qY\n\n" |
$(DL_DIR
)/$(TI_GFX_SOURCE
) \
103 define TI_GFX_BUILD_KM_CMDS
104 $(TARGET_MAKE_ENV
) $(MAKE
) $(TI_GFX_KM_MAKE_OPTS
) -C
$(@D
)/GFX_Linux_KM
all
107 ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS
),y
)
108 define TI_GFX_BUILD_DEMO_CMDS
109 $(foreach demo
, $(TI_GFX_DEMOS
), \
110 $(TARGET_MAKE_ENV
) $(MAKE1
) -C \
111 $(@D
)/$(TI_GFX_DEMOS_LOC
)/$(demo
)/$(TI_GFX_DEMOS_MAKE_LOC
) \
112 $(TI_GFX_DEMO_MAKE_OPTS
) all
117 define TI_GFX_BUILD_CMDS
118 $(TI_GFX_BUILD_KM_CMDS
)
119 $(TI_GFX_BUILD_DEMO_CMDS
)
123 # argument 1 is the location to install to (e.g. STAGING_DIR, TARGET_DIR)
124 define TI_GFX_INSTALL_LIBS
125 $(foreach lib
,$(TI_GFX_LIBS
),
126 $(INSTALL
) -D
-m
0644 $(@D
)/$(TI_GFX_BIN_PATH
)/$(lib
).so \
127 $(1)/usr
/lib
/$(lib
).so.
$(TI_GFX_SO_VERSION
); \
128 ln
-sf
$(lib
).so.
$(TI_GFX_SO_VERSION
) \
129 $(1)/usr
/lib
/$(lib
).so
131 $(foreach lib
,$(TI_GFX_EGLIMAGE_LIBS
),
132 $(if
$(BR2_PACKAGE_TI_GFX_EGLIMAGE
),
133 $(INSTALL
) -D
-m
0644 $(@D
)/$(TI_GFX_BIN_PATH
)/$(lib
)_eglimage.so \
134 $(1)/usr
/lib
/$(lib
).so.
$(TI_GFX_SO_VERSION
);
136 $(INSTALL
) -D
-m
0644 $(@D
)/$(TI_GFX_BIN_PATH
)/$(lib
).so \
137 $(1)/usr
/lib
/$(lib
).so.
$(TI_GFX_SO_VERSION
);
139 ln
-sf
$(lib
).so.
$(TI_GFX_SO_VERSION
) \
140 $(1)/usr
/lib
/$(lib
).so
144 define TI_GFX_INSTALL_STAGING_CMDS
145 $(foreach incdir
,$(TI_GFX_HDR_DIRS
),
146 $(INSTALL
) -d
$(STAGING_DIR
)/usr
/include/$(notdir $(incdir
)); \
147 $(INSTALL
) -D
-m
0644 $(@D
)/include/$(incdir
)/*.h \
148 $(STAGING_DIR
)/usr
/include/$(notdir $(incdir
))/
150 $(call TI_GFX_INSTALL_LIBS
,$(STAGING_DIR
))
152 $(INSTALL
) -D
-m
0644 package
/ti-gfx
/egl.
pc \
153 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/egl.
pc
154 $(INSTALL
) -D
-m
0644 package
/ti-gfx
/glesv2.
pc \
155 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/glesv2.
pc
158 define TI_GFX_INSTALL_KM_CMDS
159 $(TARGET_MAKE_ENV
) $(MAKE
) $(TI_GFX_KM_MAKE_OPTS
) -C
$(@D
)/GFX_Linux_KM
install
162 define TI_GFX_INSTALL_BINS_CMDS
163 $(foreach bin
,$(TI_GFX_BIN
),
164 $(INSTALL
) -D
-m
0755 $(@D
)/$(TI_GFX_BIN_PATH
)/$(bin
) \
165 $(TARGET_DIR
)/usr
/bin
/$(bin
)
167 $(if
$(BR2_PACKAGE_TI_GFX_DEBUG
),
168 $(INSTALL
) -D
-m
0755 package
/ti-gfx
/esrev.sh \
169 $(TARGET_DIR
)/usr
/sbin
/esrev
173 define TI_GFX_INSTALL_CONF_CMDS
174 # libs use the following file for configuration.
175 $(INSTALL
) -D
-m
0644 package
/ti-gfx
/powervr.ini \
176 $(TARGET_DIR
)/etc
/powervr.ini
179 ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS
),y
)
180 define TI_GFX_INSTALL_DEMOS_CMDS
181 $(foreach demo
,$(TI_GFX_DEMOS
),
182 $(INSTALL
) -D
-m
0755 \
183 $(@D
)/$(TI_GFX_DEMOS_LOC
)/$(demo
)/$(TI_GFX_DEMOS_BIN_LOC
)/OGLES2
$(demo
) \
184 $(TARGET_DIR
)/usr
/bin
/OGLES2
$(demo
)
189 define TI_GFX_INSTALL_INIT_SYSV
190 $(INSTALL
) -D
-m
0755 package
/ti-gfx
/S80ti-gfx \
191 $(TARGET_DIR
)/etc
/init.d
/S80ti-gfx
194 define TI_GFX_INSTALL_INIT_SYSTEMD
195 $(INSTALL
) -D
-m
755 package
/ti-gfx
/S80ti-gfx \
196 $(TARGET_DIR
)/usr
/lib
/systemd
/scripts
/ti-gfx
197 $(INSTALL
) -D
-m
644 package
/ti-gfx
/ti-gfx.service \
198 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/ti-gfx.service
199 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
200 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/ti-gfx.service \
201 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/ti-gfx.service
204 define TI_GFX_INSTALL_TARGET_CMDS
205 $(TI_GFX_INSTALL_KM_CMDS
)
206 $(TI_GFX_INSTALL_BINS_CMDS
)
207 $(call TI_GFX_INSTALL_LIBS
,$(TARGET_DIR
))
208 $(TI_GFX_INSTALL_CONF_CMDS
)
209 $(TI_GFX_INSTALL_DEMOS_CMDS
)
212 $(eval
$(generic-package
))