[oe] [PATCH] omap3/powervr-drivers: Cleanups & fixes

Andreas Mueller schnitzeltony at gmx.de
Tue Jul 20 14:54:41 UTC 2010


From ee328e5f8b905ec8a2c3de1664679ff1c442e7fa Mon Sep 17 00:00:00 2001
From: Andreas Mueller <schnitzeltony at gmx.de>
Date: Tue, 20 Jul 2010 16:15:37 +0200
Subject: [PATCH] omap3/powervr-drivers: Cleanups & fixes

1. Merge omap3-sgx-modules -> libgles-omap3:
      Reduce memory & built time consumption.
      Note: By 'inherit module' all libgles packages
      get machine specific.
2. Work around the missing (??) function omap_rev_lt_3_0()
      Reading the comment leads to the following
      interpretation: return true for SGXVersion less than
      3.x.
3. Make kernel modules buildable for kernel 2.6.33
      (fix-1.4.14.2616-for-kernel-gt-2.6.32.patch)
4. Install script 'cpu-sgx-rev' returning the SGX version
      supported by CPU (2.x / 3.x / 5.x)

Tested on gumstix / kernel 2.6.33-r80 (git/www.sakoman.com)
under xfce / all demos.

Signed-off-by: Andreas Mueller <schnitzeltony at gmx.de>
---
 recipes/powervr-drivers/files/99-bufferclass.rules |    7 ++
 recipes/powervr-drivers/files/cputype              |    5 ++
 recipes/powervr-drivers/files/rc.pvr               |   70 ++++++++++++++++++++
 recipes/powervr-drivers/files/sample.desktop       |    8 ++
 recipes/powervr-drivers/libgles-omap3.inc          |   44 ++++++++++--
 .../0001-Compile-fixes-for-recent-kernels.patch    |   28 ++++++++
 ...mpile-fixes-for-recent-kernels_3.01.00.06.patch |   37 ++++++++++
 recipes/powervr-drivers/libgles-omap3/cpu-sgx-rev  |   12 ++++
 .../fix-1.4.14.2616-for-kernel-gt-2.6.32.patch     |   46 +++++++++++++
 .../powervr-drivers/libgles-omap3_3.01.00.02.bb    |   10 ++-
 .../powervr-drivers/libgles-omap3_3.01.00.06.bb    |    6 ++-
 .../0001-Compile-fixes-for-recent-kernels.patch    |   28 --------
 .../omap3-sgx-modules_1.4.14.2514.bb               |   36 ----------
 .../omap3-sgx-modules_1.4.14.2616.bb               |   38 -----------
 14 files changed, 262 insertions(+), 113 deletions(-)
 create mode 100644 recipes/powervr-drivers/files/99-bufferclass.rules
 create mode 100755 recipes/powervr-drivers/files/cputype
 create mode 100755 recipes/powervr-drivers/files/rc.pvr
 create mode 100644 recipes/powervr-drivers/files/sample.desktop
 create mode 100644 recipes/powervr-drivers/libgles-omap3/0001-Compile-fixes-for-recent-kernels.patch
 create mode 100644 recipes/powervr-drivers/libgles-omap3/Compile-fixes-for-recent-kernels_3.01.00.06.patch
 create mode 100755 recipes/powervr-drivers/libgles-omap3/cpu-sgx-rev
 create mode 100644 recipes/powervr-drivers/libgles-omap3/fix-1.4.14.2616-for-kernel-gt-2.6.32.patch
 delete mode 100644 recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch
 delete mode 100644 recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2514.bb
 delete mode 100644 recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb

diff --git a/recipes/powervr-drivers/files/99-bufferclass.rules b/recipes/powervr-drivers/files/99-bufferclass.rules
new file mode 100644
index 0000000..780423b
--- /dev/null
+++ b/recipes/powervr-drivers/files/99-bufferclass.rules
@@ -0,0 +1,7 @@
+# Give everyone access to bufferclass nodes and make a compatibility symlink for the first one
+SUBSYSTEM=="bccat", MODE="0666"
+KERNEL=="bccat0", SYMLINK+="bc_cat", MODE="0666"
+
+# Give everyone access to v4l nodes
+SUBSYSTEM=="video4linux", MODE="0666"
+
diff --git a/recipes/powervr-drivers/files/cputype b/recipes/powervr-drivers/files/cputype
new file mode 100755
index 0000000..9dc2b49
--- /dev/null
+++ b/recipes/powervr-drivers/files/cputype
@@ -0,0 +1,5 @@
+#!/bin/sh
+devmem2 0x4800244c | \
+grep 'Value at address' | \
+sed -e 's/.*): //' | \
+sed -e 's/0x5C00/OMAP3503/' -e 's/0x1C00/OMAP3515/' -e 's/0x4C00/OMAP3525/' -e 's/0xC00/OMAP3530/'
diff --git a/recipes/powervr-drivers/files/rc.pvr b/recipes/powervr-drivers/files/rc.pvr
new file mode 100755
index 0000000..b84225e
--- /dev/null
+++ b/recipes/powervr-drivers/files/rc.pvr
@@ -0,0 +1,70 @@
+#!/bin/sh
+PATH=$PATH:/usr/sbin
+
+BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')"
+YRES="$(fbset | grep geom | awk '{print $3}')"
+
+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 bufferclass_ti
+	rmmod omaplfb 2>/dev/null
+	rmmod pvrsrvkm 2>/dev/null
+fi
+
+if [ "$1" = "stop" ]; then
+	exit 0
+fi
+
+# 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 omaplfb
+	modprobe bufferclass_ti
+
+	pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
+        bc_maj=`grep "bc" /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)"
+
+	devmem2 0x48004B48 w 0x2 > /dev/null
+	devmem2 0x48004B10 w 0x1 > /dev/null
+	devmem2 0x48004B00 w 0x2 > /dev/null
+
+	ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x10205:5: -e s:0x10201:3: -e s:0x10003:2: | tail -n1 | awk -F': ' '{print $2}')"
+
+	if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
+		echo -n "Starting SGX fixup for"
+		echo " ES${ES_REVISION}.x"
+		cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
+		cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin	
+		echo "${ES_REVISION}" > /etc/powervr-esrev
+	fi
+	/usr/bin/pvrsrvinit
+else
+	echo No SGX hardware, not starting PVR
+fi
+
diff --git a/recipes/powervr-drivers/files/sample.desktop b/recipes/powervr-drivers/files/sample.desktop
new file mode 100644
index 0000000..eea5e7c
--- /dev/null
+++ b/recipes/powervr-drivers/files/sample.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=NAME Demo
+Comment=OGLES Demo
+Exec=EXEC
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc
index d183486..e515125 100644
--- a/recipes/powervr-drivers/libgles-omap3.inc
+++ b/recipes/powervr-drivers/libgles-omap3.inc
@@ -1,7 +1,7 @@
 DESCRIPTION = "libGLES for the omap3"
 LICENSE = "proprietary-binary"
 
-PR = "r6"
+PR = "r7"
 
 COMPATIBLE_MACHINE = "(dm37x-evm|am37x-evm|am3517-evm|beagleboard|cm-t35|igep0020|omap3-pandora|omap3-touchbook|omap3evm|omapzoom|omapzoom2|overo|palmpre)"
 
@@ -18,14 +18,12 @@ PROVIDES += "virtual/egl"
 #  http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
 # 3. put the OMAP35x_*.bin file in $DL_DIR, i.e. downloads/
 #  mv OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin ./downloads/
-# 4. make the checksum file in ./downloads/ directory:
-#  cd ./downloads/
-#  md5sum OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin > OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin.md5
 # 
 # voila!
 
 SRC_URI = "http://install.source.dir.local/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
 		   file://cputype \
+		   file://cpu-sgx-rev \
 		   file://rc.pvr \
 		   file://sample.desktop \
 		   file://99-bufferclass.rules  \
@@ -37,7 +35,7 @@ S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
 TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
 require ../ti/ti-eula-unpack.inc
 
-BINLOCATION ?= "${S}/gfx_rel"
+BINLOCATION ?= "${S}/gfx_rel_es${PREFERRED_SGX_VERSION}"
 ES2LOCATION ?= "${S}/gfx_rel_es2.x"
 ES3LOCATION ?= "${S}/gfx_rel_es3.x"
 ES5LOCATION ?= "${S}/gfx_rel_es5.x"
@@ -72,6 +70,8 @@ TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L$
 -L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}"
 PARALLEL_MAKE = ""
 
+inherit module
+
 do_compile() {
 	export X11ROOT="${STAGING_DIR_HOST}/usr"
 	export TOOLCHAIN="${TOOLCHAIN_PATH}"
@@ -128,7 +128,28 @@ do_compile() {
 			install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true	
 		done
 	done
+	
 
+	# Modules:	
+	# Fix unknown omap_rev_lt_3_0() in bc_cat.c version dependendent
+	filename_ugly=${S}/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c
+	# omap_rev_lt_3_0() : Interpret as 'version less than 3'
+
+	# We're using 5.x fixed (see below)
+	#if [ '${PREFERRED_SGX_VERSION}' = '2.x' ]; then
+	#	sed -i s:'width_align = omap_rev_lt_3_0() ? 32 \: 8':'width_align = 32':g ${filename_ugly}
+	#else
+	#	sed -i s:'width_align = omap_rev_lt_3_0() ? 32 \: 8':'width_align = 8':g ${filename_ugly}
+	#fi
+	
+	# The old implementation of used fixed version 5.x for kernel modules 
+	# (see Makefile.KM and TI_PLATFORM=omap3630 from omap3-sgx-modules)
+	# Is that intended?
+	sed -i s:'width_align = omap_rev_lt_3_0() ? 32 \: 8':'width_align = 8':g ${filename_ugly}
+
+	# taken from module.bbclass (to have exactly the same conditions as in old omap3-sgx-modules)
+	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+	oe_runmake -C ${S}/GFX_Linux_KM ${MODULE_MAKE_FLAGS} BUILD=${PVRBUILD} TI_PLATFORM=omap3630
 }
 
 do_install () {
@@ -138,6 +159,7 @@ do_install () {
 
 	install -d ${D}${bindir}/
 	install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
+	install -m 0755 ${WORKDIR}/cpu-sgx-rev ${D}${bindir}/
 
 	install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/
 	install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/
@@ -208,6 +230,12 @@ do_install () {
 	install -d ${D}${sysconfdir}/udev/rules.d
 	install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/
 
+	# Modules
+	mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
+	cp ${S}/GFX_Linux_KM/pvrsrvkm.ko \
+	   ${S}/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb.ko  \
+	   ${S}/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \
+	   ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
 }
 
 PACKAGES =+ "${PN}-rawdemos \
@@ -229,7 +257,7 @@ FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so* ${libdir}/*/libpvrPVR
 
 CONFFILES_${PN} = "${sysconfdir}/powervr.ini"
 
-FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*"
+FILES_${PN} += "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/cpu-sgx-rev ${bindir}/*/*"
 FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
 FILES_${PN}-tests = "${bindir}/*"
 FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \
@@ -246,8 +274,6 @@ FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*"
 FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*"
 RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl"
 
-# The libs need the kernel-modules
-RRECOMMENDS_${PN} = "omap3-sgx-modules"
 
 # The initscript calls fbset, cputype calls devmem2
 RDEPENDS_${PN} += "fbset devmem2"
@@ -278,3 +304,5 @@ rm -f /etc/powervr-esrev
 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/0001-Compile-fixes-for-recent-kernels.patch b/recipes/powervr-drivers/libgles-omap3/0001-Compile-fixes-for-recent-kernels.patch
new file mode 100644
index 0000000..7ac0970
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/0001-Compile-fixes-for-recent-kernels.patch
@@ -0,0 +1,28 @@
+From ef693358e658a7cbab4d2696108d9d4240ab8096 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike at compulab.co.il>
+Date: Wed, 2 Dec 2009 10:13:15 +0200
+Subject: [PATCH] Compile fixes for recent kernels
+
+---
+ .../3rdparty/dc_omap3430_linux/omaplfb_linux.c     |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+index 935f78b..4d41829 100755
+--- a/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
++++ b/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+@@ -57,7 +57,11 @@ extern int omap_dispc_request_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
+ #else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++#include <plat/display.h>
++#else
+ #include <mach/display.h>
++#endif
+ #include <linux/console.h>
+ #include <linux/fb.h>
+ #endif
+-- 
+1.6.4.4
+
diff --git a/recipes/powervr-drivers/libgles-omap3/Compile-fixes-for-recent-kernels_3.01.00.06.patch b/recipes/powervr-drivers/libgles-omap3/Compile-fixes-for-recent-kernels_3.01.00.06.patch
new file mode 100644
index 0000000..3852351
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/Compile-fixes-for-recent-kernels_3.01.00.06.patch
@@ -0,0 +1,37 @@
+--- a/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c.old	2010-03-05 10:47:58.000000000 +0100
++++ b/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c	2010-07-20 12:50:50.000000000 +0200
+@@ -45,10 +45,14 @@
+ #include <asm/io.h>
+ 
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+ #include <plat/display.h>
+ #else 
++#include <mach/display.h>
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) */
++#else 
+ #include <asm/arch-omap/display.h>
+-#endif 
++#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) */
+ #else
+ #if !defined (CONFIG_OMAP2_DSS)
+ #define DISPC_IRQ_VSYNC 0x0002
+@@ -56,12 +60,16 @@
+ extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
+ #else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+ #include <plat/display.h>
++#else
++#include <mach/display.h>
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) */
+ #include <linux/console.h>
+ #include <linux/fb.h>
+ static omap_dispc_isr_t *pOMAPLFBVSyncISRHandle = NULL;
+-#endif
+-#endif
++#endif /* !defined (CONFIG_OMAP2_DSS) */
++#endif /* defined (SUPPORT_TI_DSS_FW) */
+ 
+ 
+ 
diff --git a/recipes/powervr-drivers/libgles-omap3/cpu-sgx-rev b/recipes/powervr-drivers/libgles-omap3/cpu-sgx-rev
new file mode 100755
index 0000000..435b6a6
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/cpu-sgx-rev
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# grabbed from http://processors.wiki.ti.com/index.php/GSG:_AM35x_and_OMAP35x_Rebuilding_the_Software#How_to_check_for_SGX_core_revision
+
+devmem2 0x48004B48 w 0x2 > /dev/null
+devmem2 0x48004B10 w 0x1 > /dev/null
+devmem2 0x48004B00 w 0x2 > /dev/null
+devmem2 0x50000014 | \
+grep 'Value at address' | \
+sed -e 's/.*): //' | \
+sed -e 's/0x10205/5.x/' -e 's/0x10201/3.x/' -e 's/0x10003/2.x/'
+
diff --git a/recipes/powervr-drivers/libgles-omap3/fix-1.4.14.2616-for-kernel-gt-2.6.32.patch b/recipes/powervr-drivers/libgles-omap3/fix-1.4.14.2616-for-kernel-gt-2.6.32.patch
new file mode 100644
index 0000000..aee4457
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/fix-1.4.14.2616-for-kernel-gt-2.6.32.patch
@@ -0,0 +1,46 @@
+--- a/GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c.old	2010-07-15 14:29:21.000000000 +0200
++++ b/GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c	2010-07-15 14:35:24.000000000 +0200
+@@ -31,6 +31,12 @@
+ #include <linux/spinlock.h>
+ #include <asm/bug.h>
+ 
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
++#include <linux/semaphore.h>
++#include <linux/resource.h>
++#include <plat/omap-pm.h>
++#else
++
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ #include <linux/semaphore.h>
+ #include <plat/resource.h>
+@@ -48,6 +54,7 @@
+ #endif
+ #endif
+ #endif
++#endif
+ 
+ #include "sgxdefs.h"
+ #include "services_headers.h"
+--- a/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c.old	2010-03-05 10:47:57.000000000 +0100
++++ b/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c	2010-07-15 14:35:12.000000000 +0200
+@@ -32,6 +32,12 @@
+ #include <asm/bug.h>
+ #include <linux/platform_device.h>
+ 
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
++#include <linux/semaphore.h>
++#include <linux/resource.h>
++#include <plat/omap-pm.h>
++#else
++
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ #include <linux/semaphore.h>
+ #include <plat/resource.h>
+@@ -48,6 +54,7 @@
+ #include <asm/arch/resource.h>
+ #endif
+ #endif
++#endif
+ #endif
+ 
+ #if	(LINUX_VERSION_CODE >  KERNEL_VERSION(2,6,27)) && \
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 3b68c18..14b5b07 100644
--- a/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
+++ b/recipes/powervr-drivers/libgles-omap3_3.01.00.02.bb
@@ -1,8 +1,10 @@
-BINLOCATION = "${S}/gfx_rel_es3.x"
+PREFERRED_SGX_VERSION = "3.x"
 
 require libgles-omap3.inc
 
-PR = "r7"
+SRC_URI += "file://0001-Compile-fixes-for-recent-kernels.patch \
+           "
+PR = "r8"
 
 # download required binary distribution from:
 # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
@@ -11,3 +13,7 @@ PR = "r7"
 SGXPV = "3_01_00_02"
 IMGPV = "1.4.14.2514"
 BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
+
+SRC_URI[md5sum] = "7e07019aa76dcdebaa8958df0f89bbe6"
+SRC_URI[sha256sum] = "151d7ce8cbf192a3f0c7e232a5b958cde224309be9ec74ca40031be7d27fa265"
+
diff --git a/recipes/powervr-drivers/libgles-omap3_3.01.00.06.bb b/recipes/powervr-drivers/libgles-omap3_3.01.00.06.bb
index bb7994f..818a2f6 100644
--- a/recipes/powervr-drivers/libgles-omap3_3.01.00.06.bb
+++ b/recipes/powervr-drivers/libgles-omap3_3.01.00.06.bb
@@ -1,4 +1,4 @@
-BINLOCATION = "${S}/gfx_rel_es3.x"
+PREFERRED_SGX_VERSION = "3.x"
 
 ES2LOCATION = "${S}/gfx_rel_es2.x"
 ES3LOCATION = "${S}/gfx_rel_es3.x"
@@ -6,6 +6,10 @@ ES5LOCATION = "${S}/gfx_rel_es5.x"
 
 require libgles-omap3.inc
 
+SRC_URI += "file://fix-1.4.14.2616-for-kernel-gt-2.6.32.patch \
+            file://Compile-fixes-for-recent-kernels_3.01.00.06.patch \
+           "
+
 # download required binary distribution from:
 # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
 # see libgles-omap3.inc for detailed installation instructions
diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch 
b/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch
deleted file mode 100644
index 53b1f27..0000000
--- a/recipes/powervr-drivers/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ef693358e658a7cbab4d2696108d9d4240ab8096 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <mike at compulab.co.il>
-Date: Wed, 2 Dec 2009 10:13:15 +0200
-Subject: [PATCH] Compile fixes for recent kernels
-
----
- .../3rdparty/dc_omap3430_linux/omaplfb_linux.c     |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-index 935f78b..4d41829 100755
---- a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-+++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
-@@ -57,7 +57,11 @@ extern int omap_dispc_request_irq(unsigned long, void (*)(void *), void *);
- extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
- extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
- #else
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
-+#include <plat/display.h>
-+#else
- #include <mach/display.h>
-+#endif
- #include <linux/console.h>
- #include <linux/fb.h>
- #endif
--- 
-1.6.4.4
-
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
deleted file mode 100644
index 6f6e073..0000000
--- a/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2514.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs"
-LICENSE = "GPLv2"
-
-PR_append = "a"
-
-# download required binary distribution from:
-# http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
-# see libgles-omap3.inc for detailed installation instructions
-
-TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
-require ../ti/ti-eula-unpack.inc
-
-SGXPV = "3_01_00_02"
-IMGPV = "1.4.14.2514"
-BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
-
-SRC_URI = "http://install.source.dir.local/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
-           file://0001-Compile-fixes-for-recent-kernels.patch \
-"
-S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}/GFX_Linux_KM"
-
-inherit module
-
-PVRBUILD = "release"
-
-PACKAGE_STRIP = "no"
-
-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
-}
diff --git a/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb b/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb
deleted file mode 100644
index 202c8e6..0000000
--- a/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs"
-LICENSE = "GPLv2"
-
-PR_append = "b"
-
-# download required binary distribution from:
-# http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
-# see libgles-omap3.inc for detailed installation instructions
-
-TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
-require ../ti/ti-eula-unpack.inc
-
-SGXPV = "3_01_00_06"
-IMGPV = "1.4.14.2616"
-BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin"
-
-SRC_URI = "http://install.source.dir.local/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
-"
-S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}/GFX_Linux_KM"
-
-inherit module
-
-PVRBUILD = "release"
-
-PACKAGE_STRIP = "no"
-
-MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=omap3630"
-
-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
-}
-
-SRC_URI[md5sum] = "7aa37ca72f34011d353e72cc67f8aac1"
-SRC_URI[sha256sum] = "02276bc728699c36b0d2411c60f23030aa066ca6b8ed5adb7a40204563a227fb"
-- 
1.5.3.4




More information about the Openembedded-devel mailing list