summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-02-23 16:04:51 +0100
committerKoen Kooi <koen@openembedded.org>2010-02-24 12:06:59 +0100
commit32799b8fb20c213dd932780bf21148d050d772f4 (patch)
tree905c698018af48ae6aa94094a67badfa5aa674bc
parent23681e960148d0edff965eaef30044678eed111e (diff)
libgles-omap3: complete overhaul
* convert to new-style staging * (re)build demos with proper toolchain and flags * build trainingcourses * generate .desktop files on the fly * delete old versions
-rw-r--r--recipes/powervr-drivers/libgles-omap3.inc243
-rw-r--r--recipes/powervr-drivers/libgles-omap3/chameleonman.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/evilskull.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/fivespheres.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/lighting.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/mouse.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/particles.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/polybump.desktop8
-rwxr-xr-xrecipes/powervr-drivers/libgles-omap3/rc.pvr56
-rw-r--r--recipes/powervr-drivers/libgles-omap3/sample.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shaders.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox2.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/trilinear.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/vase.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb19
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-DSS2.patch96
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/0001-New-build-system-for-SGX.patch247
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-DSS2.patch11
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/build_es3.x_sgx.patch11
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/omap3-sgx-modules-1.3.13.1607.tar.bz2bin178370 -> 0 bytes
-rwxr-xr-xrecipes/powervr-drivers/omap3-sgx-modules/proc-interface.patch22
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/rotation-dss2.patch21
-rw-r--r--recipes/powervr-drivers/omap3-sgx-modules/spurious-irq-fix.diff11
27 files changed, 216 insertions, 649 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc
index 27f732ba27..dd222df411 100644
--- a/recipes/powervr-drivers/libgles-omap3.inc
+++ b/recipes/powervr-drivers/libgles-omap3.inc
@@ -2,13 +2,8 @@ DESCRIPTION = "libGLES for the omap3"
LICENCE = "proprietary-binary"
COMPATIBLE_MACHINE = "(am3517-evm|beagleboard|cm-t35|igep0020|omap3-pandora|omap3-touchbook|omap3evm|omapzoom|omapzoom2|overo|palmpre)"
-RDEPENDS_${PN} += "devmem2 fbset"
-#HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
-INSANE_SKIP_${PN} = True
-INSANE_SKIP_${PN}-tests = True
-INSANE_SKIP_${PN}-demos = True
-INSANE_SKIP_xserver-kdrive-powervrsgx = True
+DEPENDS = "virtual/libx11 libxau libxdmcpdev"
PROVIDES += "virtual/egl"
@@ -22,87 +17,119 @@ PROVIDES += "virtual/egl"
# (replace version in .bin file as appropriate)
# 3. put the OMAP35x_*.bin file in libgles-omap3/
# mv OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin ./libgles-omap3/
-# 4. make it executable:
-# chmod a+x ./libgles-omap3/OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin
#
# voila!
SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
- file://cputype \
- file://rc.pvr \
- file://chameleonman.desktop \
- file://evilskull.desktop \
- file://fivespheres.desktop \
- file://lighting.desktop \
- file://mouse.desktop \
- file://optimizemesh.desktop \
- file://particles.desktop \
- file://polybump.desktop \
- file://shadowtechniques.desktop \
- file://skybox.desktop \
- file://trilinear.desktop \
- file://userclipplanes.desktop \
- file://vase.desktop \
- file://shaders.desktop \
- file://skybox2.desktop \
- "
+ file://cputype \
+ file://rc.pvr \
+ file://sample.desktop \
+ "
S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
+# Logic to unpack installjammer file
TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
require ../ti/ti-eula-unpack.inc
BINLOCATION ?= "${S}/gfx_rel"
-PACKAGES += " xserver-kdrive-powervrsgx ${PN}-tests ${PN}-demos"
-
-FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*"
-FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
-FILES_${PN}-tests = "${bindir}"
-FILES_${PN}-demos = "${prefix}/demos ${prefix}/share/applications "
-FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* ${libdir}/ES*/.debug ${bindir}/*/.debug\
- ${prefix}/demos/OGLES/*/.debug/* \
- ${prefix}/demos/OGLES2/*/.debug/* \
- "
-
-RRECOMMENDS_${PN} = "${PN}-tests \
- omap3-sgx-modules"
-
-inherit update-rc.d
-
-INITSCRIPT_NAME = "pvr-init"
-INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
+do_configure() {
+ # Attempt to fix up the worst offenders for file permissions
+ for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do
+ chmod 0644 $i
+ done
+
+ # Attempt to create proper library softlinks
+ 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
+ if [ "$(readlink -n ${sofile})" = "" ] ; then
+ mv $sofile ${sofile}.${IMGPV}
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}')
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}')
+ fi
+ done
+
+ # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those
+ for mak in $(find ${S} -name "*.mak") ; do
+ sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak
+ done
+
+ # clear out old stuff
+ find Binaries/ | xargs rm -f || true
+}
+# Force in GNU_HASH and paths to libs
+TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION}"
+PARALLEL_MAKE = ""
do_compile() {
- for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do
- chmod 0644 $i
- done
-
- 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
- if [ "$(readlink -n ${sofile})" = "" ] ; then
- mv $sofile ${sofile}.${IMGPV}
- ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
- fi
- done
+ export X11ROOT="${STAGING_INCDIR}"
+ export PLATFORM="LinuxOMAP3"
+
+ export PLAT_CC="${CC}"
+ export PLAT_CPP="${CXX}"
+ export PLAR_AR="${AR}"
+
+ mkdir -p ${S}/demos/raw
+ mkdir -p ${S}/demos/x11
+
+ # Rebuild demos for both Raw and X11
+ for X11BUILD in 0 1 ; do
+ for demo in ${S}/GFX_Linux_SDK/OGLES*/SDKPackage/Demos/* ; do
+ cd $demo/OGLES*/Build/LinuxGeneric
+ oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD
+ rm $demo/OGLES*/Build/LinuxOMAP3/Release*/*.o
+ install -m 0755 $demo/OGLES*/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true
+ sed -e s:NAME:$(basename $demo/OGLES*/Build/LinuxOMAP3/ReleaseX11/*): \
+ -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES*/Build/LinuxOMAP3/ReleaseX11/*): \
+ ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo/OGLES*/Build/LinuxOMAP3/ReleaseX11/*).desktop
+ install -m 0755 $demo/OGLES*/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true
+ done
+ done
+
+ mkdir -p ${S}/trainingcourses/raw
+ mkdir -p ${S}/trainingcourses/x11
+
+ # Build OGLES2 Trainingcourses for both Raw and X11
+ for X11BUILD in 0 1 ; do
+ for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do
+ if [ -e $training/OGLES*/Build/LinuxGeneric/Makefile ] ; then
+ cd $training/OGLES*/Build/LinuxGeneric
+ fi
+
+ if [ -e $training/OGLES*/Build/LinuxOMAP3/Makefile ] ; then
+ cd $training/OGLES*/Build/LinuxOMAP3
+ fi
+
+ oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD
+ rm $training/OGLES*/Build/LinuxOMAP3/Release*/*.o
+ install -m 0755 $training/OGLES*/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true
+ install -m 0755 $training/OGLES*/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true
+ done
+ done
+
}
do_install () {
-
install -d ${D}${libdir}
- cp -pP ${BINLOCATION}/*.so* ${D}${libdir}
+ install -m 0755 ${BINLOCATION}/*.so* ${D}${libdir}
+ install -m 0644 ${BINLOCATION}/*.a ${D}${libdir}
install -d ${D}${bindir}/
install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
- cp -pP ${BINLOCATION}/*_test ${D}${bindir}/
- cp -pP ${BINLOCATION}/gl* ${D}${bindir}/
- cp -pP ${BINLOCATION}/p[dv]* ${D}${bindir}/
- cp -pP ${BINLOCATION}/xgles1test1 ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/p[dv]* ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/
- cp -pP ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
+ install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
install -d ${D}${includedir}
+ cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/
+ cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/
+
cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ || true
@@ -118,36 +145,82 @@ do_install () {
echo "[default]" > ${D}${sysconfdir}/powervr.ini
echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so" >> ${D}${sysconfdir}/powervr.ini
- install -d ${D}${prefix}/demos/OGLES/
- cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Binaries/CommonX11/Demos/* ${D}${prefix}/demos/OGLES/
+ # The ES2.x and ES3.x CPUs have different SGX hardware, so we need to install 2 sets of userspace
+
+ install -d ${D}${libdir}/ES3.0
+ install -d ${D}${libdir}/ES2.0
+ install -d ${D}${bindir}/ES3.0
+ install -d ${D}${bindir}/ES2.0
+
+ cp ${S}/gfx_rel_es2.x/lib* ${D}${libdir}/ES2.0/
+ cp ${S}/gfx_rel_es2.x//p[dv]* ${D}${bindir}/ES2.0/
- install -d ${D}${prefix}/demos/OGLES2
- cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Binaries/X11/Demos/* ${D}${prefix}/demos/OGLES2
+ cp ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/
+ cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0
install -d ${D}${prefix}/share/applications
- cp -pPR ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
+ cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
+ rm ${D}${prefix}/share/applications/sample.desktop
+
+ install -d ${D}${bindir}/SGX/demos/X11/
+ install -d ${D}${bindir}/SGX/demos/Raw/
+ install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/
+ install -m 0755 ${S}/demos/raw/* ${D}${bindir}/SGX/demos/Raw/
+
+ install -d ${D}${bindir}/SGX/trainingcourses/Raw
+ install -d ${D}${bindir}/SGX/trainingcourses/X11
+ install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/
+ install -m 0755 ${S}/trainingcourses/raw/* ${D}${bindir}/SGX/trainingcourses/Raw/
+
+ # Delete objects and linker scripts hidden between the headers
+ find ${D} -name "*.o" -delete
+ find ${D} -name "*.o.cmd" -delete
}
-do_stage () {
- install -d ${STAGING_LIBDIR}/
- cp -pP ${BINLOCATION}/*.so* ${STAGING_LIBDIR}
- cp -pP ${BINLOCATION}/*.a ${STAGING_LIBDIR}
-
- install -d ${STAGING_INCDIR}
- cp -pPR ${S}/GFX_Linux_KM/include4 ${STAGING_INCDIR}/
- cp -pPR ${S}/GFX_Linux_KM/services4 ${STAGING_INCDIR}/
-
- cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${STAGING_INCDIR}/
- cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${STAGING_INCDIR}/
- cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES/ || true
- cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES2/ || true
- cp -pPr ${S}/include/*.h ${STAGING_INCDIR} || true
- cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${STAGING_INCDIR}/ || true
- cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${STAGING_INCDIR}/ || true
-}
+PACKAGES =+ "xserver-kdrive-powervrsgx \
+ ${PN}-rawdemos \
+ ${PN}-x11demos \
+ ${PN}-rawtrainingcourses \
+ ${PN}-x11trainingcourses \
+ ${PN}-tests "
+
+FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*"
+FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
+FILES_${PN}-tests = "${bindir}"
+FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \
+ ${libdir}/ES*/.debug ${bindir}/*/.debug\
+ ${bindir}/SGX/demos/*/.debug/* \
+ ${bindir}/SGX/trainingcourses/*/.debug/* \
+ "
+
+FILES_${PN}-rawdemos = "${bindir}/SGX/demos/Raw/*"
+FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications "
+
+FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*"
+FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*"
+
+# The libs need the kernel-modules
+RRECOMMENDS_${PN} = "omap3-sgx-modules"
+
+# The initscript calls fbset
+RDEPENDS_${PN} += "fbset"
+
+#HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
+INSANE_SKIP_${PN} = True
+INSANE_SKIP_${PN}-tests = True
+INSANE_SKIP_xserver-kdrive-powervrsgx = True
+
+# Quality control is really poor on these SDKs, so hack around the latest madness:
+FILES_${PN} += "${libdir}/*.so "
+FILES_${PN}-dev = "${includedir}"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "pvr-init"
+INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
-pkg_postinst() {
-#!/bin/sh
+# Append to update-rc.d postinst
+pkg_postinst_${PN}_append() {
ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0
ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
}
diff --git a/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop b/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
deleted file mode 100644
index 23d4fc0b7d..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=ChameleonMan Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/ChameleonMan/OGLESChameleonMan
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/evilskull.desktop b/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
deleted file mode 100644
index 0590f7f7ff..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=EvilSkull Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/EvilSkull/OGLESEvilSkull
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop b/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
deleted file mode 100644
index 569cad693c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=FiveSpheres Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/FiveSpheres/OGLESFiveSpheres
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/lighting.desktop b/recipes/powervr-drivers/libgles-omap3/lighting.desktop
deleted file mode 100644
index 39179b2408..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/lighting.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Lighting Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Lighting/OGLESLighting
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/mouse.desktop b/recipes/powervr-drivers/libgles-omap3/mouse.desktop
deleted file mode 100644
index a56531014c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/mouse.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Mouse Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Mouse/OGLESMouse
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop b/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
deleted file mode 100644
index 9d7194a586..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=OptimizeMesh Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/OptimizeMesh/OGLESOptimizeMesh
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/particles.desktop b/recipes/powervr-drivers/libgles-omap3/particles.desktop
deleted file mode 100644
index 1d71b9d25c..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/particles.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Particles Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Particles/OGLESParticles
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/polybump.desktop b/recipes/powervr-drivers/libgles-omap3/polybump.desktop
deleted file mode 100644
index d7cf1af8bd..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/polybump.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=PolyBump Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/PolyBump/OGLESPolyBump
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr
index 4a698da60d..2a8260baec 100755
--- a/recipes/powervr-drivers/libgles-omap3/rc.pvr
+++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr
@@ -1,14 +1,39 @@
#!/bin/sh
+PATH=$PATH:/usr/sbin
+
+BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')"
+YRES="$(fbset | grep geom | awk '{print $3}')"
CPUTYPE="$(cputype)"
-if [ $CPUTYPE = "OMAP3530" ]; then
+if [ "$1" = "" ]; then
+ echo PVR-INIT: Please use start, stop, or restart.
+ exit 1
+fi
+
+if [ "$1" = "stop" -o "$1" = "restart" ]; then
+ echo Stopping PVR
+ #rmmod bc_example
+ rmmod omaplfb 2>/dev/null
+ rmmod pvrsrvkm 2>/dev/null
+fi
- rmmod omaplfb
- rmmod pvrsrvkm
+if [ "$1" = "stop" ]; then
+ exit 0
+fi
- insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
+# 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 $(expr $YRES \* 3)
+
+if [ $CPUTYPE = "OMAP3530" ]; then
+ echo Starting PVR
+ insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
+ #modprobe bc_example
modprobe omaplfb
pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
@@ -20,11 +45,26 @@ if [ $CPUTYPE = "OMAP3530" ]; then
mknod /dev/pvrsrvkm c $pvr_maj 0
chmod 666 /dev/pvrsrvkm
- /usr/bin/pvrsrvinit
+ touch /etc/powervr-esrev
- # Set SGX to full speed
- devmem2 0x48004b40 w 0
+ SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
+ ES_REVISION="$(cat /proc/cpuinfo | grep "CPU revision" | awk -F: '{print $2}')"
+
+ if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
+ echo -n "Starting SGX fixup for"
+ if [ "${ES_REVISION}" = " 3" ] ; then
+ echo " ES3.x"
+ cp -a /usr/lib/ES3.0/* /usr/lib
+ cp -a /usr/bin/ES3.0/* /usr/bin
+ else
+ echo "ES 2.x"
+ cp -a /usr/lib/ES2.0/* /usr/lib
+ cp -a /usr/bin/ES2.0/* /usr/bin
+ fi
+ echo "${ES_REVISION}" > /etc/powervr-esrev
+ fi
+ /usr/bin/pvrsrvinit
else
- echo No SGX hardware, not starting pvrsinit
+ echo No SGX hardware, not starting PVR
fi
diff --git a/recipes/powervr-drivers/libgles-omap3/sample.desktop b/recipes/powervr-drivers/libgles-omap3/sample.desktop
new file mode 100644
index 0000000000..6bacac9277
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/sample.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=NAME Demo
+Comment=OGLES Demo
+Exec=EXEC
+Icon=star
+Type=Application
+Categories=Graphics;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/shaders.desktop b/recipes/powervr-drivers/libgles-omap3/shaders.desktop
deleted file mode 100644
index bee8c92fb9..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/shaders.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Shaders Demo
-Comment=OGLES2 Demo
-Exec=/usr/demos/OGLES2/Shaders/OGLES2Shaders
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop b/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
deleted file mode 100644
index 0f228d5d27..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=ShadowTechniques Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/ShadowTechniques/OGLESShadowTechniques
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox.desktop b/recipes/powervr-drivers/libgles-omap3/skybox.desktop
deleted file mode 100644
index 69a7f9418b..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/skybox.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Skybox Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Skybox/OGLESSkybox
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox2.desktop b/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
deleted file mode 100644
index a2b02f72f6..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Skybox2 Demo
-Comment=OGLES2 Demo
-Exec=/usr/demos/OGLES2/Skybox2/OGLES2Skybox2
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/trilinear.desktop b/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
deleted file mode 100644
index 3e105ac182..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Trilinear Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Trilinear/OGLESTrilinear
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop b/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
deleted file mode 100644
index 9bad690555..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=UserClipPlanes Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/UserClipPlanes/OGLESUserClipPlanes
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3/vase.desktop b/recipes/powervr-drivers/libgles-omap3/vase.desktop
deleted file mode 100644
index 06064349d6..0000000000
--- a/recipes/powervr-drivers/libgles-omap3/vase.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Vase Demo
-Comment=OGLES Demo
-Exec=/usr/demos/OGLES/Vase/OGLESVase
-Icon=star
-Type=Application
-Categories=Demos;
-
diff --git a/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb b/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
index 81fff90195..6d84f14d80 100644
--- a/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
+++ b/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
@@ -1,10 +1,8 @@
BINLOCATION = "${S}/gfx_rel_es3.x"
-DEFAULT_PREFERENCE = "2"
-
require libgles-omap3.inc
-PR = "r1"
+PR = "r2"
# download required binary distribution from:
# http://software-dl.ti.com/dsps/forms/export.html?prod_no=/OMAP35x_Graphics_SDK_setuplinux_3_01_00_02.bin
@@ -13,21 +11,8 @@ SGXPV = "3_01_00_02"
IMGPV = "1.4.14.2514"
BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
-# The ES2.x and ES3.x CPUs have different SGX hardware, so we need to install 2 sets of userspace
-do_install_append() {
- install -d ${D}${libdir}/ES3.0
- install -d ${D}${libdir}/ES2.0
- install -d ${D}${bindir}/ES3.0
- install -d ${D}${bindir}/ES2.0
- cp ${S}/gfx_rel_es2.x/lib* ${D}${libdir}/ES2.0/
- cp ${S}/gfx_rel_es2.x//p[dv]* ${D}${bindir}/ES2.0/
- cp ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/
- cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0
-}
-# Quality control is really poor on these SDKs, so hack around the latest madness:
-FILES_${PN} += "${libdir}/*.so "
-FILES_${PN}-dev = "${includedir}"
+
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-DSS2.patch b/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-DSS2.patch
deleted file mode 100644
index 7dbf4d9e6e..0000000000
--- a/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-DSS2.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 8b6a6bb6702ab796ab56dbbd6caa1b271ed4485b Mon Sep 17 00:00:00 2001
-From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-Date: Fri, 9 Jan 2009 12:40:28 +0200
-Subject: [PATCH] Compile fixes for DSS2
-
----
- .../dc_omap3430_linux/omaplfb_displayclass.c | 6 ++++--
- .../3rdparty/dc_omap3430_linux/omaplfb_linux.c | 14 ++++----------
- 2 files changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c
-index 7b8ec37..6fde397 100755
---- a/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c
-+++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c
-@@ -57,8 +57,6 @@ PVRSRV_ERROR OMAPLFBPostPower (IMG_HANDLE hDevHandle,
- PVR_POWER_STATE eCurrentPowerState);
- #endif
-
--extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
--
- static PFN_DC_GET_PVRJTABLE pfnGetPVRJTable = IMG_NULL;
-
- static OMAPLFB_DEVINFO * GetAnchorPtr(IMG_VOID)
-@@ -124,6 +122,9 @@ static void WorkHandler(
- static PVRSRV_ERROR Flip(OMAPLFB_SWAPCHAIN *psSwapChain,
- IMG_UINT32 aPhyAddr)
- {
-+ printk("no flipping\n");
-+ return PVRSRV_OK;
-+#if 0
- if (1 /* omap2_disp_get_output_dev(OMAP2_GRAPHICS) == OMAP2_OUTPUT_LCD */)
- {
- omap_dispc_set_plane_base(0, aPhyAddr);
-@@ -137,6 +138,7 @@ static PVRSRV_ERROR Flip(OMAPLFB_SWAPCHAIN *psSwapChain,
- }
-
- return PVRSRV_ERROR_INVALID_PARAMS;
-+#endif
- }
-
- static IMG_VOID EnableVSyncInterrupt(OMAPLFB_SWAPCHAIN *psSwapChain)
-diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-index acf1631..12f3e32 100755
---- a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-+++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-@@ -37,6 +37,7 @@
- #include <linux/slab.h>
- #include <linux/errno.h>
- #include <linux/interrupt.h>
-+#include <mach/display.h>
-
- #include <asm/io.h>
-
-@@ -52,10 +53,6 @@ MODULE_LICENSE("GPL");
- MODULE_SUPPORTED_DEVICE(DRVNAME);
-
-
--extern int omap_dispc_request_irq(unsigned long, void (*)(void *), void *);
--extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
--
--
- #define unref__ __attribute__ ((unused))
-
-
-@@ -101,17 +98,14 @@ PVRSRV_ERROR OMAPLFBGetLibFuncAddr (IMG_CHAR *szFunctionName, PFN_DC_GET_PVRJTAB
- }
-
- static void
--OMAPLFBVSyncISR(void *arg)
-+OMAPLFBVSyncISR(void *arg, u32 mask)
- {
- (void) OMAPLFBVSyncIHandler((OMAPLFB_SWAPCHAIN *)arg);
- }
-
--#define DISPC_IRQ_VSYNC 0x0002
--
- PVRSRV_ERROR OMAPLFBInstallVSyncISR(OMAPLFB_SWAPCHAIN *psSwapChain)
- {
--
-- if (omap_dispc_request_irq(DISPC_IRQ_VSYNC, OMAPLFBVSyncISR, psSwapChain) != 0)
-+ if (omap_dispc_register_isr(OMAPLFBVSyncISR, psSwapChain, DISPC_IRQ_VSYNC) != 0)
- return PVRSRV_ERROR_OUT_OF_MEMORY; /* not worth a proper mapping */
-
- return PVRSRV_OK;
-@@ -120,7 +114,7 @@ PVRSRV_ERROR OMAPLFBInstallVSyncISR(OMAPLFB_SWAPCHAIN *psSwapChain)
-
- PVRSRV_ERROR OMAPLFBUninstallVSyncISR (OMAPLFB_SWAPCHAIN *psSwapChain)
- {
-- omap_dispc_free_irq(DISPC_IRQ_VSYNC, OMAPLFBVSyncISR, psSwapChain);
-+ omap_dispc_unregister_isr(OMAPLFBVSyncISR);
-
- return PVRSRV_OK;
- }
---
-1.5.6.3
-
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0001-New-build-system-for-SGX.patch b/recipes/powervr-drivers/omap3-sgx-modules/0001-New-build-system-for-SGX.patch
deleted file mode 100644
index 9751bcd88d..0000000000
--- a/recipes/powervr-drivers/omap3-sgx-modules/0001-New-build-system-for-SGX.patch
+++ /dev/null
@@ -1,247