libgles-omap, omap3-sgx-modules: add SDK 3.01.00.02/1.4.14.2514 release
authorKoen Kooi <koen@openembedded.org>
Mon, 16 Nov 2009 10:45:21 +0000 (11:45 +0100)
committerKoen Kooi <koen@openembedded.org>
Wed, 18 Nov 2009 09:13:52 +0000 (10:13 +0100)
recipes/powervr-drivers/libgles-omap3-3.01.00.02/rc.pvr [new file with mode: 0755]
recipes/powervr-drivers/libgles-omap3.inc
recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb [new file with mode: 0644]
recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2514.bb [new file with mode: 0644]

diff --git a/recipes/powervr-drivers/libgles-omap3-3.01.00.02/rc.pvr b/recipes/powervr-drivers/libgles-omap3-3.01.00.02/rc.pvr
new file mode 100755 (executable)
index 0000000..1b3c274
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+CPUTYPE="$(cputype)"
+
+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
+
+if [ "$1" = "stop" ]; then
+       exit 0
+fi
+
+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`
+
+       if [ -e /dev/pvrsrvkm ] ; then 
+               rm -f /dev/pvrsrvkm
+       fi
+
+       mknod /dev/pvrsrvkm c $pvr_maj 0 
+       chmod 666 /dev/pvrsrvkm
+
+       touch /etc/powervr-esrev
+
+       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 PVR
+fi
+
index 79dcf59..208da9e 100644 (file)
@@ -89,10 +89,7 @@ do_install () {
        install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
 
        cp -pP ${BINLOCATION}/*_test ${D}${bindir}/
-       cp -pP ${BINLOCATION}/gl2info ${D}${bindir}/
-       cp -pP ${BINLOCATION}/gles1test1 ${D}${bindir}/
-       cp -pP ${BINLOCATION}/gles1_texture_stream ${D}${bindir}/
-       cp -pP ${BINLOCATION}/gles2test1 ${D}${bindir}/
+       cp -pP ${BINLOCATION}/gl* ${D}${bindir}/
        cp -pP ${BINLOCATION}/p[dv]* ${D}${bindir}/
        cp -pP ${BINLOCATION}/xgles1test1 ${D}${bindir}/
 
diff --git a/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb b/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
new file mode 100644 (file)
index 0000000..7d5af47
--- /dev/null
@@ -0,0 +1,30 @@
+BINLOCATION = "${S}/gfx_rel_es3.x"
+
+require libgles-omap3.inc
+
+DEFAULT_PREFERENCE = "-1"
+# 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
+
+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_1.4.14.2514.bb b/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2514.bb
new file mode 100644 (file)
index 0000000..9da9a47
--- /dev/null
@@ -0,0 +1,33 @@
+DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs"
+LICENSE = "GPLv2"
+
+DEFAULT_PREFERENCE = "-1"
+
+require ../ti/ti-dspbios.inc
+
+# 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
+
+SGXPV = "3_01_00_02"
+IMGPV = "1.4.14.2514"
+BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
+
+SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
+
+S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}/GFX_Linux_KM"
+
+inherit module
+
+PVRBUILD = "release"
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+MAKE_TARGETS = " BUILD=${PVRBUILD}"
+
+do_install() {
+       mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
+       cp ${S}/pvrsrvkm.ko \
+          ${S}/services4/3rdparty/dc_omap3430_linux/omaplfb.ko  \
+          ${S}/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \
+          ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
+}