Kodi Community Forum

Full Version: [LINUX] XBMC for Linux port to ARM architecture CPU and SoC chips?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
It looks like both egl fails and shader compile fail, the later is weird as most should be glsl, the first might be because you need to create the window differently on tegra.

This thread is more on just getting it to run ARM, and beagleboard is the one mcgeagh has, tegra would be an awesome project aswell but since he nor anyone else on the team has one its impossible to help, if you can code contributions are ofcourse highly valuable Smile

Cheers,
Tobias.
Fix the EGL issue before looking into the shader issue.
What version of EGL do you have?
Does your platform support RGB565?
If not, you can easily switch (untested) to using 8888 in WinSystemEGL.cpp

Let me know how it goes
Thanks for the reply.

The version of EGL is 1.4 and the platform supports RGB565.
I tried switching to RGBA8888 but it still didn't work.
And in the code of NV's demo I found that the "configAttributes" it uses is different as follows:

Code:
EGLint configAttrs[] = {
        EGL_RED_SIZE,        1,
        EGL_GREEN_SIZE,      1,
        EGL_BLUE_SIZE,       1,
        EGL_DEPTH_SIZE,     16,
        EGL_SAMPLE_BUFFERS,  0,
        EGL_SAMPLES,         0,
        EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
        EGL_NONE
    };

And there are some evaluations below:

Code:
// If FSAA requested, get a config that supports it
    if (fsaa > 1) {
        configAttrs[9]  = 1;
        configAttrs[11] = fsaa;
    }

I don't know what value they give to "fsaa", I tried "2" and "4", but neither could find a matched configuration.

So I changed the value referring to that(0 to fsaa) and had another try, now the EGL context could be successfully created but the program still failed. Here's part of the log:

Code:
......
06:10:48 T:1099496096 M:332644352   DEBUG: RefreshEGLContext Succeeded! Format:A0|R1|G1|B1|BPP16
......
06:10:48 T:1099496096 M:329379840   DEBUG: GL: Vertex Shader compilation log:
06:10:48 T:1099496096 M:329379840   DEBUG: 14 lines, 0 errors.
06:10:48 T:1099496096 M:329379840   DEBUG: GL: Vertex Shader compiled successfully
06:10:48 T:1099496096 M:329220096   DEBUG: GL: Pixel Shader compilation log:
06:10:48 T:1099496096 M:329220096   DEBUG:
                                            S0021: Fragment shader pragma that conflicts with fixed-function state ignored : #pragma profilepragma blendoperation( gl_FragColor, GL_FUNC_ADD, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA )11 lines, 0 errors.
06:10:48 T:1099496096 M:329220096   DEBUG: GL: Fragment Shader compiled successfully
06:10:48 T:1099496096 M:329220096   ERROR: GL: Error validating shader
06:10:48 T:1099496096 M:329220096   ERROR:
                                            P1202: Texture's gl states do not match with shader's
06:10:48 T:1099496096 M:329220096   ERROR: GUI Shader - Initialise failed
......

By the way, what value should I use to define BPP?

And here is the code they use to initialize EGL:

Code:
// Initialize EGL
    eglStatus = eglInitialize(gfxState.display, 0, 0);

Does it matter?

Is it time I deal with the shader?

Thanks for your time~
It's ok now, the XBMC could now run on Tegra Smile

I think the major issues that blocked XBMC from running on it are:
1. Not support AntiAiliasing. So I removed "EGL_SAMPLES" from "configAttributes".
2. It's strange, I just commented out the "goto error" below "Error validating shader", then it's up, ignoring the error "P1202: Texture's gl states do not match with shader's"... :p

The problem now is that it couldn't play any video format, just crashes with the tip "illegal instruction" on the terminal, while the music playing is normal. Another problem is, there are two overlapped cursors in XBMC, the one on the top(seems to be the system cursor) keeps flashing, is there any solution?

Thank you for your help and... sorry for my poor English. :p
In that log, the reason you get mismatched texture, is because youve set it to RGB 111... that wont work.
either 888 or 565 are the only ones setup atm.

As for the cursor... try disabling the mouse entirely, as its not exactly needed.
hi McGeach. It is very interesting all about port xbmc to arm plataforms. I 'd like to know if there is many changes with regard to xbmc linux x86 version.
The source code looks like very similar with regard to the x86 linux xbmc excepting open gl es libs.

thanks, jaime.
Hi,

The port from x86 to ARM is relatively simple because you simply cross compile the source code. The problem arises when you have assembly code.
XBMC does have asm in places, but the good thing about xbmc is its very modular...
So I either do a C code substitute, or omit that code entirely. This is obviously just a short term fix, as i will make ARM asm versions.
OpenGL ES isnt specific to ARM, but the GPU used on the board I was using, which is the SGX. This was very difficult as its not exactly backwards compatible.

I hope this answers your questions, feel free to contact me any time.

Thanks
McGeagh Wrote:In that log, the reason you get mismatched texture, is because youve set it to RGB 111... that wont work.
either 888 or 565 are the only ones setup atm.

I got the same error using RGB 565...

And I still couldn't play any video clip now. It mostly stops at
Code:
05:39:57 T:1217971184 M:309833728   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
Can you point a way for me?

Here is the entire log after I chose a video to play:
Code:
05:39:57 T:1099500192 M:310874112   DEBUG: new file set audiostream:0
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers(/root/Desktop/TestMovie/AVI_FILE.avi)
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/rtmp/mms/udp
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdfile
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
05:39:57 T:1099500192 M:310874112   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
05:39:57 T:1099500192 M:310181888  NOTICE: DVDPlayer: Opening: /root/Desktop/TestMovie/AVI_FILE.avi
05:39:57 T:1184416752 M:310181888   DEBUG: thread start, auto delete: 1
05:39:57 T:1099500192 M:310181888 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
05:39:57 T:1209582576 M:310181888   DEBUG: thread start, auto delete: 0
05:39:57 T:1209582576 M:310181888  NOTICE: Creating InputStream
05:39:57 T:1209582576 M:310181888    INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: START
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: Checking for common subirs...
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: Done (time: 3 ms)
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: Searching for subtitles...
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: Done (time: 2 ms)
05:39:57 T:1209582576 M:310181888   DEBUG: CacheSubtitles: END (total time: 6 ms)
05:39:57 T:1209582576 M:310181888    INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles done
05:39:57 T:1209582576 M:310181888  NOTICE: Creating Demuxer
05:39:57 T:1209582576 M:310181888   DEBUG: Open - probing detected format [avi]
05:39:57 T:1209582576 M:310181888   DEBUG: Open - av_find_stream_info starting
05:39:57 T:1209582576 M:309915648   DEBUG: Open - av_find_stream_info finished
05:39:57 T:1209582576 M:309915648    INFO: ffmpeg[4818C3F0]: Input #0, avi, from '/root/Desktop/TestMovie/AVI_FILE.avi':
05:39:57 T:1209582576 M:309915648    INFO: ffmpeg[4818C3F0]:   Duration: 00:02:22.97, start: 0.000000, bitrate: 361 kb/s
05:39:57 T:1209582576 M:309915648    INFO: ffmpeg[4818C3F0]:     Stream #0.0: Video: msmpeg4, yuv420p, 480x204, 23.98 tbr, 23.98 tbn, 23.98 tbc
05:39:57 T:1209582576 M:309915648    INFO: ffmpeg[4818C3F0]:     Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s
05:39:57 T:1209582576 M:309915648  NOTICE: Opening video stream: 0 source: 256
05:39:57 T:1209582576 M:309915648  NOTICE: Creating video codec with codec id: 17
05:39:57 T:1209582576 M:309915648   DEBUG: FactoryCodec - Video:  - Opening
05:39:57 T:1209582576 M:309915648  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2 Microsoft variant version 3
05:39:57 T:1209582576 M:309915648   DEBUG: FactoryCodec - Video: ff-msmpeg4 - Opened
05:39:57 T:1209582576 M:309915648  NOTICE: Creating video thread
05:39:57 T:1217971184 M:309915648   DEBUG: thread start, auto delete: 0
05:39:57 T:1217971184 M:309915648   DEBUG: LinuxRendererGL: Cleaning up GL resources
05:39:57 T:1217971184 M:309915648  NOTICE: running thread: video_thread
05:39:57 T:1217971184 M:309915648  NOTICE: Display resolution DESKTOP : 1024x600 @ 60.00 - Full Screen (12)
05:39:57 T:1209582576 M:309915648  NOTICE: Opening audio stream: 1 source: 256
05:39:57 T:1209582576 M:309915648  NOTICE: Finding audio codec for: 86017
05:39:57 T:1209582576 M:309915648   DEBUG: FactoryCodec - Audio: passthrough - Opening
05:39:57 T:1209582576 M:309915648   DEBUG: FactoryCodec - Audio: passthrough - Failed
05:39:57 T:1209582576 M:309915648   DEBUG: FactoryCodec - Audio: libmad - Opening
05:39:57 T:1209582576 M:309915648   DEBUG: SECTION:LoadDLL(libmad.so.0)
05:39:57 T:1209582576 M:309915648   DEBUG: Loading: libmad.so.0
05:39:57 T:1209582576 M:309833728   DEBUG: FactoryCodec - Audio: libmad - Opened
05:39:57 T:1209582576 M:309833728  NOTICE: Creating audio thread
05:39:57 T:1226359792 M:309833728   DEBUG: thread start, auto delete: 0
05:39:57 T:1226359792 M:309833728  NOTICE: running thread: CDVDPlayerAudio::Process()
05:39:57 T:1209582576 M:309833728   DEBUG: ReadEditDecisionLists - checking for any edit decision lists (EDL) on local drive or remote share for: /root/Desktop/TestMovie/AVI_FILE.avi
05:39:57 T:1099500192 M:309833728   DEBUG: Activating window ID: 12005
05:39:57 T:1099500192 M:309833728   DEBUG: Checking if window ID 12005 is locked.
05:39:57 T:1099500192 M:309833728   DEBUG: ------ Window Deinit (MyVideo.xml) ------
05:39:57 T:1099500192 M:309833728   DEBUG: ------ Window Init (VideoFullScreen.xml) ------
05:39:57 T:1099500192 M:309833728    INFO: Loading skin file: VideoFullScreen.xml
05:39:57 T:1099500192 M:309833728   DEBUG: Load VideoFullScreen.xml: 5.19ms
05:39:57 T:1099500192 M:309833728   DEBUG: Alloc resources: 5.64ms (5.63 ms skin load)
05:39:57 T:1099500192 M:309833728    INFO: Loading skin file: VideoOSD.xml
05:39:57 T:1209582576 M:309833728    INFO: Loading skin file: DialogProgress.xml
05:39:57 T:1209582576 M:309833728   DEBUG: Load DialogProgress.xml: 9.79ms
05:39:57 T:1209582576 M:309833728   DEBUG: CDVDPlayer::SetCaching - caching state 2
05:39:57 T:1209582576 M:309833728   DEBUG: CDVDPlayer::SetCaching - caching state 3
05:39:57 T:1217971184 M:309833728   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE

Thanks for your time.
does it just not play the file, but u can continue with other stuff? or does it hang/crash?
If the latter, when does it crash? i.e at the gui, or does it enter 'fullscreen video player mode'?

I cant fully investigate this atm because, well firstly, i cant replicate your issue without the hardware, and secondly, im very busy at work at the moment but will get back onto this come march.
Thanks for your answer! I've installed the pkt 3.00.00.09 sdk in order to start to work but it isn't very clear for me what file .h and .so I must copy in my folder of scratchbox. In the file README.armel it isn't specified. Are all files .h and .so contained in the folder where is 3.00.00.09 sdk ?

With regard to the port OpenGl to OpenGl ES in arm_camelot (xbmc_on_arm) , I'd would like to know how many job (more or less) there is done about that.

Thanks for your free time, it is very useful for me because I'm trying compile XBMC in ARM plataform.
It crashes as soon as I choose a file and press the "Enter" button.
Sorry for taking up so much of your time. I just want to know the possible direction to solve the problem Smile
I'm am new to the forum but have been using XBMC for years. I am working on a XBMC port to an ARM cortex A8 processor running Ubuntu.

I have all of the dependencies installed and I trying to compile natively on the ARM system. I am getting the following error:

[email protected]:~/xbmc-9.11$ ./configure
configure: Ensuring config.guess and config.sub exist and is executable
checking build system type... armv7l-unknown-linux-gnueabi
checking host system type... armv7l-unknown-linux-gnueabi
configure: error: unsupported host (armv7l-unknown-linux-gnueabi)

Any suggestions / work arounds?
Hack the config.guess script and add that host type...
in configure.in add

Code:
arm*-linux-gnu*)
       ARCH="arm-linux"
       ;;

after

Code:
case $host in
    i*86*-linux-gnu*)
       ARCH="i486-linux"
       ;;
    x86_64-*-linux-gnu*)
       ARCH="x86_64-linux"
       ;;

so you have

Code:
case $host in
    i*86*-linux-gnu*)
       ARCH="i486-linux"
       ;;
    x86_64-*-linux-gnu*)
       ARCH="x86_64-linux"
       ;;
    arm*-linux-gnu*)
       ARCH="arm-linux"
       ;;

but there are many many more issues - please take an look at camelot-arm branch to xbmc
oh thanks .. i already tried that .. this worked

armv7l-*-linux-gnueabi*)
ARCH="arm-linux"
ARCH_DEFINES="-ARMv7"
;;
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