diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-30 09:17:56 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-30 09:26:22 +0200 |
| commit | 1098ec32632ecf44560d92d7a7ee747d3a566cc6 (patch) | |
| tree | a5f7b2196549f951d61c09df519395a110e91b7f /recipes-graphics/libgles/libgles-omap3.inc | |
| parent | 3fd522b60e7184b19be7af7101b22888845b2a67 (diff) | |
| download | meta-ti-1098ec32632ecf44560d92d7a7ee747d3a566cc6.tar.gz | |
libgles-omap3: add 4.03.00.02
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-graphics/libgles/libgles-omap3.inc')
| -rw-r--r-- | recipes-graphics/libgles/libgles-omap3.inc | 280 |
1 files changed, 280 insertions, 0 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3.inc b/recipes-graphics/libgles/libgles-omap3.inc new file mode 100644 index 00000000..2868fabe --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3.inc | |||
| @@ -0,0 +1,280 @@ | |||
| 1 | DESCRIPTION = "libGLES for the omap3" | ||
| 2 | LICENSE = "proprietary-binary" | ||
| 3 | # 'TSPA.txt' might not be the best file to md5sum | ||
| 4 | LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1" | ||
| 5 | |||
| 6 | PR = "r15" | ||
| 7 | |||
| 8 | COMPATIBLE_MACHINE = "(omap3|ti816x)" | ||
| 9 | |||
| 10 | DEPENDS = "virtual/libx11 libxau libxdmcp" | ||
| 11 | |||
| 12 | PROVIDES += "virtual/egl" | ||
| 13 | |||
| 14 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \ | ||
| 15 | file://cputype \ | ||
| 16 | file://rc.pvr \ | ||
| 17 | file://sample.desktop \ | ||
| 18 | file://99-bufferclass.rules \ | ||
| 19 | " | ||
| 20 | |||
| 21 | S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}" | ||
| 22 | |||
| 23 | # Logic to unpack installjammer file | ||
| 24 | TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" | ||
| 25 | require ../../recipes-ti/includes/ti-eula-unpack.inc | ||
| 26 | |||
| 27 | BINLOCATION ?= "${S}/gfx_rel" | ||
| 28 | ES2LOCATION ?= "${S}/gfx_rel_es2.x" | ||
| 29 | ES3LOCATION ?= "${S}/gfx_rel_es3.x" | ||
| 30 | ES5LOCATION ?= "${S}/gfx_rel_es5.x" | ||
| 31 | ES6LOCATION ?= "${S}/gfx_rel_es6.x" | ||
| 32 | |||
| 33 | do_configure() { | ||
| 34 | # Attempt to fix up the worst offenders for file permissions | ||
| 35 | for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do | ||
| 36 | chmod 0644 $i | ||
| 37 | done | ||
| 38 | |||
| 39 | # Attempt to create proper library softlinks | ||
| 40 | 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 | ||
| 41 | if [ "$(readlink -n ${sofile})" = "" ] ; then | ||
| 42 | mv $sofile ${sofile}.${IMGPV} | ||
| 43 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile} | ||
| 44 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}') | ||
| 45 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}') | ||
| 46 | fi | ||
| 47 | done | ||
| 48 | |||
| 49 | # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those | ||
| 50 | for mak in $(find ${S} -name "*.mak") ; do | ||
| 51 | sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak | ||
| 52 | done | ||
| 53 | |||
| 54 | # clear out old stuff | ||
| 55 | find Binaries/ | xargs rm -f || true | ||
| 56 | } | ||
| 57 | |||
| 58 | # Force in GNU_HASH and paths to libs | ||
| 59 | TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION} \ | ||
| 60 | -L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}" | ||
| 61 | PARALLEL_MAKE = "" | ||
| 62 | |||
| 63 | do_compile() { | ||
| 64 | export X11ROOT="${STAGING_DIR_HOST}/usr" | ||
| 65 | export TOOLCHAIN="${TOOLCHAIN_PATH}" | ||
| 66 | export PLATFORM="LinuxOMAP3" | ||
| 67 | |||
| 68 | export PLAT_CC="${CC}" | ||
| 69 | export PLAT_CPP="${CXX}" | ||
| 70 | export PLAR_AR="${AR}" | ||
| 71 | |||
| 72 | mkdir -p ${S}/demos/raw | ||
| 73 | mkdir -p ${S}/demos/x11 | ||
| 74 | |||
| 75 | # Rebuild demos for both Raw and X11 | ||
| 76 | for X11BUILD in 0 1 ; do | ||
| 77 | for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do | ||
| 78 | cd $demo/OGLES/Build/LinuxGeneric | ||
| 79 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
| 80 | rm $demo/OGLES/Build/LinuxOMAP3/Release*/*.o | ||
| 81 | install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true | ||
| 82 | sed -e s:NAME:$(basename $demo): \ | ||
| 83 | -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/*): \ | ||
| 84 | ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop | ||
| 85 | install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true | ||
| 86 | done | ||
| 87 | for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do | ||
| 88 | cd $demo/OGLES2/Build/LinuxGeneric | ||
| 89 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
| 90 | rm -f $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o | ||
| 91 | install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true | ||
| 92 | sed -e s:NAME:$(basename $demo): \ | ||
| 93 | -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/*): \ | ||
| 94 | ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop | ||
| 95 | install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true | ||
| 96 | done | ||
| 97 | done | ||
| 98 | |||
| 99 | mkdir -p ${S}/trainingcourses/raw | ||
| 100 | mkdir -p ${S}/trainingcourses/x11 | ||
| 101 | |||
| 102 | find ${S} -name "*_org" -delete | ||
| 103 | |||
| 104 | # Build OGLES2 Trainingcourses for both Raw and X11 | ||
| 105 | for X11BUILD in 0 1 ; do | ||
| 106 | for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do | ||
| 107 | if [ -e $training/OGLES2/Build/LinuxGeneric/Makefile ] ; then | ||
| 108 | cd $training/OGLES2/Build/LinuxGeneric | ||
| 109 | fi | ||
| 110 | |||
| 111 | if [ -e $training/OGLES2/Build/LinuxOMAP3/Makefile ] ; then | ||
| 112 | cd $training/OGLES2/Build/LinuxOMAP3 | ||
| 113 | fi | ||
| 114 | |||
| 115 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
| 116 | rm -f $training/OGLES2/Build/LinuxOMAP3/Release*/*.o | ||
| 117 | install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true | ||
| 118 | install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true | ||
| 119 | done | ||
| 120 | done | ||
| 121 | |||
| 122 | } | ||
| 123 | |||
| 124 | do_install () { | ||
| 125 | install -d ${D}${libdir} | ||
| 126 | cp -pPR ${BINLOCATION}/*.so* ${D}${libdir} | ||
| 127 | install -m 0644 ${BINLOCATION}/*.a ${D}${libdir} | ||
| 128 | |||
| 129 | install -d ${D}${bindir}/ | ||
| 130 | install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/ | ||
| 131 | |||
| 132 | install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/ | ||
| 133 | install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/ | ||
| 134 | install -m 0755 ${BINLOCATION}/p[dv]* ${D}${bindir}/ | ||
| 135 | install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/ | ||
| 136 | |||
| 137 | install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true | ||
| 138 | |||
| 139 | install -d ${D}${includedir} | ||
| 140 | cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/ | ||
| 141 | cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/ | ||
| 142 | |||
| 143 | cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/ | ||
| 144 | cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/ | ||
| 145 | cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ || true | ||
| 146 | cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/ || true | ||
| 147 | cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true | ||
| 148 | cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true | ||
| 149 | cp -pPr ${S}/include/*.h ${D}${includedir} || true | ||
| 150 | cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true | ||
| 151 | |||
| 152 | install -d ${D}${sysconfdir}/init.d/ | ||
| 153 | cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init | ||
| 154 | |||
| 155 | install -d ${D}${sysconfdir} | ||
| 156 | echo "[default]" > ${D}${sysconfdir}/powervr.ini | ||
| 157 | echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1" >> ${D}${sysconfdir}/powervr.ini | ||
| 158 | |||
| 159 | # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace | ||
| 160 | |||
| 161 | install -d ${D}${libdir}/ES6.0 | ||
| 162 | install -d ${D}${libdir}/ES5.0 | ||
| 163 | install -d ${D}${libdir}/ES3.0 | ||
| 164 | install -d ${D}${libdir}/ES2.0 | ||
| 165 | |||
| 166 | install -d ${D}${bindir}/ES6.0 | ||
| 167 | install -d ${D}${bindir}/ES5.0 | ||
| 168 | install -d ${D}${bindir}/ES3.0 | ||
| 169 | install -d ${D}${bindir}/ES2.0 | ||
| 170 | |||
| 171 | |||
| 172 | cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ | ||
| 173 | cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ | ||
| 174 | |||
| 175 | cp -pPR ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/ | ||
| 176 | cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0 | ||
| 177 | |||
| 178 | if [ -e ${ES5LOCATION} ] ; then | ||
| 179 | cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/ | ||
| 180 | cp ${ES5LOCATION}/p[dv]* ${D}${bindir}/ES5.0/ | ||
| 181 | fi | ||
| 182 | |||
| 183 | if [ -e ${ES6LOCATION} ] ; then | ||
| 184 | cp -pPR ${ES6LOCATION}/lib*${IMGPV} ${D}${libdir}/ES6.0/ | ||
| 185 | cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/ | ||
| 186 | fi | ||
| 187 | |||
| 188 | rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true | ||
| 189 | |||
| 190 | install -d ${D}${prefix}/share/applications | ||
| 191 | cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications | ||
| 192 | rm ${D}${prefix}/share/applications/sample.desktop | ||
| 193 | |||
| 194 | install -d ${D}${bindir}/SGX/demos/X11/ | ||
| 195 | install -d ${D}${bindir}/SGX/demos/Raw/ | ||
| 196 | install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/ | ||
| 197 | install -m 0755 ${S}/demos/raw/* ${D}${bindir}/SGX/demos/Raw/ | ||
| 198 | |||
| 199 | install -d ${D}${bindir}/SGX/trainingcourses/Raw | ||
| 200 | install -d ${D}${bindir}/SGX/trainingcourses/X11 | ||
| 201 | install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/ | ||
| 202 | install -m 0755 ${S}/trainingcourses/raw/* ${D}${bindir}/SGX/trainingcourses/Raw/ | ||
| 203 | |||
| 204 | # Delete objects and linker scripts hidden between the headers | ||
| 205 | find ${D} -name "*.o" -delete | ||
| 206 | find ${D} -name "*.o.cmd" -delete | ||
| 207 | |||
| 208 | install -d ${D}${sysconfdir}/udev/rules.d | ||
| 209 | install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/ | ||
| 210 | |||
| 211 | } | ||
| 212 | |||
| 213 | PACKAGES =+ "${PN}-rawdemos \ | ||
| 214 | ${PN}-x11demos \ | ||
| 215 | ${PN}-rawtrainingcourses \ | ||
| 216 | ${PN}-x11trainingcourses \ | ||
| 217 | " | ||
| 218 | |||
| 219 | PACKAGES += "xserver-kdrive-powervrsgx \ | ||
| 220 | ${PN}-tests " | ||
| 221 | |||
| 222 | PACKAGES =+ "${PN}-blitwsegl ${PN}-flipwsegl ${PN}-frontwsegl ${PN}-linuxfbwsegl ${PN}-x11wsegl" | ||
| 223 | |||
| 224 | FILES_${PN}-blitwsegl = "${libdir}/libpvrPVR2D_BLITWSEGL.so.* ${libdir}/*/libpvrPVR2D_BLITWSEGL.so.*" | ||
| 225 | FILES_${PN}-flipwsegl = "${libdir}/libpvrPVR2D_FLIPWSEGL.so.* ${libdir}/*/libpvrPVR2D_FLIPWSEGL.so.*" | ||
| 226 | FILES_${PN}-frontwsegl = "${libdir}/libpvrPVR2D_FRONTWSEGL.so.* ${libdir}/*/libpvrPVR2D_FRONTWSEGL.so.*" | ||
| 227 | FILES_${PN}-linuxfbwsegl = "${libdir}/libpvrPVR2D_LINUXFBWSEGL.so.* ${libdir}/*/libpvrPVR2D_LINUXFBWSEGL.so.*" | ||
| 228 | FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so* ${libdir}/*/libpvrPVR2D_X11WSEGL.so*" | ||
| 229 | |||
| 230 | CONFFILES_${PN} = "${sysconfdir}/powervr.ini" | ||
| 231 | |||
| 232 | FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*" | ||
| 233 | FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx" | ||
| 234 | FILES_${PN}-tests = "${bindir}/*" | ||
| 235 | FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \ | ||
| 236 | ${libdir}/ES*/.debug ${bindir}/*/.debug\ | ||
| 237 | ${bindir}/SGX/demos/*/.debug/* \ | ||
| 238 | ${bindir}/SGX/trainingcourses/*/.debug/* \ | ||
| 239 | " | ||
| 240 | |||
| 241 | FILES_${PN}-rawdemos = "${bindir}/SGX/demos/Raw/*" | ||
| 242 | FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications " | ||
| 243 | RRECOMMENDS_${PN}-x11demos = "${PN}-x11wsegl" | ||
| 244 | |||
| 245 | FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*" | ||
| 246 | FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*" | ||
| 247 | RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl" | ||
| 248 | |||
| 249 | # The libs need the kernel-modules | ||
| 250 | RRECOMMENDS_${PN} = "omap3-sgx-modules" | ||
| 251 | |||
| 252 | # The initscript calls fbset, cputype calls devmem2 | ||
| 253 | RDEPENDS_${PN} += "fbset devmem2" | ||
| 254 | |||
| 255 | #HACK! These are binaries, so we can't guarantee that LDFLAGS match :( | ||
| 256 | INSANE_SKIP_${PN} = True | ||
| 257 | INSANE_SKIP_${PN}-blitwsegl = True | ||
| 258 | INSANE_SKIP_${PN}-flipwsegl = True | ||
| 259 | INSANE_SKIP_${PN}-frontwsegl = True | ||
| 260 | INSANE_SKIP_${PN}-linuxfbwsegl = True | ||
| 261 | INSANE_SKIP_${PN}-x11wsegl = True | ||
| 262 | INSANE_SKIP_${PN}-tests = True | ||
| 263 | INSANE_SKIP_xserver-kdrive-powervrsgx = True | ||
| 264 | |||
| 265 | # Quality control is really poor on these SDKs, so hack around the latest madness: | ||
| 266 | FILES_${PN} += "${libdir}/*.so " | ||
| 267 | FILES_${PN}-dev = "${includedir}" | ||
| 268 | |||
| 269 | inherit update-rc.d | ||
| 270 | |||
| 271 | INITSCRIPT_NAME = "pvr-init" | ||
| 272 | INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." | ||
| 273 | |||
| 274 | # Append to update-rc.d postinst | ||
| 275 | pkg_postinst_${PN}_append() { | ||
| 276 | rm -f /etc/powervr-esrev | ||
| 277 | |||
| 278 | ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0 | ||
| 279 | ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0 | ||
| 280 | } | ||
