summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/libgles/libgles-omap3-x11.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/libgles/libgles-omap3-x11.inc')
-rw-r--r--recipes-graphics/libgles/libgles-omap3-x11.inc333
1 files changed, 0 insertions, 333 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3-x11.inc b/recipes-graphics/libgles/libgles-omap3-x11.inc
deleted file mode 100644
index 9aa596a5..00000000
--- a/recipes-graphics/libgles/libgles-omap3-x11.inc
+++ /dev/null
@@ -1,333 +0,0 @@
1DESCRIPTION = "libGLES for the omap3 (X11)"
2LICENSE = "proprietary-binary"
3# 'TSPA.txt' might not be the best file to md5sum
4LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1"
5
6INC_PR = "r38"
7
8EXCLUDE_FROM_WORLD = "1"
9
10COMPATIBLE_MACHINE = "(omap3|ti814x|ti816x|ti33x|ti43x)"
11
12DEPENDS = "virtual/libx11 libxau libxdmcp libdrm"
13
14export SUPPORT_XORG ?= "1"
15PVR_INIT ?= "pvrsrvinit"
16
17PROVIDES += "libgles-omap3 virtual/egl virtual/libgles1 virtual/libgles2"
18
19RREPLACES_${PN} = "libegl libgles1 libgles2"
20RREPLACES_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev"
21RREPLACES_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
22
23RPROVIDES_${PN} = "libegl libgles1 libgles2"
24RPROVIDES_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev"
25RPROVIDES_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
26
27RCONFLICTS_${PN} = "libegl libgles1 libgles2"
28RCONFLICTS_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev"
29RCONFLICTS_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
30
31SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE} \
32 file://cputype \
33 file://rc_dri.pvr \
34 file://sample.desktop \
35 file://99-bufferclass.rules \
36"
37
38S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
39
40# Logic to unpack installjammer file
41TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
42require ../../recipes-ti/includes/ti-eula-unpack.inc
43
44export BINLOCATION ?= "${S}/gfx_rel"
45export ES3LOCATION ?= "${S}/gfx_rel_es3.x"
46export ES5LOCATION ?= "${S}/gfx_rel_es5.x"
47export ES6LOCATION ?= "${S}/gfx_rel_es6.x"
48export ES8LOCATION ?= "${S}/gfx_rel_es8.x"
49export ES9LOCATION ?= "${S}/gfx_rel_es9.x"
50
51LIBGLESWINDOWSYSTEM ?= "libpvrPVR2D_DRIWSEGL.so"
52
53python __anonymous() {
54 if "x11" not in d.getVar("DISTRO_FEATURES", True).split():
55 raise bb.parse.SkipPackage("Recipe is x11-specific, skipping")
56}
57
58do_configure() {
59 # Attempt to fix up the worst offenders for file permissions
60 for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do
61 chmod 0644 $i
62 done
63
64 # Attempt to create proper library softlinks
65 for sofile in $(find ${S} -name "lib*Open*.so") $(find ${S} -name "lib*srv*.so") $(find ${S} -name "lib*gl*.so") $(find ${S} -name "libpvr*.so") $(find ${S} -name "lib*GL*.so"); do
66 if [ "$(readlink -n ${sofile})" = "" ] ; then
67 mv $sofile ${sofile}.${IMGPV}
68 ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
69 ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}')
70 ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}')
71 fi
72 done
73
74 # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those
75 for mak in $(find ${S} -name "*.mak") ; do
76 sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak
77 done
78
79 # clear out old stuff
80 find Binaries/ | xargs rm -f || true
81}
82
83# Force in GNU_HASH and paths to libs
84TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION} \
85-L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}"
86PARALLEL_MAKE = ""
87
88PLATFORM ?= "LinuxOMAP3"
89
90do_compile() {
91 export TOOLCHAIN="${TOOLCHAIN_PATH}"
92 export PLAT_CC="${CC}"
93 export PLAT_CPP="${CXX}"
94 export PLAR_AR="${AR}"
95
96 export X11ROOT="${STAGING_DIR_HOST}/usr"
97 mkdir -p ${S}/demos/x11
98 mkdir -p ${S}/trainingcourses/x11
99
100 mkdir -p ${S}/demos/raw
101 mkdir -p ${S}/trainingcourses/raw
102
103 # Rebuild demos
104 for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do
105 cd $demo/OGLES/Build/LinuxGeneric
106 oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=1
107 rm $demo/OGLES/Build/${PLATFORM}/Release*/*.o
108
109 install -m 0755 $demo/OGLES/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
110 sed -e s:NAME:$(basename $demo): \
111 -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/${PLATFORM}/ReleaseX11/*): \
112 ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
113 done
114
115 for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do
116 cd $demo/OGLES2/Build/LinuxGeneric
117 oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=1
118 rm -f $demo/OGLES2/Build/${PLATFORM}/Release*/*.o
119
120 install -m 0755 $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
121 sed -e s:NAME:$(basename $demo): \
122 -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/*): \
123 ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
124 done
125
126
127 find ${S} -name "*_org" -delete
128
129 # Build OGLES2 Trainingcourses
130 for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do
131 if [ -e $training/OGLES2/Build/LinuxGeneric/Makefile ] ; then
132 cd $training/OGLES2/Build/LinuxGeneric
133 fi
134
135 if [ -e $training/OGLES2/Build/${PLATFORM}/Makefile ] ; then
136 cd $training/OGLES2/Build/${PLATFORM}
137 fi
138
139 oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=1
140 rm -f $training/OGLES2/Build/${PLATFORM}/Release*/*.o
141
142 install -m 0755 $training/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/trainingcourses/x11 || true
143 done
144}
145
146do_install () {
147 install -d ${D}${libdir}
148 cp -pPR ${BINLOCATION}/*.so* ${D}${libdir}
149 install -m 0644 ${BINLOCATION}/*.a ${D}${libdir}
150
151 install -d ${D}${bindir}/
152 install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
153
154 install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/
155 install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/
156 install -m 0755 ${BINLOCATION}/${PVR_INIT} ${D}${bindir}/
157
158 install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/
159
160 install -d ${D}${includedir}
161 cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/
162 cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/
163
164 cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
165 cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
166 cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES/ 2>/dev/null || true
167 cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES2/ 2>/dev/null || true
168 cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true
169
170 install -d ${D}${sysconfdir}/init.d/
171
172 install -d ${D}${sysconfdir}
173 echo "[default]" > ${D}${sysconfdir}/powervr.ini
174 echo "WindowSystem=${LIBGLESWINDOWSYSTEM}" >> ${D}${sysconfdir}/powervr.ini
175
176 # The ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace
177
178 install -d ${D}${libdir}/ES9.0
179 install -d ${D}${libdir}/ES8.0
180 install -d ${D}${libdir}/ES6.0
181 install -d ${D}${libdir}/ES5.0
182 install -d ${D}${libdir}/ES3.0
183
184 install -d ${D}${bindir}/ES9.0
185 install -d ${D}${bindir}/ES8.0
186 install -d ${D}${bindir}/ES6.0
187 install -d ${D}${bindir}/ES5.0
188 install -d ${D}${bindir}/ES3.0
189
190 x11_prog="eglinfo_x xgles1test1 xgles2test1 xmultiegltest"
191
192 for esrev in 3 5 6 8 9; do
193 ESLOCATION=$(eval echo $(echo \$\{ES${esrev}LOCATION\}))
194 if [ -e ${ESLOCATION} ] ; then
195 cp -pPR ${ESLOCATION}/lib*${IMGPV} ${ESLOCATION}/pvr_drv.so ${ESLOCATION}/*.a ${D}${libdir}/ES${esrev}.0/
196 for esprog in $x11_prog ; do
197 install -m 0755 ${ESLOCATION}/$esprog ${D}${bindir}/ES${esrev}.0/ 2>/dev/null || true
198 done
199 fi
200 done
201
202 rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true
203
204 install -d ${D}${prefix}/share/applications
205 cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
206 rm ${D}${prefix}/share/applications/sample.desktop
207
208 install -d ${D}${bindir}/SGX/demos/X11/
209 install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/
210 install -d ${D}${bindir}/SGX/trainingcourses/X11 2>/dev/null || true
211 install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/ 2>/dev/null || true
212
213 # Delete objects and linker scripts hidden between the headers
214 find ${D} -name "*.o" -delete
215 find ${D} -name "*.o.cmd" -delete
216
217 install -d ${D}${sysconfdir}/udev/rules.d
218 install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/
219
220}
221
222PACKAGES =+ "${PN}-x11demos ${PN}-x11trainingcourses xserver-kdrive-powervrsgx"
223
224# Package the base libraries per silicon revision
225PACKAGES =+ "${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8 ${PN}-es9"
226RRECOMMENDS_${PN} += "${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8 ${PN}-es9"
227FILES_${PN}-es3 = "${libdir}/ES3*/* ${bindir}/ES3*/*"
228FILES_${PN}-es5 = "${libdir}/ES5*/* ${bindir}/ES5*/*"
229FILES_${PN}-es6 = "${libdir}/ES6*/* ${bindir}/ES6*/*"
230FILES_${PN}-es8 = "${libdir}/ES8*/* ${bindir}/ES8*/*"
231FILES_${PN}-es9 = "${libdir}/ES9*/* ${bindir}/ES9*/*"
232
233# Stop shlib code from picking a subpackage
234PRIVATE_LIBS_${PN}-es3 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
235PRIVATE_LIBS_${PN}-es5 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
236PRIVATE_LIBS_${PN}-es6 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
237PRIVATE_LIBS_${PN}-es8 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
238PRIVATE_LIBS_${PN}-es9 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
239
240PACKAGES =+ "${PN}-x11wsegl ${PN}-driwsegl"
241FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so* ${bindir}/x* ${bindir}/*x"
242FILES_${PN}-driwsegl = "${libdir}/libpvrPVR2D_DRIWSEGL.so* ${libdir}/libsrv_um_dri*"
243
244X11_SEGL = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8 ${PN}-x11wsegl-es9 ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8 ${PN}-driwsegl-es9"
245PACKAGES =+ "${X11_SEGL}"
246FILES_${PN}-x11wsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES2*/x* ${bindir}/ES2*/*x"
247FILES_${PN}-x11wsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES3*/x* ${bindir}/ES3*/*x"
248FILES_${PN}-x11wsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES5*/x* ${bindir}/ES5*/*x"
249FILES_${PN}-x11wsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES6*/x* ${bindir}/ES6*/*x"
250FILES_${PN}-x11wsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES8*/x* ${bindir}/ES8*/*x"
251FILES_${PN}-x11wsegl-es9 = "${libdir}/ES9*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES9*/x* ${bindir}/ES9*/*x"
252RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8 ${PN}-x11wsegl-es9"
253
254FILES_${PN}-driwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES2*/libsrv_um_dri*"
255FILES_${PN}-driwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES3*/libsrv_um_dri*"
256FILES_${PN}-driwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES5*/libsrv_um_dri*"
257FILES_${PN}-driwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES6*/libsrv_um_dri*"
258FILES_${PN}-driwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES8*/libsrv_um_dri*"
259FILES_${PN}-driwsegl-es9 = "${libdir}/ES9*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES9*/libsrv_um_dri*"
260RRECOMMENDS_${PN}-driwsegl = " ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8 ${PN}-driwsegl-es9"
261
262CONFFILES_${PN} = "${sysconfdir}/powervr.ini"
263
264FILES_${PN} = "${sysconfdir} ${libdir}/*.so* ${bindir}/${PVR_INIT} ${bindir}/cputype ${bindir}/*"
265
266FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
267FILES_${PN}-tests = "${bindir}/*test*"
268FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \
269 ${libdir}/ES*/.debug ${bindir}/*/.debug\
270 ${bindir}/SGX/demos/*/.debug/* \
271 ${bindir}/SGX/trainingcourses/*/.debug/* \
272"
273
274FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications "
275RRECOMMENDS_${PN}-x11demos = "${PN}-x11wsegl"
276
277FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*"
278RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl"
279
280# The libs need the kernel-modules
281RRECOMMENDS_${PN} += "omap3-sgx-modules-x11"
282
283# The initscript calls fbset, cputype calls devmem2
284RDEPENDS_${PN} += "fbset devmem2"
285
286#HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
287INSANE_SKIP_${PN} = "ldflags dev-so already-stripped"
288INSANE_SKIP_${PN}-es3 = "ldflags dev-so staticdev already-stripped"
289INSANE_SKIP_${PN}-es5 = "ldflags dev-so staticdev already-stripped"
290INSANE_SKIP_${PN}-es6 = "ldflags dev-so staticdev already-stripped"
291INSANE_SKIP_${PN}-es8 = "ldflags dev-so staticdev already-stripped"
292INSANE_SKIP_${PN}-es9 = "ldflags dev-so staticdev already-stripped"
293INSANE_SKIP_${PN}-x11demos = "ldflags dev-so useless-rpaths already-stripped"
294INSANE_SKIP_${PN}-x11wsegl = "ldflags dev-so already-stripped"
295INSANE_SKIP_${PN}-x11wsegl-es3 = "ldflags dev-so already-stripped"
296INSANE_SKIP_${PN}-x11wsegl-es5 = "ldflags dev-so already-stripped"
297INSANE_SKIP_${PN}-x11wsegl-es6 = "ldflags dev-so already-stripped"
298INSANE_SKIP_${PN}-x11wsegl-es8 = "ldflags dev-so already-stripped"
299INSANE_SKIP_${PN}-x11wsegl-es9 = "ldflags dev-so already-stripped"
300INSANE_SKIP_${PN}-driwsegl = "ldflags dev-so already-stripped"
301INSANE_SKIP_${PN}-driwsegl-es3 = "ldflags dev-so already-stripped"
302INSANE_SKIP_${PN}-driwsegl-es5 = "ldflags dev-so already-stripped"
303INSANE_SKIP_${PN}-driwsegl-es6 = "ldflags dev-so already-stripped"
304INSANE_SKIP_${PN}-driwsegl-es8 = "ldflags dev-so already-stripped"
305INSANE_SKIP_${PN}-driwsegl-es9 = "ldflags dev-so already-stripped"
306INSANE_SKIP_${PN}-tests = "ldflags already-stripped"
307INSANE_SKIP_xserver-kdrive-powervrsgx = "ldflags already-stripped"
308INSANE_SKIP_${PN}-dev = "ldflags dev-so already-stripped"
309
310inherit update-rc.d
311
312INITSCRIPT_NAME = "pvr-init"
313INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
314
315# Append to update-rc.d postinst
316pkg_postinst_${PN}_append() {
317rm -f $D${sysconfdir}/powervr-esrev
318
319ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0
320ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
321
322}
323
324pkg_postinst_${PN}-x11wsegl() {
325rm -f $D${sysconfdir}/powervr-esrev
326
327echo "[default]" > $D${sysconfdir}/powervr.ini
328echo "WindowSystem=libpvrPVR2D_X11WSEGL.so.1" >> $D${sysconfdir}/powervr.ini
329}
330
331pkg_postinst_${PN}-driwsegl() {
332rm -f $D${sysconfdir}/powervr-esrev
333}