Hi Chahat,
I’m working on getting XBMC running too on Beagleboard_XM. I can share my experiences with you and perhaps some of it will help. I’m rapidly learning about this, so I’m hoping that any experts will step in and correct anything I get wrong.
I have xbmc running the graphics at 22fps but video is only going at 6fps (I think because it is using the default video player which does not use the DSP for acceleration). I am using Angstrom 2012.05 and linux kernel 3.2.18 with a gnome terminal (X11). I am also using the default XBMC 11.0(Eden) r13 recipe that comes with Openembedded-core.
I read somewhere that you can run xbmc from the console, but I haven’t figured out how, so I run it from X11 windows.
Firstly, XBMC appears to use two framebuffers for the video/graphics. These are /dev/fb0 and /dev/fb1 and space needs to be reserved for these in your u-boot startup as bootargs that get passed to linux when U-boot hands over control to the kernel. Here’s my uenv.txt:
dvimode=1024x768MR-24@60
vram=24M
frambuf=0:8M,1:8M
mpurate=1000
setmmcargs=setenv mmcargs 'setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} buddy2=${buddy2} vram=${vr
am} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} omapfb.vram=${frambuf} root=${mmcroot} rootfstype=${mmcrootfstype}’
setmmcboot=setenv mmcboot ‘echo Booting from mmc…;run mmcargs;printenv;bootm ${loadaddr}’
uenvcmd=run setmmcargs; run setmmcboot; run loaduimage; printenv; run mmcboot
The key command here is omapfb.vram=0:8M,1:8M which allocates 8M of memory to fb0 and fb1 accordingly out of the video buffer of 24Mbytes.
The buffers may not ned to be this big, but I noticed a significant improvement in the graphics frame rate when I moved from 4M to 8M.
Also note that in the dvimode command I have set the pixels to 24bpp (bits per pixel). I have read that with beagleboard the max you can use is 16bpp, but on beagleboard_XM 24bpp seems to work. (You will se later why I have it set at 24).
Now when I tried to build XBMC with openembedded I had an error bacuase the bitbake.conf file defined the variables CC and CXX to be prefixed with “ccache”, but the configure script that is auto generated also appended /usr/bin/ccache" to the compiler commands, so there was a recursive “/usr/bin/ccache ccache …” command. I fixed this in the xbmc_git.bb recipe by adding the “–disable-ccache” modifier. AFter that XBMC would build correctly. I’m not sure if this is the correct fix, but it moved me on.
Next I had to add a couple of packages:
opkg install libgles-omap3-x11wsegl
opkg install libcurl5
opkg install xdpyinfo
libgles does get added by the recipe, but I think there is a problem which means that libgles-omap3-x11wsegl.so does not get packaged up correctly.
At this point it might be useful to run some of the graphics tests in /usr/bin. For example:
eglinfo will give you a stream of info about the OpenGL setup.
gles1test1
gles2test1
You can see which tests there are by looking in /usr/bin/ES5.0. The same files are also in /usr/bin and I recommend running the tests from /usr/bin.
Now from inside the Gnome desktop there are three ways to invoke XBMC.
- From the menu at the top.
- Type XBMC in a terminal
- Type /usr/lib/xbmc/xbmc.bin
Methods 1 and 2 call xbm,c.bin via a script /usr/share/xbmc/FEH.py and these first two methods did not work for me and I traced the problem to the FEH.py script when I had the dvimode set to 16bpp.
There is a test of the bpp in the script which failed:
if int(match.group(1)) > 16:
I changed 16 to 15 and this test then passed (but now I I use 24bpp to get round this).
Theer is also part of the script which searches for a phase returned by the function eglinfo. This has an error in it. I replaced the function with this:
def badDirectRendering():
out = os.popen(“eglinfo | grep “EGL client APIs””, ‘r’)
line = out.read()
direct = “OpenGL_ES” not in line
out.close()
return direct
I’m sorry, I don’t remember what the original line was but if you look for the badDirectRendering() function in FEH.py, you will see it.
This gets XBMC running for me (although I also have to opkg install some alsa packages to get sound running (and when I tried to add these as part of the image recipe, it broke everything).
I hope some of this might help you get up and running. If you would like more information on parts of this, let me know and I’ll elaborate more.
I have video at 6fps and am trying to get omapfbplay running (without success at the moment) so that I can try it with DSP accelerated codecs. If anyone has experience here, I’d love information. On the console I get
omapdss DISPC error: failed to set up scaling, fclk too low
omapdss MANAGER error: dispc_ovl_setip failed for ovl 1
omapdss MANAGER error: configure_overlay 1 failed
Looks like one of the clocks is too slow, I’m looking into how to fix it.
In the X11 terminal I get:
[mpeg4 @ 0x157580] get_buffer() failed (0 0 2 0x41086440)
Segmentation fault
Regards
Zigs