Forum: Official Open PS2 Loader Forum - Discussion and information on the Official Open PS2 Loader.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree7Likes

Thread: 2013 Linux OPL Compile Guide (Mint 14/Ubuntu 12.10 )
  

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
  1. #1 2013 Linux OPL Compile Guide (Mint 14/Ubuntu 12.10 ) 
    Bat Rastard's Avatar
    Bat Rastard is offline No ordinary mage
    Join Date
    Apr 2011
    Location
    Michitucky
    Posts
    360
    Downloads
    2
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    32
    Likes Received
    63
    This guide and Persona 4 boss fights have one thing in common: third time's usually the charm ...

    The following will guide you through compiling the homebrew PS2 toolchain and OpenPS2Loader from a clean VM or install of Linux Mint 14 and other Ubuntu-based variants.

    Linux Mint 14 ISOs can be snagged here:

    http://www.linuxmint.com/download.php

    As you can see from the above link, Linux Mint ISOs are separated by desktop environment -- Cinnamon, KDE, XFCE, and MATE (pronounced mah-tay) -- and architecture (x32 and x64). Since 64-bit support in the toolchain is bugged/broken at the time of this writing, 32-bit is the only way to go. This guide will focus on the 32-bit Cinnamon spin for the sake of consistency/familiarity. Cinnamon is a fork of the Gnome3 desktop, and thus you might already be familiar with "gedit" as your text editor (as opposed to "kate" for KDE, and "pluma" for MATE/XFCE). Also, the default file manager Nautilus was forked by the Mint developers and it's now called Nemo ...

    With those caveats out of the way, let's get started ...

    64-bit Update: PS2Packer (and the entire PS2DSK) compiles and function properly on x64 Linux and Windows.

    PS2unpacker however malfunctions under a 64-bit environment despite appearing to compile without issue.
    (Confirmed by E P (x64 Slax) and SP193 (x64bit Ubuntu 12.10/Win7 x64 MiniGW)

    Highlight the following code with your mouse and chose "Copy" so its in your clipboard ...

    Code:
    export PS2DEV=/usr/local/ps2dev
    export GSKIT=$PS2DEV/gsKit
    export PS2SDK=$PS2DEV/ps2sdk
    export PATH=$PATH:$PS2DEV/bin
    export PATH=$PATH:$PS2DEV/ee/bin
    export PATH=$PATH:$PS2DEV/iop/bin
    export PATH=$PATH:$PS2DEV/dvp/bin
    export PATH=$PATH:$PS2SDK/bin
    Open up a Terminal, and type ...

    Code:
    $ sudo gedit ~/.profile
    ... followed by your user password.

    After the text-editor opens your ./profile, use your arrow keys to move the blinking cursor to the bottom. Once you're on the last line, you may also have to press "END" to make sure the cursor is at the very end of any existing text. If that's the cast, press "ENTER/RETURN" once at this point to make the blank line manually, followed by a right click and "PASTE". Then click "SAVE" at the top and close the editor ...

    Now, you have to source your ./profile ...

    Code:
    $ source ~/.profile
    You can also source your ./profile by pressing ALT+CTRL+BACKSPACE and then logging back in ...

    Next, download the "ps2sdk-scripts.tar.gz" file (see attachment below) file. Move it out of your "Downloads" folder and into your HOME folder, then extract it. Once that's taken care of, take a moment. By all means, if you're hungry or nature's calling, take care of it. Because we're about to open Terminal to execute the build script ...

    Code:
    $ sudo ./install-ps2sdk.sh
    ... and babysit the resulting wall of text for quite some time. Although the compiling process only takes roughly 12-15 mins or so, at certain points the process can (and will) be interrupted by confirmation prompts to download required packages and tools. So, as long you sit there "Y" and "ENTER" at every confirmation prompt, you won't artificially extend the process any further than it needs.

    Another reason to babysit it is at around the 8 to 12 minute mark or so (depending on your computer), the script gets to the part of building PS2-Packer, and this is the part that tends to break or fail the most, giving you an error and terminating the script. The vast majority as to why this happens (in my experience at least) is because the script automatically adds the first step (i.e. editing/sourcing ./profile) as well as makes necessary symlinks (or attempts to fix any broken ones). Alas, this doesn't always prove successful. Hence why we did the first step manually and made sure the ./profile was sourced and verified. The babysitting also helps ensure all the "sudos" within the script itself make the most out of their shelf-life before demanding the password again. Since I've done this across Mint 11, 12, 13, and now 14, the steps we've taken so far is sort of an insurance policy: 20% of the time, PS2Packer will puke at this point; 80% of the time PS2Packer builds nicely for me, I'm greeted with the "Success" confirmation message.

    If you see the "Success" confirmation message, I recommend sourcing your ./profile again before proceeding.

    With the PS2DEV toolchain ready, let's move on to OpenPS2Loader ...

    Open Terminal again (in case you closed it) and type the following ...

    Code:
    $ cd ps2sdk-scripts 
    $ sudo ./install-opl.sh
    After typing your password again, the script will clone the mainline "ifcaro" repository of OPL, and automatically start compiling. Takes about 5 minutes. If everything goes smoothly here, OPNPS2LD.ELF will be waiting for you inside your "home/user/open-ps2-loader" folder. But before you venture off to have some fun, it's best to verify that you can manually re-compile OPL from the terminal and/or the update script. So open terminal and type the following:

    Code:
    $ cd open-ps2-loader
    $ make rebuild
    OPL should re-compile without problems. If you get an error or any sort, try logging out, logging back in, and repeat the step above. If OPL recompiles without issue, then you should be able to re-compile OPL from the included script in your "ps2sdk-scripts" folder ...

    While we're at it, let's double check something. Type the following in Terminal ...

    Code:
    $ cd $home
    $ ls -l
    Notice how your "open-ps2-loader" folder is owned by "root"? Let's take care of that ...

    Code:
    $ sudo chown -R <username>:<username> open-ps2-loader
    ... then repeat the "ls -l" command to verify it.

    Congrats! You can now build the "release" version of OPL at anytime!

    But what about Beta builds? No problem!

    Open terminal again, and then clone the "doctorxyz" repo ...

    Code:
    $ mkdir opl_beta 
    $ cd opl_beta
    $ hg clone https://bitbucket.org/doctorxyz/open-ps2-loader
    This will make another "open-ps2-loader" sub-folder within "opl_beta", which will contain doctorxyz's most recent commits. From there, you can click "Home" on the desktop to bring up Nemo/Nautilus file manager, then double-click "opl_beta" folder, double-click the "open-ps2-loader" folder, double-click the "MAKEFILE", and chose "Run in Terminal" from the confirmation box ...

    You can also clone doctorxyz's OPL+GSM integrated builds in the same fashion ...

    Code:
    $ mkdir opl_gsm
    $ cd opl_gsm
    $ hg clone https://bitbucket.org/doctorxyz/opl_gsm
    ... and build it the same way (i.e. choose "Run In Terminal" after double-clicking the MAKEFILE)

    That's should cover all the bases ...

    In a follow up, I'll walk you through manually compiling PS2-Packer just in case the attached script bombs out on you. Since PS2-Packer is the final step in compiling the toolchain, if the script bombs out for some reason, re-running the script would be redundant and time-consuming. Much easier and faster to just re-compile PS2-Packer manually. Unfortunately, an update on my Mint 14 Cinnamon install (and a stupid install of KDE two weeks ago) has finally caught up to me and -- yup, you guessed it -- my PS2-Packer walkthru was on there. Forgot to shovel it over to my NTFS drive! Sooo, as soon as I work up the motivation to re-boot into a Live USB session, I'll be able to access and publish that part before the re-install ... but before that I gotta save Rise Kujikawa. Hey, don't give me any lip - it's easier to find your place again in the Persona 4 walkthru when you procrastinate on certain chores to the end/start of a given month. Translation: Ms. Rastard's a believer now!

    Compiling PS2-Packer Manually

    So the script bombed on you at compiling PS2Packer, eh?!? Let me guess: it complained about not finding the libz.a and libucl.a files, right?!? The reasons explaining that might make you wanna give Stallman's beard a good tug next time you see him. You see, Stallman wants *cough-erm* demands total GNU purity, and that means Canonical and other Linux distro maintainers changed what never needed fixing in the first place in order to appease him: /usr/lib/i386-linux-gnu/ became the new stomping grounds replete with a stockpile of hyphens of mass pretension. To make things easier, Canonical would often deploy Ubuntu with /usr/lib/ and /usr/lib/i386-linux-gnu/ symlinked, but not always. Multiply that by the total number of Ubuntu-based distros, and you've got a recipe for an on-again-off-again square dance that explains why PS2-Packer compiled nicely in Natty, puked on Ocelot, etc. etc.

    Compiling PS2-Packer manually is simple although it was written at a time where the toolchain didn't have the luxury of scripts. Everything was compiled manually, and most likely under your $HOME folder, and that required a more elaborate and explicit ./profile that pointed to absolute paths as jimmikaelkael's original thread admirably demonstrates. That made multiple toolchain maintenance a pain - perfect example being uLaunch and OPL; they can't use the same toolchain as the sources are heavily modified by their respective authors. In that regard, Jimmy's original thread it still useful for those who want multiple toochains to compile various PS2 homebrew projects. But since the PS2DEV toolchain compiles into the root file system out-of-the-box instead of $HOME, some commands and steps for PS2Packer are either vague or not documented.

    Not anymore

    Let's assume your toolchain is working correctly and compiles OPL without a hitch.

    Welp, best way to learn is to deliberately break it, and piece it back together.

    Open Terminal, navigate to the ps2packer's source folder, and break it:

    Code:
    $ make clean
    Now, let's rebuild it:

    Code:
    $ make
    P2Packer should re-compile without any errors at all. But it's not done ...

    Next, you need to become root ...

    Code:
    $ su
    Enter the root password (for Ubuntu, its blank - for Linux Mint, chosen upon installation)

    Your terminal prompt should change from $ to # ...

    As root, and still in the ps2packer source folder, type the following:

    Code:
    # make install
    PS2Packer should now install the compiled binaries.

    No sense in staying root so either close Terminal or type:

    Code:
    # su
    ... followed by the password. The prompt should return to normal ...

    Done deal!

    Feel free to test it out via the OPL update script or "make rebuild" ...

    Solving "Missing" LIBZ.A and LIBUCL.A Error

    If PS2Packer fails to compile because of this error, its due to /usr/lib/ and /usr/lib/i386-linux-gnu/ not being symlinked by your distro. Rest assured if you've ran Soulslayer's script, you've got these specific libraries within /usr/lib/i386-linux-gnu. It's just PS2Packer expects them to be in /usr/lib/ and won't look within the "i386-linux-gnu" folder if there's no symlink. Thanks to doctorxyz, this error is becoming rare as he modified Soulslayer's script to correct this turnaround. In case the script fails at this for some reason, you've got two options:

    (1) modify PS2Packer's makefile
    (2) cheat like hell

    Personally, I choose option 2 - cheat like hell.

    Since we know where the files are, open Terminal and invoke the nuclear option ...

    Code:
    $ gksudo nemo (Mint)
    $ gksudo nautilus (Ubuntu)
    ... followed by the password. Say hello to a radioactive version of Nemo/Nautilus. Be very careful with this thing. Notice that it opens in the root file system instead of $home and that's by design. A linux file manager by itself is harmless. With superuser/root powers, it takes ownership of and adjusts the permissions of everything it looks at. Not kidding. If you can imagine $HOME having root-only read, write, and execute permissions, you can imagine spending minutes to hours at the CLI fixing the damage. Since we have a specific goal and destination, let's not waste any time: navigate to /usr/lib/i386-linux-gnu, locate the LIBZ.A and LIBUCL.A files, hold CTRL when you select them (just like you would in Windows), right-click followed by "Copy". Then, click the "lib" box to bring you exactly one folder up, right click and "Paste", then close Nemo/Nautilus faster than you opened it.

    Then repeat all of the above steps starting with "make clean" ...

    PS2Packer should find the libraries, compile, and install ...
    Attached Files
    Last edited by Bat Rastard; 03-28-2013 at 07:09 AM. Reason: added x64 OS updates
    Reply With Quote  

  2. #2  
    gledson999's Avatar
    gledson999 is offline Member
    Join Date
    Nov 2011
    Location
    Brasil
    Posts
    30
    Downloads
    8
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    3
    Likes Received
    11
    i have a one problem an error while compiling an open ps2 loader because of Freetype
    321.png

    builds/toplevel.mk:43 *** FreeType's build system needs a make programs which supports $(value). stop.
    make: *** [clean] Error 2

    what system are this?
    V17 SCPH-79006 with Network adapter SCPH-10281 500 G HD
    PSP 3000 9G 6.35 PRO CFW
    Unofficial FMCB v1.8C OPL self compiled HD 1TB Buffalo

    http://gledson999.blogspot.com.br/
    ajudar a todos, porque os que ajudamos poderá nos surpreender futuramente
    Reply With Quote  

  3. #3  
    SP193's Avatar
    SP193 is offline The fallen spartan...
    Join Date
    May 2009
    Location
    シンガポール
    Posts
    1,945
    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    33
    Likes Received
    209
    Quote Originally Posted by gledson999 View Post
    i have a one problem an error while compiling an open ps2 loader because of Freetype
    Click image for larger version. 

Name:	321.png 
Views:	130 
Size:	15.6 KB 
ID:	41745

    builds/toplevel.mk:43 *** FreeType's build system needs a make programs which supports $(value). stop.
    make: *** [clean] Error 2

    what system are this?
    This isn't related to compiling OPL on Linux/Ubuntu.

    It seems like you need to update make.exe of your MSYS installation (No, not the Make program in MinGW, but within MSYS).
    Unmodified SCPH-77006 with SM 3.6
    SCPH-39006 with M-chip modchip, SCPH-10281 NA and refurb Seagate 80GB HDD
    SCPH-10000 v1.00 with SCPH-10190 PCMCIA NA and SCPH-20400 HDD unit
    PS2ESDL v0.823B

    やっほー 汗がひかる♪
    Reply With Quote  

  4. #4  
    gledson999's Avatar
    gledson999 is offline Member
    Join Date
    Nov 2011
    Location
    Brasil
    Posts
    30
    Downloads
    8
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    3
    Likes Received
    11
    Quote Originally Posted by SP193 View Post
    This isn't related to compiling OPL on Linux/Ubuntu.

    It seems like you need to update make.exe of your MSYS installation (No, not the Make program in MinGW, but within MSYS).
    when i do a double click in the msys, open this windows, but i compile ps2rd, and other app ps2 in this, but the open ps2 loader don't compile
    V17 SCPH-79006 with Network adapter SCPH-10281 500 G HD
    PSP 3000 9G 6.35 PRO CFW
    Unofficial FMCB v1.8C OPL self compiled HD 1TB Buffalo

    http://gledson999.blogspot.com.br/
    ajudar a todos, porque os que ajudamos poderá nos surpreender futuramente
    Reply With Quote  

  5. #5  
    SP193's Avatar
    SP193 is offline The fallen spartan...
    Join Date
    May 2009
    Location
    シンガポール
    Posts
    1,945
    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    33
    Likes Received
    209
    Quote Originally Posted by gledson999 View Post
    when i do a double click in the msys, open this windows, but i compile ps2rd, and other app ps2 in this, but the open ps2 loader don't compile
    Which is why you should try updating Make. I've replaced mine a long time ago, as the old one was giving me weird problems like that.
    Unmodified SCPH-77006 with SM 3.6
    SCPH-39006 with M-chip modchip, SCPH-10281 NA and refurb Seagate 80GB HDD
    SCPH-10000 v1.00 with SCPH-10190 PCMCIA NA and SCPH-20400 HDD unit
    PS2ESDL v0.823B

    やっほー 汗がひかる♪
    Reply With Quote  

  6. #6  
    Bat Rastard's Avatar
    Bat Rastard is offline No ordinary mage
    Join Date
    Apr 2011
    Location
    Michitucky
    Posts
    360
    Downloads
    2
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    32
    Likes Received
    63
    Yup, looks like he needs 3.81-3 of make for MSYS - almost 1 million downloads and unmodified since June 2010 ... definitely a long time ago!
    Reply With Quote  

  7. #7  
    doctorxyz's Avatar
    doctorxyz is offline I'm just a modest sorcerer's apprentice!
    Join Date
    May 2007
    Posts
    1,091
    Downloads
    2
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    7 Thread(s)
    Likes Given
    124
    Likes Received
    205
    Thanks a lot Bat Rastard and all people involved on recovering this important thread to keep the PS2 Scene alive!
    doctorxyz's PS2 & PS3 stuff: (http://psx-scene.com/forums/f257/doctorxyzs-ps2-ps3-stuff-101348/)
    Reply With Quote  

  8. #8  
    djinkyman is offline Member
    Join Date
    Feb 2013
    Location
    Sweden
    Posts
    21
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Anyone who have experimented with using clang to compile this instead of GCC? On some architectures (f.e. x86_64 and ARM) I've found that clang produces faster code than GCC. I have no idea about the quality of its MIPS-III output, but my thoughts were that maybe it would be possible to acquire a little, little bit high USB transfer speeds reaching closer to the 5mbit/s max speed of the USB1.1 bus.
    Reply With Quote  

  9. #9  
    Bat Rastard's Avatar
    Bat Rastard is offline No ordinary mage
    Join Date
    Apr 2011
    Location
    Michitucky
    Posts
    360
    Downloads
    2
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    32
    Likes Received
    63
    UPDATE

    Q: HELP! Attempting to update OPL via the script (or hg pull -u) produces the following ...

    Code:
    Not trusting file /home/username/repo/.hg/hgrc from untrusted user {username], group {username}
    Recent updates to Mercurial took care of a security hole, and there's various ways to solve it ...

    Trust - Mercurial

    Easiest and fastest way I solved it ... is to ignore the previous step in my guide regarding taking ownership of /home/open-ps2-loader ...

    In case you didn't ignore that and got bit by Mercurial like I did ... sorry about that ...

    Double-click Home, the "open-ps2-loader" folder, right-click anywhere and chose "Open In Terminal" ...

    From there, type the following:

    Code:
    ls -l -A
    This lists ALL folders including the hidden ones. One of 'em will be a ".hg" folder, so give it back to root ...

    Code:
    sudo chown -R root:root .hg
    The update script (or "hg pull -u") from terminal should now work as usual. However, the updated files pulled from the repo such as the Makefile (as well as compiled OPL elf files that get rebuilt) will be owned by root, and show up with the lock icon when browsing with Nautilus/Nemo. Keep this in mind in case you need to change ownership to edit them at a later time. If you also clowned Doctorxyz's beta and GSM repos, you won't have to go through this process; Mercurial considered you "trusted" upon clowning those repos ...
    Reply With Quote  

  10. #10  
    AwesomeNurd's Avatar
    AwesomeNurd is offline Member
    Join Date
    Feb 2013
    Posts
    72
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    1
    Thank you for this guide!
    Reply With Quote  

Page 1 of 3 1 2 3 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •