[maemo-developers] PowerVR

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Mon Nov 19 22:53:01 EET 2007
Hello all,

As some of you may know there's a 2.6.x package of binaries available 
from Ti for the OMAP2430 (the link for the OMAP2420 re-directs to these 



OpenSource Kernel v2.6.10
Open GL ES v1.1 and OpenVG 1.0 SDK based on OMAPSW vL16.4 BSP, use 
GCC-3.4.4 Tool Chain

Curiously the kernel module in this SDK is compiled for 2.6.14, but anyway...

Anyway we were chatting on IRC and wondering whether they can be made 
to work somehow. There is the obvious problem of the wrong kernel 
version but this can be forced and then one runs into the undefined 

To solve both these problems I used this script (thanks X-Fade for the 

#! /bin/bash

[ -z "$DEPMOD" ] && DEPMOD=depmod

#new kernel version modinfo section
# alter this version to match what's running on your N800
# `uname -r'
echo -ne "kernel_version=2.6.21-omap1\0" > $MI

#build the objcopy command

#fix symbols which don't exist in the new kernel
# I chose random names to rename these symbols
# they exist in exports from the kernel module but are not called
# by any of the files contained in the SDK so I thought it was safe
# to get rid of them
CMD="$CMD --redefine-sym=pci_bus_write_config_dword=sprintf"
CMD="$CMD --redefine-sym=pci_find_slot=printk"
CMD="$CMD --redefine-sym=pci_bus_read_config_dword=snprintf"

# these two look like the original names have been wrapped
CMD="$CMD --redefine-sym=__arch_copy_from_user=__copy_from_user"
CMD="$CMD --redefine-sym=__arch_copy_to_user=__copy_to_user"

#replace the modinfo section with the new one
CMD="$CMD --remove-section=.modinfo --add-section=.modinfo=$MI"
CMD="$CMD $*"

#run the command

#remove the section file
rm -f $MI


After doing this the kernel module can be modprobed (move it to 
/lib/modules/`uname -r'/) and it creates sysfs entries. I think there 
should be a /dev entry created, I have to look into the name and 
numbers and see if I need to create it myself (it may be that the 
driver waits for a connection before doing so I suppose).

Next step was to look at the other binaries in the SDK. I chose 
power_test to test producing the following:

Nokia-N800-:/home/user/pvr# /lib/ld-linux.so.3 --list ./power_test
./power_test: /lib/libc.so.6: version `GLIBC_2.0' not found (required 
by ./power_test)
./power_test: /lib/libc.so.6: version `GLIBC_2.1' not found (required 
by /home/user/pvr/libsrv_um_1.1.33.561.so)
./power_test: /lib/libc.so.6: version `GLIBC_2.0' not found (required 
by /home/user/pvr/libsrv_um_1.1.33.561.so)
         libsrv_um_1.1.33.561.so => 
/home/user/pvr/libsrv_um_1.1.33.561.so (0x40004000)
         libdl.so.2 => /lib/libdl.so.2 (0x41220000)
         libc.so.6 => /lib/libc.so.6 (0x41028000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.3 (0x2a000000)

So an older version of libc and the ABI. suihkulokki suggested using an 
old ABI chroot setup. Any other thoughts (or anyone who fanices trying 
that)? Alternatively one could probably build an image that uses the 
old ABI using bitbake/OE or Mamona, and also match the libc and xserver 
versions to boot.

Unless anyone has any other suggestions I think that is what I'll do 
once I have an N810 to use day-to-day. If we can both insert the kernel 
module and run the binaries it should be possible to eavesdrop on the 
communications between the user-space-side server thread and the kernel 
driver itself and try to work out how it all fits together (so it can 
be used in a more up-to-date system).

I'm not sure whether the fact that this SDK is for the OMAP2430 will 
cause issues.

I'm also not sure whether there's many/any modifications to the x-server.



More information about the maemo-developers mailing list