[PATCHES] PPC (PowerPC) Linux support for powerpc-linux and powerpc64-linux targets

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Thumbs Up  [PATCHES] PPC (PowerPC) Linux support for powerpc-linux and powerpc64-linux targets
Post: #1
As discussed in the related feature suggestion thread that can be found about porting XBMC for Linux to PowerPC:
http://forum.xbmc.org/showthread.php?tid=32320

Araldor and I are correctly actively working on porting XBMC for Linux to compile on PowerPC.

I am personally working on the powerpc-linux version build, using OpenGL (Mac Mini G4 PPC),
Araldor is working on the powerpc64-linux version build, without OpenGL (PS3 PPC64).

The current status on my own side is:
- GUI fully working, still some colour issues.
- Audio playback working with MADCodec.
- Video playback working with DVDPlayer.

Here is a first patch to simply include the two targets in the compilation scripts, and to seek for the right library names:
http://www.4shared.com/file/53228259/dd6...1diff.html

Other patches are coming to fix little/big endian issues (wrong colors, noisy sound). I must clean my code and review with Araldor before.

Could this patch be commit to SVN please?

Confused
(This post was last modified: 2009-07-29 10:55 by Gamester17.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #2
i don't like to add those header changes before the libraries actually exists. the header update should be part of the same commit as the libraries themself. i will commit the other two small things though

and can you please make a patch per feature, not a patch per file.

cheers
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Thumbs Up  Thank you cedric and araldor!
Post: #3
FYI; our guidelines for the prefered patch format are available in the XBMC Online Manual (wiki):
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch
http://wiki.xbmc.org/?title=Appendix_D:_...ment_Notes

PS! The SourceForge trackers are offline now while we are in the process of moving to TRAC.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Post: #4
OK, here is a new feature: "MP3 playback working on powerpc-linux platform"

You will find a diff and a shared library here:
http://www.4shared.com/file/53488719/232...cktar.html

The files concerned are:
XBMC/xbmc/cores/paplayer/DllMadCodec.h
XBMC/xbmc/cores/paplayer_linux.cpp
XBMC/system/players/paplayer/MADCodec-powerpc-linux.so

The library MADCodec.so has been compiled from XBMC/sources/paplayer/MP3Codec without any modification (thank you linux).
find quote
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Post: #5
New feature: "ID3TAGs support for powerpc-linux"

One file modified and one new shared library:
http://www.4shared.com/file/53492270/58b...agtar.html

Regards
-Cedric
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #6
both commited - cheers. i assume the second one didn't require any changes to the id3 sources
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Question   
Post: #7
Doesn't the .so libraries have to be compiled for both 32-bit and 64-bit?

Thanks again!

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
malloc Offline
Team-XBMC Developer
Posts: 1,062
Joined: May 2004
Reputation: 0
Post: #8
Gamester17 Wrote:Doesn't the .so libraries have to be compiled for both 32-bit and 64-bit?

Thanks again!

Likely, but he may not be able to do both from his machine. Though you're right that the file names should reflect the target better.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Post: #9
spiff Wrote:both commited - cheers. i assume the second one didn't require any changes to the id3 sources
Indeed, I forgot to mention it.
No modification needed in sources/libid3tag
find quote
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Post: #10
malloc Wrote:Likely, but he may not be able to do both from his machine. Though you're right that the file names should reflect the target better.

You right, I can not generate powerpc64-linux libraries with my macmini, except with cross-compilation, but I am not sure of how to do that. I will ask Araldor for these libraries.
find quote
araldor Offline
Junior Member
Posts: 9
Joined: May 2008
Reputation: 0
Post: #11
cedric Wrote:You right, I can not generate powerpc64-linux libraries with my macmini, except with cross-compilation, but I am not sure of how to do that. I will ask Araldor for these libraries.

I'm a little worried about where to go with ppc64 at the moment. There isn't great support in Debian and Ubuntu for a pure 64-bit user land, and it doesn't appear that there is a 64-bit version of all of xbmc's dependent libraries in the powerpc arch. I don't think I'm ready to think about other distros.

Multiarch seems to be the future for Debian and Ubuntu. So, I think we'll see mixed 32/64 userland support improving over time for power, and I don't think there's much effort going into pure 64-bit for power.

Since, xbmc builds and runs okay on a ppc64 machine with a ppc64 kernel and a 32-bit userland. I'm starting to think we should just focus on 32-bit powerpc and forget about ppc64 until distro support improves.

Comments? Does anyone actually run a pure ppc64 distro that wants xbmc support?
find quote
malloc Offline
Team-XBMC Developer
Posts: 1,062
Joined: May 2004
Reputation: 0
Post: #12
As long as your forward progress isn't hindering future ability to go pure 64-bit I don't see why this would be a problem.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
cedric Offline
Junior Member
Posts: 28
Joined: May 2008
Reputation: 0
Post: #13
araldor Wrote:Since, xbmc builds and runs okay on a ppc64 machine with a ppc64 kernel and a 32-bit userland. I'm starting to think we should just focus on 32-bit powerpc and forget about ppc64 until distro support improves.
Does it mean we could simply use powerpc32 shared objects instead of the 64 bits ones ? If it is the case, when building powerpc64-linux target, we could define both flags _POWERPC and _POWERPC64, so that when a 64bits library is missing, the 32bit one would be used instead.
find quote
malloc Offline
Team-XBMC Developer
Posts: 1,062
Joined: May 2004
Reputation: 0
Post: #14
I don't think it would just be when the library is missing. It would probably be like the AMD64 architecture. You can run 32-bit binaries, but if you do, all of the libraries need to be 32-bit as well.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
araldor Offline
Junior Member
Posts: 9
Joined: May 2008
Reputation: 0
Post: #15
cedric Wrote:Does it mean we could simply use powerpc32 shared objects instead of the 64 bits ones ? If it is the case, when building powerpc64-linux target, we could define both flags _POWERPC and _POWERPC64, so that when a 64bits library is missing, the 32bit one would be used instead.

I'm afraid not. If you want to run a 64-bit XBMC, then all of the libraries it links to need to be 64-bit versions.

It's likely that we could build ppc64 versions of all of the XBMC libraries in the sources/. However, many of the other libaries that XBMC relies on don't have ppc64 versions in debian or ubuntu (SDL, libfreetype, liblzo, etc.). I don't want to maintain ppc64 versions of all of those libraries and their dependencies.

I'd rather focus on powerpc32 at the moment.
find quote
Post Reply