eglInitialise giving an 'EGL_BAD_ALLOC' error

Hi

I’m trying to get GLES running on the SGX and in both my application and the GLES demos (gloes1test1) eglInitialise fails giving the EGL_BAD_ALLOC error code.
The code in question has worked before and I’m running using a new SD card with a console image I’ve built myself on it.
Here’s what I’ve done:

Got the latest code using git pull in my oe/openembedded dir
bitbake console-image
formatted the SD card into 2 partitions (FAT & ext3)
unpacked the image to the ext3 partition of the card
copied the kernel from the boot folder of the console image onto the FAT partition
booted the image up on the beagle board
did opkg update & opkg upgrade on the beagle board
built libgles on my host pc using bitbake
copied libgles ipk files to the beagleboard & installed them
PVRSRV_PIXEL_FORMAT_RGB565 now appears in dmesg
did opkg install directfb on beagle board (needed for my app)
build sdl for directfb on host pc using bitbake (needed for my app)
for some reason this didn’t make an ipk so I copied the libraries to /usr/lib by hand
ran my app and got EGL_BAD_ALLOC on eglInitialise
ran glestest1 and got the same

any ideas what I have done wrong?
I managed to get this working before with a console image I built myself and I used the SD card for ages with no problems
Could it be a problem with the latest modules or libgles?
I’ve seen a post in July where someone else had this problem but no one answered, I also saw the same error in the log of the guy who’s having problems with SVideo output.
Has anyone else had this problem and fixed it?

Thanks in advance,
Mark.

Are you using exact same bootargs in working and non-working scenarios ? I believe EGL_BAD_ALLOC is mostly due to insufficient memory for framebuffer pool used in EGL. Try increasing frambeuffer memory For eg:- specify in bootargs (omapfb.vram=0:8M).

Regards,
Pratheesh

The problem seemed to be that the version of the kernel modules (1607) that I got from doing ‘opkg upgrade’ was incompatible with the user libraries I made using the guide here:
http://code.google.com/p/beagleboard/wiki/HowtoUseSGXunderAngstrom
If I downgraded the modules to 1397 the error didn’t happen.
It seems that the libraries I made using the guide above were out of date.
Does anyone know how I can make the libraries that are compatible with 1607?
Thanks to David Batzle for helping me solve this problem.

Cheers,
Mark.

Mark:

Q: What did you do to "downgraded the modules to 1397"?