How to Cross Compile for Cell Linux on the PS3 from Windows?
Asked Answered
W

6

6

How can a cross compilation setup be achieved to allow compiling Cell Linux programs on a Windows PC using the cygwin toolchain? The cygwin tools provide a GNU compiler to use in building the cross compiler, and associated tools for the build process e.g. rpm, cpio, make, flex, bison and so on.

I am moderately confident this is possible, but unaware of anyone who has actually done this. It has already been done for x86 Linux, but I wish to use Windows, without requiring the use and overhead of a virtual machine running an entire 2nd operating system.

The Cell Linux toolchain is a patched GNU toolchain, with C and C++ compilers for the PPU and SPU processors, and associated binutils. The sources for the Cell Linux SDK for Cell Linux can be found here. The source RPMS here have build scripts for use with the rpmbuild tool on Linux.

The specific question is: how can a set of Cell Linux GNU compilers for the PPU and SPU processors be built, on Windows, using Cygwin.

Wellknit answered 7/4, 2009 at 19:56 Comment(0)
H
4

I've never done it, so I can't give you step by step instructions, but I can give you a general idea.

The instructions you linked will serve as a pretty good outline, but there will be definite changes.

For the host PC, you can install gcc and other build tools from MinGW or cygwin. That will give you the windows native parts of your toolchain.

Then you'll need to download the sources for the cell portions of the toolchain and compile them (with the appropriate options, --target, etc.) using the build environment you just installed.

Then you download and compile the sources for libspe2, and you're done.

But I'll warn you - it sounds easier than it is. Be prepared to spend a lot of time on it.

Hazaki answered 8/4, 2009 at 2:31 Comment(0)
A
4

Since you can already do this on Linux x86, why don't you just install Linux a virtual machine? Also, what might be even easier, is to install Portable Ubuntu for Windows. It runs Linux alongside Windows using coLinux. Although this may not be optimal, it is probably much easier than trying to compile everything on Windows.

Appear answered 16/4, 2009 at 14:42 Comment(5)
It may well be easier, but its less convenient for an end user developer to get a program compiled if it takes switching between two operating systems before deploying to a 3rd.Wellknit
With Portable Ubuntu, you don't really have to "switch" OSs, it runs on the Windows desktop.Appear
This is correct, coLinux runs in parallel and you can interactively use it from Windows, i.e. by opening a shell connection via SSH or mapping virtual drives. coLinux really IS an excellent option to run Linux on Windows.Triplicate
Also, the performance of coLinux is much better than Cygwin, I have been using coLinux on Windows for quite a while now and it seems to be ideally suited to do what you want to do, if you are already contemplating to use cygwin, than coLinux is the next logical step which is also likely to be less frustrating.Triplicate
In addition, compiling all the other linux packages will be much more straightforward under colinux, simply because it really is a full featured linux system that doesn't have too many limitations.Triplicate
P
2

the ps2dev toolchain can easily be set up under cygwin

http://ps2dev.org/ps3/Tools/Toolchain

Pharmaceutical answered 23/4, 2009 at 7:16 Comment(2)
Sadly, the linked toolchain looks to be very datedWellknit
if you check the forums they are constantly updated, and the scripts provided will get from svn all the updates requiredPharmaceutical
M
0

You should be able to build a canadian cross compiler on Linux that runs on windows and creates code for PS3. Have a look at the excellent crosstools from Dan Kegel.

Did you check if the Cell/PS3 devtools for windows/cygwin work for you?

Motherwell answered 21/4, 2009 at 2:21 Comment(0)
W
0

A set of tools compiled to run on Windows via Cygwin can now be found on Sourceforge.

Wellknit answered 4/8, 2009 at 10:45 Comment(0)
P
0

Mike Acton has a long, detailed article on cross-compiling for PS3 Linux on his Cell Performance blog.

It may be a bit out of date, but the bits on setting up the toolchain and various SDKs might prove handy.

Pieria answered 6/1, 2013 at 4:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.