Difference between revisions of "Compiling ScummVM/PlayStation 2"
(Added some notes on compiling the PS2 port) |
(Filled out the wiki page with real contents) |
||
Line 1: | Line 1: | ||
= a. Decide were your tools and your sdk are going to be ;-) = | |||
For example: | |||
/works/devel/ps2/tools | |||
/works/devel/ps2/sdk | |||
= b. First we need the tools, let's get them started with svn... = | |||
<syntaxhighlight type="bash">svn co svn://svn.ps2dev.org/ps2/trunk/ps2toolchain</syntaxhighlight> | |||
= c. ...and build them using toolchain.sh! = | |||
Make sure that you have the correct env settings | |||
For me: | |||
export PS2DEV=/works/devel/ps2/tools | |||
export PATH=$PATH:$PS2DEV/bin | |||
export PATH=$PATH:$PS2DEV/ee/bin | |||
export PATH=$PATH:$PS2DEV/iop/bin | |||
export PATH=$PATH:$PS2DEV/dvp/bin | |||
export PS2SDK=/works/devel/ps2/sdk | |||
export PATH=$PATH:$PS2SDK/bin | |||
You will need them in the future too (not only to create | |||
the tools) so you might want to add them to your profile. | |||
Note: | |||
the script will download the needed sources from the net. | |||
As of right now, the ps2 port won't compile with the most | |||
recent versions of the toolchain so you will have to modify | |||
the scripts "005-ps2sdk.sh" and "006-ps2client.sh" to svn check | |||
out revision 1628 or earlier. | |||
You won't need most of "ps2toolchain" after building but be sure to | |||
save the ps2sdk source (from ps2toolchain/build/ps2sdk) because some | |||
other libs (eg. SjPcm) rely on it. | |||
I suggest keeping it in /works/devel/ps2/sdk and export: | |||
<syntaxhighlight type="bash">export PS2SDKSRC=/works/devel/ps2/sdk-src</syntaxhighlight> | |||
= d. Nearly there! Now we still need some extra libs which are not provided with default SDK: = | |||
- I suggest storing all of them in "sdk-extra" so that you just need to edit one line in Makefile.ps2 to compile scummvm | |||
- you can call it "sdk-ports" if you want to be consistent with svn naming structures | |||
// zlib | |||
svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/zlib | |||
cd zlib | |||
make | |||
// libmad | |||
svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/libmad | |||
cd libmad | |||
mkdir ee/lib | |||
make | |||
// sjcpm & tremor | |||
[ the porter will have to provide these as they are specially optimized versions for the PS2 | |||
You can contact him at sunmax@libero.it] | |||
= e. get scummvm = | |||
<syntaxhighlight type="bash">svn co https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk trunk</syntaxhighlight> | |||
-or- | |||
<syntaxhighlight type="bash">svn co https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/branch-1-0-0</syntaxhighlight> | |||
<syntaxhighlight type="bash">cd trunk/backends/platform/ps2</syntaxhighlight> | |||
edit Makefile.ps2 to match your sdk-extra (for example: PS2_EXTRA = /works/devel/ps2/sdk-extra) | |||
<syntaxhighlight type="bash">make -f Makefile.ps2</syntaxhighlight> | |||
Your fresh-baked scummvm will be waiting for you in elf/scummvm.elf ;-) | |||
If you don't need the symbols, just strip them ee-strip --strip-all scummvm.elf | |||
'''enjoy!''' |
Revision as of 22:51, 30 May 2010
a. Decide were your tools and your sdk are going to be ;-)
For example: /works/devel/ps2/tools /works/devel/ps2/sdk
b. First we need the tools, let's get them started with svn...
svn co svn://svn.ps2dev.org/ps2/trunk/ps2toolchain
c. ...and build them using toolchain.sh!
Make sure that you have the correct env settings
For me:
export PS2DEV=/works/devel/ps2/tools export PATH=$PATH:$PS2DEV/bin export PATH=$PATH:$PS2DEV/ee/bin export PATH=$PATH:$PS2DEV/iop/bin export PATH=$PATH:$PS2DEV/dvp/bin export PS2SDK=/works/devel/ps2/sdk export PATH=$PATH:$PS2SDK/bin
You will need them in the future too (not only to create the tools) so you might want to add them to your profile.
Note: the script will download the needed sources from the net. As of right now, the ps2 port won't compile with the most recent versions of the toolchain so you will have to modify the scripts "005-ps2sdk.sh" and "006-ps2client.sh" to svn check out revision 1628 or earlier.
You won't need most of "ps2toolchain" after building but be sure to save the ps2sdk source (from ps2toolchain/build/ps2sdk) because some other libs (eg. SjPcm) rely on it. I suggest keeping it in /works/devel/ps2/sdk and export:
export PS2SDKSRC=/works/devel/ps2/sdk-src
d. Nearly there! Now we still need some extra libs which are not provided with default SDK:
- I suggest storing all of them in "sdk-extra" so that you just need to edit one line in Makefile.ps2 to compile scummvm
- you can call it "sdk-ports" if you want to be consistent with svn naming structures
// zlib svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/zlib cd zlib make
// libmad svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/libmad cd libmad mkdir ee/lib make
// sjcpm & tremor [ the porter will have to provide these as they are specially optimized versions for the PS2 You can contact him at sunmax@libero.it]
e. get scummvm
svn co https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk trunk
-or-
svn co https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/branch-1-0-0
cd trunk/backends/platform/ps2
edit Makefile.ps2 to match your sdk-extra (for example: PS2_EXTRA = /works/devel/ps2/sdk-extra)
make -f Makefile.ps2
Your fresh-baked scummvm will be waiting for you in elf/scummvm.elf ;-) If you don't need the symbols, just strip them ee-strip --strip-all scummvm.elf
enjoy!