Version 2 (modified by andoreas, 3 years ago)

--

Getting SGX acceleration to work

Everything should work as in androreas image with the instructions, except backlight control, which is not included in the following instructions.

  1. get the omap android sdk as mentioned here  http://code.google.com/p/rowboat/wiki/ConfigureAndBuild#Install_the_Android_Graphics_SGX_SDK_on_Host_Machine
  2. change in the gfx_rel_es3.x_android folder (others wont work)
  3. mount your froyo image with -o loop
  4. run DISCIMAGE=/mountpoint ./install.sh
  5. apply the following patch to your init.rc (root of your froyo image)
--- init.rc~ 2010-08-21 18:39:14.000000000 +0200
+++ init.rc 2010-08-24 12:07:31.000000000 +0200
@@ -268,6 +268,11 @@ on boot
 service console /system/bin/sh
     console
 
+# Start of SGX driver
+service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
+   user root
+   oneshot  
+
 # adbd is controlled by the persist.service.adb.enable system property
 service adbd /sbin/adbd
     disabled


  1. apply the following dirty patch to disable thigs that do not compile in OMAP35x_Android_Graphics_SDK_3_01_00_03/GFX_Linux_KM/services4/system/omap3/
--- sysutils_linux.c~	2010-06-01 17:01:09.000000000 +0200
+++ sysutils_linux.c	2010-08-25 01:19:34.248830000 +0200
@@ -36,10 +36,8 @@
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29))
 #include <plat/resource.h>
-#include <plat/omap-pm.h>
 #else
 #include <mach/resource.h>
-#include <mach/omap-pm.h>
 #endif
 
 #include "sgxdefs.h"
@@ -63,15 +61,6 @@ extern struct platform_device *gpsPVRLDM
 
 static PVRSRV_ERROR ForceMaxSGXClocks(SYS_SPECIFIC_DATA *psSysSpecData)
 {
-	PVR_UNREFERENCED_PARAMETER(psSysSpecData);
-
-	/* Pin the memory bus bw to the highest value according to CORE_REV */
-#if defined(SGX530) && (SGX_CORE_REV == 125)
-	if(cpu_is_omap3630())
-		omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev, OCP_INITIATOR_AGENT, 800000);
-#else
-	omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev, OCP_INITIATOR_AGENT, 664000);
-#endif
 	return PVRSRV_OK;
 }
 
@@ -291,7 +280,6 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSy
 		clk_disable(psSysSpecData->psSGX_FCK);
 	}
 
-	omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev, OCP_INITIATOR_AGENT, 0);
 
 	atomic_set(&psSysSpecData->sSGXClocksEnabled, 0);


  1. change to the directory OMAP35x_Android_Graphics_SDK_3_01_00_03/GFX_Linux_KM/eurasiacon/build/linux/omap3430_android/kbuild
  2. edit the file build_gfx_kernelmodules
    1. change DISCIMAGE= to where your froyo image is
    2. change KERNELDIR= to the kernel directory (from archos gpl source package, you need to have the kernel compiled before)
    3. change ANDROID_ROOT= to the location where you checked out the openaos froyo source
  3. run ./build_gfx_kernelmodules, compilation of pvrsrvkm.ko will work, afterwards omapfb will fail, but we dont care.
  4. copy the resulting file OMAP35x_Android_Graphics_SDK_3_01_00_03/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/pvrsrvkm.ko in /system/bin/sgx/ in your froyo image
  5. copy omaplfb.ko from the extracted archos 2.0.28 firmware to /system/bin/sgx/ in your image. (Version compiled from the archos gpl code should also work)
  6. unmount your image, copy to archos and test.

Optional: backlight support

* copy system/lib/hw/lights.archos.so from the extracted archos 2.0.28 firmware to /system/lib/hw/ in your froyo image.