Kodi Community Forum
[LINUX] XBMC for Linux port to ARM architecture CPU and SoC chips? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
--- Thread: [LINUX] XBMC for Linux port to ARM architecture CPU and SoC chips? (/showthread.php?tid=35139)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48


- phusho - 2010-11-03

wigout Wrote:It is possible to run other applications than the stock player.

It is also possible, I believe though it is untested, to trick the player into loading roms other than the encrypted ones in the firmware. That's not a very transparent procedure, so I'm really just guessing. I'd go into more details, but it would likely bore someone to tears.

Here's a page with some of my findings (a bit out of date as the process for telnetd access has changed with the move from android 1.6 to android 2.1):
http://minimodding.com/tiki-index.php?page=HDX+Bone

The *easier* route is to hijack the existing kernel/rootfilesystem, which is very possible.

-wigout

HDX bone is flashable through USBotG input but it need some modifications with soldering and special software. Telechip platforms can be flashed through mmc card but need special boot loader for this purpose. One hint for enthusiasts. All CPU-s are the same and clock speed is set through boot loader so on same board you can have 540 and 720 and 300 smth, you can set memory speed and timing.

About XBMC, stock theme works ok with little hiccups on crowded scenes (whether - 20 fps, movie list 17-19 fps). I have reduced pictures resolution to decrease load time. CPU is always on 100 % and I can't find the bottleneck. I think it is not GPU Bound. Even started some movies on Software decoder it was fun to watch slide show Laugh. Next step is to incorporate Telechip hardware decoders (OMX based though not entirely on standard) and profile code.


- McGeagh - 2010-11-03

I have access to other Mali hardware boards, and would love to try it out. Please submit patches, I am very interested in this.

Thanks, and good work!


- topfs2 - 2010-11-03

For those interested, I have made an ubuntu minimal which runs XBMC on the PandaBoard. Since I currently don't have a screen I have only been able to test it with 640x480 which it does confluence in 100fps (and thats hardcoded limit in xbmc so probably does more). While this says nothing about how good it will behave in 1080p I just wanted to share the news.


Why my XBMC load a picture cost 4~7 seconds? - earthwo - 2010-11-04

I compiled xbmc by source at an ARMv7 architecture with Ubuntu. But it runs very slowly.Here is some of the log:
.......
22:48:24 T:1106833200 M:320245760 ERROR: CXRandR::Query - unable to open xrandr xml
22:48:24 T:1106833200 M:320245760 NOTICE: Setup SDL
22:48:25 T:1106833200 M:319348736 DEBUG: CKeyboardStat::Initialize - XKb symbols pc_us_inet(evdev)
22:48:25 T:1106833200 M:319348736 INFO: LIRC Initialize: connect failed: No such file or directory
22:48:25 T:1106833200 M:319348736 DEBUG: Failed to connect to LIRC. Retry in 10s.
22:48:25 T:1106833200 M:319348736 INFO: Drives are mapped
22:48:25 T:1106833200 M:319348736 NOTICE: load settings...
.......
22:48:25 T:1106833200 M:319393792 DEBUG: CPlayerSelectionRule::Initialize: creating rule: nsv
......
22:48:26 T:1106833200 M:319066112 DEBUG: RefreshEGLContext Succeeded! Format:A0|R5|G6|B5|BPP16
22:48:26 T:1106833200 M:319066112 INFO: GLES: Maximum texture width: 2048
22:48:26 T:1106833200 M:319066112 DEBUG: SECTION:LoadDLL(special://xbmc/system/ImageLib-arm.so)
22:48:26 T:1106833200 M:319066112 DEBUG: Loading: /media/xbmc/xbmc-arm/system/ImageLib-arm.so
22:48:26 T:1106833200 M:317923328 DEBUG: EGL_EXTENSIONS: eglCreatePbufferFromClientBuffer EGL_KHR_image EGL_AMD_create_image
22:48:26 T:1106833200 M:317923328 NOTICE: GL_VENDOR = Advanced Micro Devices, Inc.
22:48:26 T:1106833200 M:317923328 NOTICE: GL_RENDERER = AMD Z430
22:48:26 T:1106833200 M:317923328 NOTICE: GL_VERSION = OpenGL ES 2.0
22:48:26 T:1106833200 M:317923328 NOTICE: GL_EXTENSIONS = GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_AMD_tiled_rendering GL_EXT_texture_filter_anisotropic GL_EXT_
texture_type_2_10_10_10_REV GL_EXT_bgra GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mip
map GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_O
ES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_NV_fence
22:48:26 T:1106833200 M:317923328 DEBUG: Shader - Loading shader file guishader_frag.glsl
22:48:26 T:1106833200 M:317923328 DEBUG: Shader - Loading shader file guishader_vert.glsl
22:48:26 T:1106833200 M:317288448 DEBUG: GL: Vertex Shader compilation log:
22:48:26 T:1106833200 M:317288448 DEBUG: GL: Vertex Shader compiled successfully
22:48:26 T:1106833200 M:317923328 DEBUG: GL: Pixel Shader compilation log:
22:48:26 T:1106833200 M:317923328 DEBUG: GL: Fragment Shader compiled successfully
22:48:26 T:1106833200 M:317796352 DEBUG: GUI Shader - Initialise successful : 0xa9e8b8
22:48:26 T:1106833200 M:317796352 WARNING: EGL: Same window as before, refreshing context
22:48:26 T:1106833200 M:317796352 INFO: GLES: Maximum texture width: 2048
22:48:26 T:1106833200 M:317796352 INFO: load language info file: special://xbmc/language/English/langinfo.xml
22:48:27 T:1106833200 M:316399616 INFO: load language fileConfusedpecial://xbmc/language/English/strings.xml
22:48:27 T:1106833200 M:316399616 INFO: load keymapping
22:48:27 T:1106833200 M:316399616 INFO: Loading special://xbmc/system/keymaps/gamepad.xml
.....
22:48:27 T:1106833200 M:316399616 INFO: Loading special://xbmc/system/Lircmap.xml
22:48:27 T:1106833200 M:316399616 DEBUG: CButtonTranslator::Load - no userdata Lircmap.xml found, skipping
22:48:27 T:1106833200 M:316403712 INFO: Checking skin version of: Confluence
22:48:27 T:1106833200 M:316403712 INFO: Skin version is: 2.11 (2.110000)
22:48:27 T:1106833200 M:316403712 INFO: GUI format 1024x768 1024x768
....
22:48:27 T:1106833200 M:316399616 INFO: Skin version is: 2.11
22:48:27 T:1106833200 M:316399616 INFO: Loading skin includes from /media/xbmc/xbmc-arm/skin/Confluence/720p/includes.xml
22:48:27 T:1106833200 M:315777024 INFO: load fonts for skin...
22:48:27 T:1106833200 M:315777024 INFO: Loading fonts from special://xbmc/skin/Confluence/720p/Font.xml
22:48:27 T:1106833200 M:313618432 INFO: load new skin...
22:48:27 T:1106833200 M:313618432 INFO: Skin version is: 2.11 (2.110000)
22:48:27 T:1106833200 M:313618432 INFO: Loading skin file: Home.xml
22:48:28 T:1106833200 M:312987648 DEBUG: Load Home.xml: 160.15ms
22:48:28 T:1106833200 M:312987648 INFO: Loading user windows, path special://xbmc/skin/Confluence/720p
22:48:28 T:1106833200 M:312987648 INFO: Loading skin file: special://xbmc/skin/Confluence/720p/custom_SkinSetting_1111.xml
.......
22:48:28 T:1106833200 M:312987648 DEBUG: Load Skin XML: 334.40ms
22:48:28 T:1106833200 M:312987648 INFO: initialize new skin...
22:48:28 T:1106833200 M:312987648 INFO: Loading skin file: Pointer.xml
22:48:28 T:1106833200 M:312987648 DEBUG: Load Pointer.xml: 5.76ms
22:48:28 T:1106833200 M:312987648 DEBUG: Alloc resources: 35.37ms (6.30 ms skin load)
......
22:48:28 T:1106833200 M:312905728 INFO: skin loaded...
22:48:28 T:1106833200 M:312922112 DEBUG: SECTION:LoadDLL(libcurl.so.4)
22:48:28 T:1106833200 M:312922112 DEBUG: Loading: libcurl.so.4
22:48:28 T:1106833200 M:312922112 DEBUG: Activating window ID: 12999
22:48:28 T:1106833200 M:312922112 DEBUG: Checking if window ID 12999 is locked.
22:48:28 T:1106833200 M:312922112 DEBUG: ------ Window Init (Startup.xml) ------
22:48:28 T:1106833200 M:312922112 INFO: Loading skin file: Startup.xml
22:48:28 T:1106833200 M:312922112 DEBUG: Load Startup.xml: 20.59ms
22:48:28 T:1106833200 M:312922112 DEBUG: Alloc resources: 21.15ms (21.14 ms skin load)
22:48:28 T:1106833200 M:312922112 INFO: removing tempfiles
22:48:28 T:1106833200 M:312922112 DEBUG: DBus: Creating message to org.freedesktop.ConsoleKit on /org/freedesktop/ConsoleKit/Manager with interface org.freedesktop.ConsoleKit.Manager and method CanStop
....
22:48:28 T:1106833200 M:312799232 NOTICE: initialize done
22:48:28 T:1106833200 M:312799232 NOTICE: Running the application...
22:48:28 T:1106833200 M:312799232 DEBUG: ExecuteXBMCAction : Translating SetFocus(10)
22:48:28 T:1106833200 M:312799232 DEBUG: ExecuteXBMCAction : To SetFocus(10)
22:48:28 T:1106833200 M:312799232 DEBUG: Process - no user autoexec.py (/home/ubuntu/.xbmc/scripts/autoexec.py) found, skipping
......
22:48:29 T:1179374544 M:311341056 DEBUG: Process - The source file to load is /media/xbmc/xbmc-arm/scripts/autoexec.py
22:48:29 T:1179374544 M:311341056 DEBUG: Process - Setting the Python path to /media/xbmc/xbmc-arm/scripts:/media/xbmc/xbmc-arm/system/python/python24.zip:/media/xbmc/xbmc-arm/system/python/lib/python2.4/:/media/xbmc/xbmc-arm/system/py
thon/lib/python2.4/plat-linux2:/media/xbmc/xbmc-arm/system/python/lib/python2.4/lib-tk:/media/xbmc/xbmc-arm/system/python/lib/python2.4/lib-dynload
22:48:29 T:1179374544 M:311341056 DEBUG: Process - Entering source directory /media/xbmc/xbmc-arm/scripts
22:48:29 T:1179374544 M:311341056 INFO: Scriptresult: Success
22:48:29 T:1196151760 M:311341056 DEBUG: thread start, auto delete: 0
22:48:29 T:1196151760 M:311341056 NOTICE: DS: Starting DBUS server in Run Application aka thread
22:48:29 T:1106833200 M:311341056 DEBUG: CLastfmScrobbler: Clearing session.
22:48:29 T:1106833200 M:311341056 DEBUG: CLibrefmScrobbler: Clearing session.
22:48:29 T:1204540368 M:311205888 DEBUG: thread start, auto delete: 1
22:48:29 T:1106833200 M:311840768 DEBUG: ExecuteXBMCAction : Translating ReplaceWindow(Home)
22:48:29 T:1106833200 M:311840768 DEBUG: ExecuteXBMCAction : To ReplaceWindow(Home)
22:48:29 T:1106833200 M:311840768 DEBUG: Activating window ID: 10000
22:48:29 T:1106833200 M:311840768 DEBUG: Checking if window ID 10000 is locked.
22:48:29 T:1106833200 M:311840768 DEBUG: ------ Window Deinit (Startup.xml) ------
22:48:29 T:1106833200 M:311840768 DEBUG: ------ Window Init (Home.xml) ------
22:48:29 T:1106833200 M:311713792 DEBUG: Alloc resources: 190.89ms (0.00 ms skin load)
22:48:29 T:1215697872 M:311709696 DEBUG: thread start, auto delete: 1
22:48:29 T:1215697872 M:311709696 INFO: WEATHER: Downloading weather
......
22:48:36 T:1204540368 M:289665024 DEBUG: DoWork - took 6885 ms to load special://skin/backgrounds/videos.jpg
22:48:36 T:1224086480 M:293986304 DEBUG: DoWork - took 6844 ms to load special://skin/backgrounds/videos.jpg


- topfs2 - 2010-11-04

Loading of images is heavily limited based on two factors.
  1. Read speed where xbmc is installed
  2. CPU to decode the picture

Generally none of these are to good on ARM platforms. We hope to have support for compression at some point to limit both (as its less to read and nothing to decode). using xbr should help though but I have had mixed result with the packer on arm (if you pack on normal hw it works though).


- earthwo - 2010-11-04

Thanks for quickly reply.

But anyway the picture is only about 700K, it should not cost so much time at arm with 800Mhz CPU, I think.

I also tried compiled XMBC disabled debug. but it could not run successfully.

My ARM platform has VPU and IPU, it can play 720P video with fullscreen. So I guess maybe something wrong when I complied.

I configed with this option and then make:
configure --enable-gles


- McGeagh - 2010-11-04

I will strive to get me a panda board and test this @1080p for you... but im away for two weeks so this may take a while...regardless ill keep everyone updated.


- topfs2 - 2010-11-04

We don't use either of those when we are decoding pictures, all is done on the CPU. It might not be why its slow for you but its likely, 4-7 seconds is alot though.

Whats the image? is it a background image for the skin?


- topfs2 - 2010-11-04

Awesome! Looking forward to your findings!

I'll try to get myself a cheap second hand 15" so I can develop something atleast. I've tried running 480p content on the 480p and it runs full speed, 25fps in my case, (with vnc overhead) and with our sgx shaders. Compare this to the same scenario with beagle c4 and it runs at about 2-4 fps Smile. This tells a lot about the sgx, even though we shouldn't use the shaders for yuv to rgb transform the core is clearly much much faster.


- phusho - 2010-11-08

Ok for those that want screen saver

Code:
void CGUITextureGLES::DrawQuad(const CRect &rect, color_t color, CBaseTexture *texture, const CRect *texCoords)
{
  if (texture)
  {
    glActiveTexture(GL_TEXTURE0);
    texture->LoadToGPU();
    glBindTexture(GL_TEXTURE_2D, texture->GetTextureObject());
    glEnable(GL_TEXTURE_2D);
  }
  else
    glDisable(GL_TEXTURE_2D);

  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
  glEnable(GL_BLEND);          // Turn Blending On

  VerifyGLState();

  GLubyte col[4][4];
  GLfloat ver[4][3];
  GLfloat tex[4][2];
  GLubyte idx[4] = {0, 1, 3, 2};        //determines order of triangle strip
  if (texture)
      g_Windowing.EnableGUIShader(SM_TEXTURE);
  else
      g_Windowing.EnableGUIShader(SM_DEFAULT);
  GLint posLoc   = g_Windowing.GUIShaderGetPos();
  GLint colLoc   = g_Windowing.GUIShaderGetCol();
  GLint tex0Loc  = g_Windowing.GUIShaderGetCoord0();

  glVertexAttribPointer(posLoc,  3, GL_FLOAT, 0, 0, ver);
  glVertexAttribPointer(colLoc,  4, GL_UNSIGNED_BYTE, GL_TRUE, 0, col);
  if (texture)
  glVertexAttribPointer(tex0Loc, 2, GL_FLOAT, 0, 0, tex);

  glEnableVertexAttribArray(posLoc);
  if (texture)
  glEnableVertexAttribArray(tex0Loc);
  glEnableVertexAttribArray(colLoc);

  for (int i=0; i<4; i++)
  {
    // Setup Colour Values
    col[i][0] = (GLubyte)GET_R(color);
    col[i][1] = (GLubyte)GET_G(color);
    col[i][2] = (GLubyte)GET_B(color);
    col[i][3] = (GLubyte)GET_A(color);
  }

  // Setup vertex position values
  // ver[0][3] = ver[1][3] = ver[2][3] = ver[3][3] = 0.0f; // FIXME, ver has only 3 elements - this is not correct
//  ver[0][0] = ver[3][0] = rect.x2;
//  ver[0][1] = ver[1][1] = rect.y2;
//  ver[1][0] = ver[2][0] = rect.x2;
//  ver[2][1] = ver[3][1] = rect.y2;

#define ROUND_TO_PIXEL(x) (float)(MathUtils::round_int(x))

  ver[0][0] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalXCoord(rect.x1, rect.y1));
  ver[0][1] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalYCoord(rect.x1, rect.y1));
  ver[0][2] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalZCoord(rect.x1, rect.y1));
  ver[1][0] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalXCoord(rect.x2, rect.y1));
  ver[1][1] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalYCoord(rect.x2, rect.y1));
  ver[1][2] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalZCoord(rect.x2, rect.y1));
  ver[2][0] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalXCoord(rect.x2, rect.y2));
  ver[2][1] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalYCoord(rect.x2, rect.y2));
  ver[2][2] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalZCoord(rect.x2, rect.y2));
  ver[3][0] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalXCoord(rect.x1, rect.y2));
  ver[3][1] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalYCoord(rect.x1, rect.y2));
  ver[3][2] = ROUND_TO_PIXEL(g_graphicsContext.ScaleFinalZCoord(rect.x1, rect.y2));
  if (texture)
  {
  // Setup texture coordinates
  CRect coords = texCoords ? *texCoords : CRect(0.0f, 0.0f, 1.0f, 1.0f);
  tex[0][0] = tex[3][0] = coords.x1;
  tex[0][1] = tex[1][1] = coords.y1;
  tex[1][0] = tex[2][0] = coords.x2;
  tex[2][1] = tex[3][1] = coords.y2;
  }
  glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, idx);

  glDisableVertexAttribArray(posLoc);
  glDisableVertexAttribArray(colLoc);
  if (texture)glDisableVertexAttribArray(tex0Loc);

  g_Windowing.DisableGUIShader();

  if (texture)
    glDisable(GL_TEXTURE_2D);
}

this function was total mess. First coordinates are not scaled to final screen so Z axis is smth very random an screen saver appear as shaded (notice) blue trapezoid. Why blue, because parameters supplied for color were float array casted to byte (that will never gone work). One more thing the shader parameter is SM_TEXTURE so final color is never used and on screen appear what - last used texture which is some random text. It must be SM_DEFAULT. To work this you must put at beginning of file

Code:
#include "MathUtils.h"
#include "GraphicContext.h"

Somth annoying once started screen saver there is constant check in
Code:
void CApplication::RenderScreenSaver()

so you must put at start of the function

Code:
if (!m_bScreenSave && screenSaverFadeAmount == 0)
      return;

last one is my personal preference. better place is before call of the function to avoid some stack operations.


- topfs2 - 2010-11-08

Could you please put it as a patch on trac instead?


- phusho - 2010-11-08

I am not member you know Smile can make patch and send you

edit:

ok McGeagh pm-ed me how to do it Smile

P.P.S: OK done


- earthwo - 2010-11-09

Yes, my picture is the default skin backgroud picture.
I checked config.log and found VDPAU is diabled. So I installed VDPAU 0.4,then reconfigure, but failed when make xbmc.bin:
can't find glTexImage2D for VDPAU.o

What's wrong? Thanks.


- littlegod521 - 2010-11-23

XBMC for Linux port to ARM architecture CPU and SoC chips? could you tell me how to modifying configs and patches and adding Mali 200 drivers in build process?


- slicemaster - 2010-12-01

Hey all,
I’ve been following the development of XBMC for ARM on and off for some time and have been very interested in hearing what has improved over the months.
Last I checked the ARM port could decode and run video perfectly, just not at full speed because the graphics had to be rendered in software using sdl. Has the port from OpenGL to OpenGL ES been finished? Can the arm port playback content reliably? What resolution of video can the port currently handle?
Have all the various features and aspects of XBMC been successfully ported to run on ARM or has it been stripped?

However, these are the main points I’d like updates on…
What’s the status of video playback? Reliable full-speed playback of what? 480p? 720p? 1080p?
Hardware accelerated video decoding? Any work being done to support this?
What’s the status of music playback? MP3? FLAC? OGG? AAC? MP4?
Picture rendering / slideshows?
Network connectivity? Does it work?
Anyways, I’d just like to know what’s going on…because I’m thinking about getting involved in the development process…at the moment I’m proficient in JAVA but I’m also studying the rest of the C-family languages. So I was looking into getting an arm development board and was looking for recommendations…however, if XBMC isn’t real “functional” on ARM yet I may wait until things have matured more.

Cheers
Slice


This forum uses Lukasz Tkacz MyBB addons.