Sep 062009
 

ps3 ydl logo I’ve been seeing a lot of PS3s come up on craigslist with broken optical drives, usually around 100$. Figuring this was a great way to free up my quadcore from mundane cross-compiling duty, I set about purchasing one and setting up the Z2 cross compiling environment. It took a bit of doing, but it works. Here’s a step by step guide for setting yours up.

I picked up an old 40gb ps3 with a broken optical drive for 100$. Everything else I had laying around. Here’s how I got the Z2 environment cross compiling.

  1. I am using YDL 6.2. You can grab the newest 6.2 release from here
  2. You’ll need a usb thumb drive formatted fat32 128mb or above to install the ng bootloader you can download here
  3. Youll need a usb thumb drive formatted ext3 4gb or above, or a 1gb thumb drive formatted ext3 with a way to share the iso over the network
  4. On the fat32 thumb drive, create a directory structure /PS3/otheros/
  5. Copy the ng bootloader.bld to /PS3/otheros/otheros.bld
  6. Boot the PS3, go to settings->system settings, format system and split the drive up for your linux install
  7. In the PS3 menu, go to settings->system settings, install other os and insert your fat32 thumb drive, this will install the ng bootloader
  8. In the PS3 menu, go to settings->system settings, default os and select ‘other os’, then shutdown
  9. Extract the contents of the ISO (but not the YellowDogLinux folder) to the ext3 thumbdrive
  10. At this point you can either copy the iso to the root of the thumb drive, or make it available over a network share
  11. Insert the ext3 thumbdrive into the ps3 and reboot with a usb keyboard attached, selecting the thumb drive as the bootable device
  12. At this point you are in the YDL text installer, select the ISO or the network file share, and continue to graphical installation
  13. During the graphical install, you’ll be given the mac address, I like to use this to setup static IP and tunneling while the system is installing
  14. Continue through graphical installation, making sure to set a root password and install any dev libraries you may want (saves you some downloading later)
  15. Watch a movie. Or two. Maybe the LOTR Trilogy. Seriously this will take a while
  16. While the install is running, if you setup static IP for the PS3 mac you can setup your Z2′s package manager, on the z2. just vim /etc/ipkg/* and replace all instances of “Your IP HERE” with the static IP you setup for your PS3.
  17. Once the graphical install finishes and you’ve set up your user, it’s time to start installing software as listed on the beagleboard port page
  18. yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl
  19. yum install texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds
  20. yum install docbook-utils sed bison bc glibc-devel glibc-static gcc binutils pcre pcre-devel git
  21. yum install quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man perl-ExtUtils-MakeMaker python-sqlite2
  22. now compile the bitbake env. (this will dl the git objects ~150 megs as well) cd ~/oe && source ./oe_zipit2.sh
  23. make
  24. At this point, I log out of E17 and into a shell (ctrl-alt-f1). With only 200megs ram we want to conserve ram
  25. Likewise, I like to decrease the number of bitbake threads in oe/zipit2/conf/local.conf from 8 to 1 and disable make threads
  26. re-source oe_zipit2.sh and bitbake something small to get the skeleton directory made (this will take a long time) bitbake tree
  27. If you told apache to install during graphical installer, run it now with /etc/init.d/httpd start. Otherwise install first.
  28. Make a symbolic link from /var/www/zipit to your zipit deploy target, this allows the Z2 to see the packages you compiled ln -s /var/www/zipit /home/zipituser/oe/zipit2-tmp/deploy/glibc/ipk
  29. on the ps3 (you will need to do this after every set of packages you compile) bitbake package-index
  30. on the z2 (you will need to do this after every set of packages you compile) ipkg update
  31. That’s that! Install and test your package on the Z2 with ipkg install tree && tree
  32. Repeat for each package you wish to install, It’ll be SLOW, but you can stash the ps3 in a closet somewhere and be content it won’t red ring like certain consoles… even if it does thrash with 200megs ram.. happy bitbaking!
Share
 Posted by at 8:26 pm

  5 Responses to “100$ 64-bit 3ghz ppc cross compiler for the Z2 (Installing PS3 Linux and Cross Compiling Env from Thumbdrive)”

  1. If you suffer from undue swappy swappy thrashy thrashy, you might want to check try ps3vram. This exposes unused video RAM as a block device you can use for swap.

  2. HI, I’ve been reading this blog for almost a month and I’ve already hacked my zipit z2 the way you describe it.
    Now I’d to go a step further and build my own packages.
    Can you give me the instructions or show me where the beagleboard port page is?

  3. Hey Douglas, Excellent tip! I’ll try that out.

    Hey Esteban,

    With the debian image you can just install them from apt-get debian repositories. If you wish to do your own cross-compiling, there’s a good howto on the sourceforge wiki. Also I wrote an article a while back (I think it was the nes one??) on some of the tricky parts of the cross-compiler environment. Nowadays the sourceforge git tree should have you up and running without any real hurdles, as long as you’ve got a spare box to do the cross-compiling :) Good Luck!

  4. Well thanks. I ended using dpkg and apt-get, as long as I understand packages are being downloaded from emdebian.org; is there another package repository with more or different packages, not a mirror.

    I’m using aliosa’s debian image but it lacks working z2mouseemu, wpasupplicant; I know how to install them but I’ll be better if they were already in the image.

    I can happily release my debian image but I’d like it to be the most up to date based on all the zipit hacking community knowledge.

    I get errors when apt-getting some packages, man-db for example tells me that LANG and LC_* environment variables are not set, also how can I get man pages for al the already installed commands (like grep, ls, wget, etc) — I’m sure this is already fixed but don’t know where to look.

    Since I installed sshd tweaking the zipit it’s a pleasure. I wonder if I can use ‘screen’ to export fluxbox aswell.

    In summary how can I join and help

  5. Hey Esteban,

    You’re already joined and helping :) . If you’re going to use fluxbox from the Z2 remotely, I’d suggest vnc or X0rfb protocols. They are pretty low overhead considering the size of the framebuffer.

    There should be a howto on how to properly set language and file permissions and package repos. I know a few people took the information from comments threads etc and posted them up to their own Z2 linux overview sites. If the info isn’t on the sourceforge wiki you could help all out by reposting it there. In my opinion the best way to help the community is to get the shared knowledge into sourceforge and off of personal pages (I’m as guilty as anyone in this respect).

    I’m sure many would be interested in your debian image, especially if you included some extra useful programs. Previous images tend to be sparse (for good reason), but there’s always room for a phat ole image full of fun stuff. Good Luck!

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>