Difference between revisions of "Compiling ScummVM/PlayStation 2"
(Filled out the wiki page with real contents) |
(→d. Nearly there! Now we still need some extra libs which are not provided with default SDK:: Add instructions for Tremor and sjcpm) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= a. Decide were your tools and your | = a. Decide were your tools and your SDK are going to be ;-) = | ||
For example: | For example: | ||
Line 5: | Line 5: | ||
/works/devel/ps2/sdk | /works/devel/ps2/sdk | ||
= b. First we need the tools, let's get them started with | = b. First we need the tools, let's get them started with git... = | ||
<syntaxhighlight type="bash"> | <syntaxhighlight type="bash">git clone https://github.com/ps2dev/ps2toolchain.git</syntaxhighlight> | ||
= c. ...and build them using toolchain.sh! = | = c. ...and build them using toolchain.sh! = | ||
Line 28: | Line 28: | ||
Note: | Note: | ||
the script will download the needed sources from the net. | the script will download the needed sources from the net. | ||
As of right now, the | As of right now, the PS2 port won't compile with the most | ||
recent versions of the toolchain so you will have to modify | recent versions of the toolchain so you will have to modify | ||
the scripts "005-ps2sdk.sh" and "006-ps2client.sh" to svn check | the scripts "005-ps2sdk.sh" and "006-ps2client.sh" to svn check | ||
Line 46: | Line 46: | ||
- you can call it "sdk-ports" if you want to be consistent with svn naming structures | - you can call it "sdk-ports" if you want to be consistent with svn naming structures | ||
// zlib | // zlib & libmad | ||
git clone https://github.com/ps2dev/ps2sdk-ports.git | |||
cd zlib | cd zlib | ||
make | make | ||
cd ../libmad | |||
mkdir ee/lib | mkdir ee/lib | ||
make | make | ||
// | // Tremor (unoptimized) | ||
[ the porter | mkdir tremor | ||
cd tremor | |||
svn co http://svn.xiph.org/trunk/Tremor/ | |||
make | |||
[For a PS2 optimized version of Tremor, please contact the porter at sunmax@libero.it] | |||
// sjcpm (unoptimized) | |||
mkdir ps2_sdk_old | |||
cd ps2_sdk_old | |||
git clone https://github.com/AzagraMac/PS2_SDK.git | |||
cd isjcpm | |||
make | |||
[For a PS2 optimized version of sjcpm, please contact the porter at sunmax@libero.it] | |||
= e. get | = e. get ScummVM = | ||
<syntaxhighlight type="bash"> | <syntaxhighlight type="bash">git clone https://github.com/scummvm/scummvm.git</syntaxhighlight> | ||
-or- | -or- | ||
<syntaxhighlight type="bash"> | <syntaxhighlight type="bash">git clone -b branch-1-7-0 https://github.com/scummvm/scummvm.git</syntaxhighlight> | ||
<syntaxhighlight type="bash">cd trunk/backends/platform/ps2</syntaxhighlight> | <syntaxhighlight type="bash">cd trunk/backends/platform/ps2</syntaxhighlight> | ||
Line 76: | Line 83: | ||
<syntaxhighlight type="bash">make -f Makefile.ps2</syntaxhighlight> | <syntaxhighlight type="bash">make -f Makefile.ps2</syntaxhighlight> | ||
Your fresh-baked | 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 | If you don't need the symbols, just strip them ee-strip --strip-all scummvm.elf | ||
''' | '''Enjoy!''' |
Latest revision as of 07:37, 25 May 2015
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 git...
git clone https://github.com/ps2dev/ps2toolchain.git
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 & libmad git clone https://github.com/ps2dev/ps2sdk-ports.git cd zlib make cd ../libmad mkdir ee/lib make
// Tremor (unoptimized) mkdir tremor cd tremor svn co http://svn.xiph.org/trunk/Tremor/ make [For a PS2 optimized version of Tremor, please contact the porter at sunmax@libero.it]
// sjcpm (unoptimized) mkdir ps2_sdk_old cd ps2_sdk_old git clone https://github.com/AzagraMac/PS2_SDK.git cd isjcpm make [For a PS2 optimized version of sjcpm, please contact the porter at sunmax@libero.it]
e. get ScummVM
git clone https://github.com/scummvm/scummvm.git
-or-
git clone -b branch-1-7-0 https://github.com/scummvm/scummvm.git
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!