| Version 8 (modified by alsutton, 3 years ago) |
|---|
Getting SGX acceleration to work
Everything should work as in androreas image with the instructions
- Get the omap android sdk as mentioned here.
- Get the ARM tool chain from CodeSourcery.
- Change in the gfx_rel_es3.x_android folder (others wont work)
- Mount your froyo image with -o loop
- Run DISCIMAGE=/mountpoint ./install.sh
- 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
- 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);
- Change to the directory OMAP35x_Android_Graphics_SDK_3_01_00_03/GFX_Linux_KM/eurasiacon/build/linux/omap3430_android/kbuild
- Edit the file build_gfx_kernelmodules
- Change DISCIMAGE= to where your froyo image is
- Change KERNELDIR= to the kernel directory (from archos gpl source package, you need to have the kernel compiled before)
- Change ANDROID_ROOT= to the location where you checked out the openaos froyo source
- Change CROSS_COMPILE= to arm-none-eabi-
- Add the bin subdirectory of the arm tool chain to your path.
- Run ./build_gfx_kernelmodules, compilation of pvrsrvkm.ko will work, afterwards omapfb will fail, but we dont care.
- 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
- 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)
- 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.
