Author Topic: linuxmce and PS3  (Read 8636 times)

thoth

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
linuxmce and PS3
« on: January 30, 2008, 11:30:15 pm »
So after reading the developers FAQ I thought I might try my hand at getting the ps3 to integrate with linuxmce.  However, I noticed the final build looks to be somewhere in the neighborhood of 5.5GB which puts my current setup out as my linux partition is over  5 gigs with psubuntu installed.  So I see one of three ways to implement some integration (in order of preference)

1. erase psubuntu, install bare bones base debian to build new linuxMCE (absolutely the most involving but rewarding scenario)[EDIT: I should even be able to work around the space issue with NFS or perhaps a USB drive (I'm thinking samba would be a bad idea), foregoing the bare bones debian install, I'll experiment this weekend)

2. install mythbuntu through the repo's and at least have mythtv from the linuxMCE setup (would be at least able to access movies on linuxMCE, but not sure how what the maximum HD content this setup could push through)

3.  get mediatome or one of the upnp servers running and access media through the XMB in sony's OS (this scenario could run concurrent with the other two and is well worth looking into as you wouldn't have to reboot ps3 to watch media and in fact I have  halfway already done this by using elgato's eyeconnect running on a macintosh that had iTunes configured to use the share partition from the linuxMCE box as the location of it's music library [so in essence the ps3 could see and play a large portion of the media on the linuxMCE box, and HD played fine so long as it was formatted correctly for the ps3, h.264 I believe])

I plan on pursuing scenario 1 this weekend, and was wondering if anyone had any experience compiling a distro for the ps3,  or maybe even attempted this already? 

In terms of mythTV on ps3, has anyone at least tried scenario 2?  If so, could the ps3 handle HD content?  I mean it should considering the hardware, but I'm not sure if the issues with the hypervisor are roadblocking full video capabilities.  I might give things a shakedown here, before erasing the current psubuntu install.

And has anyone out there gotten a ps3 to play nicely with upnp in linux?
« Last Edit: January 30, 2008, 11:35:21 pm by thoth »

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #1 on: January 30, 2008, 11:37:55 pm »
I don't think the PS3 will be any good as a Core (or Hybrid). It's got only 512MB RAM.

But a PS3 Media Director could work. Especially if you use the spu-medialib version of MPlayer. I'd like to see the HowTo on getting that up and running, along with the other accessories that usually take extra steps to get running in PSUbuntu. Which would include KDE, because PSUbuntu us GNOME, but LMCE is KDE. Should be doable, but not trivial.

And if you got the PS3 to PXEboot somehow into LMCE, that would be quite a revelation.

A PS3 MD would be a $600 1080p 5.1 audio Bluetooth Gb-e MD with a Blu-Ray drive. Quite a compelling accessory, even if you don't boot it into GameOS when LMCE isn't looking.

thoth

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: linuxmce and PS3
« Reply #2 on: January 31, 2008, 04:25:59 am »
Ya I definitely didn't want to use it as a core, though it would be cool to plug a hauppage usb device into ps3 and have it record HD broadcasts (ripping blu-ray media would also be a huge plus).  But I've already got a core machine, big thing is I just want to be able to play my media on the system I have hooked up to ps3.

So far as KDE goes, sure the psubuntu starts you out in gnome/ubuntu, but all (most?) the ubuntu derivatives have been compiled as well.  So where previously I had just ran a

sudo apt-get install kubuntu-desktop

right now I am running a


sudo apt-get install mythbuntu-desktop

which seems to be doing just fine.  So I'll post results of my experiment soon.

As far as PXEboot, your guess is as good as mine.  This might be doable if there was a special kernel on the ps3 that would get far enough in the bootstrap to then go out and get the rest from the linuxmce box, but for now I would be happy with a hard drive version of the boot disk I see some people using in their media directors when the MD doesn't support PXEboot'ing.  Does anyone know how those disks were created?

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #3 on: January 31, 2008, 02:17:33 pm »
As far as PXEboot, your guess is as good as mine.  This might be doable if there was a special kernel on the ps3 that would get far enough in the bootstrap to then go out and get the rest from the linuxmce box, but for now I would be happy with a hard drive version of the boot disk I see some people using in their media directors when the MD doesn't support PXEboot'ing.  Does anyone know how those disks were created?

PS3 boots first by loading the Hypervisor (whether from ROM/Flash or disk I don't know), which finds otheros.bld (on disk, I think, not Flash), which specifies (or perhaps even executes) loading/running kboot, which loads and runs Linux (initramfs etc). The point in that chain to do PXEboot would be kboot. [ur=http://kboot.sourceforge.net/]kboot[/url] uses kexec to load a kernel file and boot it, but wraps kexec in a uCLinux kernel and BusyBox (Sony might have modified it to use something different on PS3, but then they have to have released the revised source - interesting side note). There's an old article that describes PS3 boot process in more detail. kboot (unless Sony stripped it) supports DHCP and TFTP, which should let it simulate PXEboot (which uses DHCP to get instructions to load the boot image from a server). Since LMCE has a DHCP monitor triggering when clients make DHCP requests, and a TFTPd, just changing kboot's configs should let it load a PS3 boot image. The Core's dhcpd.conf should even be configurable to recognize the PS3's Gb-e MAC range to specify the right boot image.

And if you really want to be cool, kboot claims to support HTTP and NFS for retrieving the boot image. You might even make the boot image server keep state of which PS3 MD has already loaded the image, and use the DCE history to see whether there's a PS3 MD that's got the image, but not busy, and point the currently booting PS3's kboot at that other MD by HTTP or NFS, to offload from a busy Core. If you want to be a hero, figure out how to add BitTorrent to kboot, make it store the boot image before booting, and let the Core respond to DHCP request with a .torrent pointing at all the booted PS3 MDs, which can participate in the swarm if they're not too busy. That's the kind of system that could make diskless MD booting a PS3 over its Gb-e really fast.

Let us know how it goes.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: linuxmce and PS3
« Reply #4 on: January 31, 2008, 02:33:24 pm »
And if you really want to be cool, kboot claims to support HTTP and NFS for retrieving the boot image. You might even make the boot image server keep state of which PS3 MD has already loaded the image, and use the DCE history to see whether there's a PS3 MD that's got the image, but not busy, and point the currently booting PS3's kboot at that other MD by HTTP or NFS, to offload from a busy Core. If you want to be a hero, figure out how to add BitTorrent to kboot, make it store the boot image before booting, and let the Core respond to DHCP request with a .torrent pointing at all the booted PS3 MDs, which can participate in the swarm if they're not too busy. That's the kind of system that could make diskless MD booting a PS3 over its Gb-e really fast.

guy, what are you smoking???

rock your home - http://www.agocontrol.com home automation

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: linuxmce and PS3
« Reply #5 on: January 31, 2008, 03:36:10 pm »
multicast boot would probably give the performance needed, without creating the initial flood of trying to obtain equilibrium.

-Thom

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #6 on: January 31, 2008, 04:47:54 pm »
And if you really want to be cool, kboot claims to support HTTP and NFS for retrieving the boot image. You might even make the boot image server keep state of which PS3 MD has already loaded the image, and use the DCE history to see whether there's a PS3 MD that's got the image, but not busy, and point the currently booting PS3's kboot at that other MD by HTTP or NFS, to offload from a busy Core. If you want to be a hero, figure out how to add BitTorrent to kboot, make it store the boot image before booting, and let the Core respond to DHCP request with a .torrent pointing at all the booted PS3 MDs, which can participate in the swarm if they're not too busy. That's the kind of system that could make diskless MD booting a PS3 over its Gb-e really fast.

guy, what are you smoking???

What's the problem? Make a PS3 MD kboot over HTTP to the Core. Make the HTTP URL point at a CGI that checks all the MDs in the DB for one that's not busy playing, and return an HTTP redirect (or Object Moved etc) message pointing to that MD's HTTPd.

Revising kboot to use bittorrent to MDs is harder, but doable. Making MDs de/activate in the swarm whether they're busy or not is harder, but a doable tweak. And if we're trying to get MDs to boot fast (which several are, by hibernating), and remain diskless (which is an important way to keep MDs upgraded and manageable), this is a strategy. And if we want MDs to power up/down on changing presence info (which I do), this is an infrastructure to do it.

Booting a host is already complex because of conditions varying while the machine is off and unresponsive. Network boot management adds more complexity. But there is an architecture here that is compatible with architecture already part of LMCE. That could be even better with some swarm tech. Designing a PS3 MD is a good opportunity to think through some of that "grand design" because of the PS3's limitations (balanced by strengths when actually running). For example, PS3 has only only 512MB RAM, a single SATA connection, and no PCI, so there are stategies to netboot, use a large SATA i-RAM bank as swap, and get something closer to a 16GB PS3 than just 0.5GB. And since we're talking about managing power (and cheaper HW overall), a BitTorrent boot swarm is one way to maximize the HW and power consumption, by decentralizing away from the busy Core whenever possible.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: linuxmce and PS3
« Reply #7 on: January 31, 2008, 05:56:00 pm »
What's the problem? Make a PS3 MD kboot over HTTP to the Core. Make the HTTP URL point at a CGI that checks all the MDs in the DB for one that's not busy playing, and return an HTTP redirect (or Object Moved etc) message pointing to that MD's HTTPd.
you would only fetch a small initrd over http and change the root dev over to nfsroot.
Quote
Revising kboot to use bittorrent to MDs is harder, but doable. Making MDs de/activate in the swarm whether they're busy or not is harder, but a doable tweak. And if we're trying to get MDs to boot fast (which several are, by hibernating), and remain diskless (which is an important way to keep MDs upgraded and manageable), this is a strategy. And if we want MDs to power up/down on changing presence info (which I do), this is an infrastructure to do it.
that would need an image based install. That has to fit in ram. Or tell me how you want to distribute a shared filesystem and export that from multiple hosts with nfs. For the file sizes in a typical linux install the cluster filesystem's overhead would kill the benefit.
Quote
Booting a host is already complex because of conditions varying while the machine is off and unresponsive. Network boot management adds more complexity. But there is an architecture here that is compatible with architecture already part of LMCE. That could be even better with some swarm tech. Designing a PS3 MD is a good opportunity to think through some of that "grand design" because of the PS3's limitations (balanced by strengths when actually running). For example, PS3 has only only 512MB RAM, a single SATA connection, and no PCI, so there are stategies to netboot, use a large SATA i-RAM bank as swap, and get something closer to a 16GB PS3 than just 0.5GB. And since we're talking about managing power (and cheaper HW overall), a BitTorrent boot swarm is one way to maximize the HW and power consumption, by decentralizing away from the busy Core whenever possible.
Don't you think it would be better to even try to compile our beast on ppc than to philosophize about designing some new boot system? Simply use a nfs mount and _start compiling_. But it's easier to talk about implementing torrent in kboot.

br, Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #8 on: January 31, 2008, 06:51:08 pm »
What's the problem? Make a PS3 MD kboot over HTTP to the Core. Make the HTTP URL point at a CGI that checks all the MDs in the DB for one that's not busy playing, and return an HTTP redirect (or Object Moved etc) message pointing to that MD's HTTPd.
you would only fetch a small initrd over http and change the root dev over to nfsroot.
Quote
Revising kboot to use bittorrent to MDs is harder, but doable. Making MDs de/activate in the swarm whether they're busy or not is harder, but a doable tweak. And if we're trying to get MDs to boot fast (which several are, by hibernating), and remain diskless (which is an important way to keep MDs upgraded and manageable), this is a strategy. And if we want MDs to power up/down on changing presence info (which I do), this is an infrastructure to do it.
that would need an image based install. That has to fit in ram. Or tell me how you want to distribute a shared filesystem and export that from multiple hosts with nfs. For the file sizes in a typical linux install the cluster filesystem's overhead would kill the benefit.
Quote
Booting a host is already complex because of conditions varying while the machine is off and unresponsive. Network boot management adds more complexity. But there is an architecture here that is compatible with architecture already part of LMCE. That could be even better with some swarm tech. Designing a PS3 MD is a good opportunity to think through some of that "grand design" because of the PS3's limitations (balanced by strengths when actually running). For example, PS3 has only only 512MB RAM, a single SATA connection, and no PCI, so there are stategies to netboot, use a large SATA i-RAM bank as swap, and get something closer to a 16GB PS3 than just 0.5GB. And since we're talking about managing power (and cheaper HW overall), a BitTorrent boot swarm is one way to maximize the HW and power consumption, by decentralizing away from the busy Core whenever possible.
Don't you think it would be better to even try to compile our beast on ppc than to philosophize about designing some new boot system? Simply use a nfs mount and _start compiling_. But it's easier to talk about implementing torrent in kboot.

Well, you're talking about your variant too, and I don't see you compiling it. It's not "philosophy", it's a design discussion. That was asked about by the original poster. I've got a PS3 with Ubuntu also, and I've mentioned it as MD on these forums before. It's a low-priority project for me, but if it's higher for someone else, I'm happy to share my design discussion with them.

There's some kind of bad attitude on these forums towards people, often myself, discussing advanced or "deluxe" designs for other people to try. If you want to critique the design, that's perfectly welcome. But just slamming me for discussing it with someone who's interested, leaving it there for later pickup when others are interested, is at least a waste of your time, and is really obnoxious. If you're not interested, just ignore it and work on your own priorities. Don't get rude with me for working on mine.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: linuxmce and PS3
« Reply #9 on: January 31, 2008, 07:13:45 pm »
Well, you're talking about your variant too
no, thats not my variant. Thats the way lmce now does network booting. The client fetches a initial ram disk (pxe does tftp, kboot could do tftp or http) and that boots into the nfsroot.

Quote
, and I don't see you compiling it.
look at the trunk and see what I compile.

Quote
It's not "philosophy", it's a design discussion. That was asked about by the original poster.
plain wrong. Read that post from thoth again.
Quote
It's a low-priority project for me ...
LMAO. Count your posts on that topic.

Quote
There's some kind of bad attitude on these forums towards people, often myself, discussing advanced or "deluxe" designs for other people to try. If you want to critique the design, that's perfectly welcome. But just slamming me for discussing it with someone who's interested, leaving it there for later pickup when others are interested, is at least a waste of your time, and is really obnoxious. If you're not interested, just ignore it and work on your own priorities. Don't get rude with me for working on mine.
he asked about experiences with the build process on a ps3!!! And you drivel about torrents and faster booting.

But maybe i am wrong and you are simply designing LMCE0910. Sorry for that. We will do the work thats needed _now_ while you can do advanced design and feel treated rough.

Start contributing now or stop trolling the dev forums and go to feature requests. Is your powerfile patch ready for commit?

best regards,
Hari
« Last Edit: January 31, 2008, 07:28:19 pm by hari »
rock your home - http://www.agocontrol.com home automation

thoth

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: linuxmce and PS3
« Reply #10 on: January 31, 2008, 08:05:21 pm »
Hey now, stop the flame-war here and now.  I greatly appreciate everyone's response.  This is a dev forum and I welcome any ideas and especially help.  So everyone just think zen thoughts for a moment.  Then lets get back on topic, and the topic is "How to utilize a ps3 in a linuxMCE environment".  I think the bittorrent stuff would be uber cool, but I also am not going to attempt it until I see linuxMCE boot off of the HD first.  Once that happens then I will attempt the PXEboot stuff.  And if that goes smoothly, then perhaps we can go for the torrent tricks.  But I'm also a noob when it comes to linuxMCE, right now I'm converting from a gentoo based roll your own mythtv solution.  So that means I have lots of growing pains as I learn about the linuxMCE philosophy, one of which right now is my myth backend appears to be borked [but thats the contents of  a separate post].  So here's my roadmap:

1. fix backend and test out mythtv's current capabilities on the PS3, specifically will it play back HD

2. look into upnp servers

3. attempt a compile of linuxMCE on the ps3

4. if I can get things running on the ps3 locally, then I will try and see if I can get the PXEboot stuff running

5. write the torrent client for all MD's 

All of this will be done by this weekend............... ROTFL
* thoth picks self up off of floor, wipes tears out of eyes, dusts off sleeves

OK so this is a long term roadmap, and it won't get done by this weekend. However, I do plan on making progress over steps one and two and be preparing for three by the end of this weekend.  So happy thoughts everyone, if you're here reading then you would like to be able to watch 1080p 5.1 content streamed thru the PS3 from a linuxMCE box, and that's exactly what I intend on getting done.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #11 on: January 31, 2008, 08:38:23 pm »
Hey now, stop the flame-war here and now.  I greatly appreciate everyone's response.  This is a dev forum and I welcome any ideas and especially help.  So everyone just think zen thoughts for a moment.  Then lets get back on topic, and the topic is "How to utilize a ps3 in a linuxMCE environment".  I think the bittorrent stuff would be uber cool, but I also am not going to attempt it until I see linuxMCE boot off of the HD first.  Once that happens then I will attempt the PXEboot stuff.  And if that goes smoothly, then perhaps we can go for the torrent tricks.  But I'm also a noob when it comes to linuxMCE, right now I'm converting from a gentoo based roll your own mythtv solution.  So that means I have lots of growing pains as I learn about the linuxMCE philosophy, one of which right now is my myth backend appears to be borked [but thats the contents of  a separate post].  So here's my roadmap:

1. fix backend and test out mythtv's current capabilities on the PS3, specifically will it play back HD

2. look into upnp servers

3. attempt a compile of linuxMCE on the ps3

4. if I can get things running on the ps3 locally, then I will try and see if I can get the PXEboot stuff running

5. write the torrent client for all MD's 

All of this will be done by this weekend............... ROTFL
* thoth picks self up off of floor, wipes tears out of eyes, dusts off sleeves

OK so this is a long term roadmap, and it won't get done by this weekend. However, I do plan on making progress over steps one and two and be preparing for three by the end of this weekend.  So happy thoughts everyone, if you're here reading then you would like to be able to watch 1080p 5.1 content streamed thru the PS3 from a linuxMCE box, and that's exactly what I intend on getting done.

The PS3 is a slow build environment, mainly because of low RAM, but also I don't think gcc exploits its PPC core very well, either. You're better off cross-compiling for a PS3 target on a separate PC. Building LMCE (and all its depended apps) is a long compilation task even on a fat P4. Though other PPCs, if you can find one, are OK - just be sure to target PS3 for your final build, which is a little different from just PPC. See the PS3 linux forums, and possibly threads at Ubuntu.com (or UbuntuGuide.com , etc), especially from Canonical, which generates the special PS3 Ubuntu separately from the original PPC-64 used on PS3. It's one reason it might make sense to start building just an MD image, if that's a good use of your PS3.

thoth

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: linuxmce and PS3
« Reply #12 on: January 31, 2008, 09:11:46 pm »
Quote
The PS3 is a slow build environment

Duly noted, I have a bit of experience cross compiling for the AVR series microcontrollers, and I even setup distcc on gentoo to help out an old G3 ppc tower I had while it was still being used.  So I'll look into how the psubuntu people ended up getting their's to work.

Quote
It's one reason it might make sense to start building just an MD image

Do you know of any documentation for creating these MD images?  A rudimentary search didn't produce anything useful, I'll keep digging but I was hoping maybe one of you guys could point me in the right direction.  I'm also creating an account on the wiki, so maybe I can help seal the holes in the documentation there.
« Last Edit: January 31, 2008, 09:21:50 pm by thoth »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: linuxmce and PS3
« Reply #13 on: January 31, 2008, 10:12:27 pm »
if a (of course not deluxe designed) native build environment is enough for a first start you may want to try this on your ps3:

Code: [Select]
apt-get install subversion make g++ libmysqlclient15-dev
svn co http://svn.charonmedia.org/svn/trunk

you need to bootstrap some things like SerializeClass, PlutoUtils, RA, DCE

that will help to fix the Makefiles until you have MakeRelease_PrepFiles running:
Code: [Select]
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_defines->/-DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I\/opt\/libxine1-pluto\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include\/SD/' -i '{}' \;
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_libs->/-L\/opt\/libxine1-pluto\/lib -L\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/lib/' -i '{}' \;

works for me.

Best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: linuxmce and PS3
« Reply #14 on: January 31, 2008, 10:28:55 pm »
if a (of course not deluxe designed) native build environment is enough for a first start you may want to try this on your ps3:

Code: [Select]
apt-get install subversion make g++ libmysqlclient15-dev
svn co http://svn.charonmedia.org/svn/trunk

you need to bootstrap some things like SerializeClass, PlutoUtils, RA, DCE

that will help to fix the Makefiles until you have MakeRelease_PrepFiles running:
Code: [Select]
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_defines->/-DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I\/opt\/libxine1-pluto\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include\/SD/' -i '{}' \;
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_libs->/-L\/opt\/libxine1-pluto\/lib -L\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/lib/' -i '{}' \;

works for me.

Best regards,
Hari

There's more instructions on other dependencies (eg. /usr/pluto/{bin,lib} ) and building and using the MakeRelease_PrepFiles tool in "    
Re: 0710b2 Build Errors
".