Announcement

Collapse
No announcement yet.

PS2DEV + Ubuntu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PS2DEV + Ubuntu

    Here's a tutorial which describes how I set up my dev environment under my favorite OS - Ubuntu.

    Code:
    [b]Ubuntu PS2DEV Tutorials[/b]
    
    Last update: Jul 2 2009
    
    Tested with: Ubuntu 9.04 (Jaunty Jackalope)
    
    
    [b]How to set up a PS2DEV environment on Ubuntu?[/b]
    
    1. Install the packages "subversion" and "gcc-4.2":
    $ sudo apt-get install subversion gcc-4.2
    
    2. Download the ps2toolchain script:
    $ svn export svn://svn.ps2dev.org/ps2/trunk/ps2toolchain
    
    3. Run the script to download and build the toolchain:
    $ sudo CC=gcc-4.2 ./toolchain-sudo.sh
    
    4. Edit your login script ~/.profile to add the following:
    export PS2DEV=/usr/local/ps2dev
    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=$PS2DEV/ps2sdk
    export PATH=$PATH:$PS2SDK/bin
    
    5. Build one of the PS2SDK samples to test your environment:
    $ cd /usr/local/ps2dev/ps2sdk/
    $ sudo chmod -R a+w samples/
    $ cd samples/teapot/
    $ make
    
    
    [b]How to update the PS2SDK on Ubuntu?[/b]
    
    After setting up a working PS2DEV environment, it's advisable to update the
    PS2SDK every once in a while.
    
    1. Check out the current sources:
    $ svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk
    
    If you already have a working copy, simply update it:
    $ svn up
    
    2. Build the SDK:
    $ cd ps2sdk/
    $ make clean
    $ make
    
    3. Install it:
    $ sudo -s
    # make install
    # exit
    
    Happy development!
    Another tutorial on how to build ps2link:

    Code:
    [b]How to build ps2link on Ubuntu?[/b]
    
    In order to compile ps2link properly, we'll first need to build ps2smap.irx and
    ps2-packer.
    
      (1) ps2smap.irx
    
    Download and build the sources:
    $ svn export svn://svn.ps2dev.org/ps2/trunk/ps2eth
    $ cd ps2eth/
    $ make
    
    Install ps2smap.irx into PS2DEV environment:
    $ sudo mkdir -p /usr/local/ps2dev/ps2eth/smap
    $ sudo cp smap/ps2smap.irx /usr/local/ps2dev/ps2eth/smap/
    
      (2) ps2-packer
    
    Install the required package libucl-dev:
    $ sudo apt-get install libucl-dev
    
    Download and build the sources:
    $ svn export svn://svn.ps2dev.org/ps2/trunk/ps2-packer
    $ cd ps2-packer/
    $ make
    
    Install ps2-packer:
    $ sudo -s # 'sudo make install' won't work
    # make install
    # exit
    
      (3) ps2link
    
    Finally, simply download and compile the ps2link sources:
    $ svn export svn://svn.ps2dev.org/ps2/trunk/ps2link
    $ cd ps2link/
    $ make
    
    Notes:
    "make dist" creates a compressed archive from the binary files (ELF + IRX).
    "make release" is broken.
    Last edited by misfire; 07-02-2009, 12:42:14 PM.

  • #2
    That, and I'd recommend forcing Ubuntu to allow you to use the root account. Otherwise, you'll constantly be confronted with having to use sudo, then type the sudo password...ugh. It reminds me of Vista

    Otherwise, Ubuntu is a great place to run your SDK.
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

    Comment


    • #3
      It is safer to type 'sudo -s' and get a root shell, then you won't have to type in the password anymore.

      Comment


      • #4
        Yeah, but you'd have to do so each time you enter the shell, correct?
        I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

        Comment


        • #5
          Yes, but how often do you open a shell? And just how lazy are you?

          Comment


          • #6
            Pretty lazy, heh. Those extra steps add up.
            I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

            Comment


            • #7
              I like the concept of sudo. With it, I don't have to remember an extra password and it enables a better security policy.

              Also, the password is stored by default for 15 minutes, which is acceptable even for very lazy people.

              More about the pros and cons of sudo can be found here:
              https://help.ubuntu.com/community/RootSudo

              Comment


              • #8
                I've added a second tutorial to the first post. It's about building ps2link under Ubuntu.

                By accident, I discovered that the "release" target in ps2link's Makefile is broken. It is supposed to create an ISO with all ps2link files. For this it uses ps2mkisofs which seems to be a patched version of mkisofs (?). Maybe I can come up with a patch for the Makefile.
                Last edited by misfire; 08-21-2008, 06:59:13 AM.

                Comment


                • #9
                  Cool. Nice tutorials. I should link to them from PS2Dev (Oobles was kind enough to give me administrative update capabilities, so I can update the PS2 section a bit).
                  I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                  Comment


                  • #10
                    I recognized that some documentation can be really helpful as I tend to forget things over time.

                    Comment


                    • #11
                      Yes...I've read my own guides on various things to jog my own memory, heh.
                      I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                      Comment


                      • #12
                        Here is a guide on building PCSX2 on Ubuntu:
                        http://forums.ngemu.com/pcsx2-offici...nux-guide.html

                        I can confirm that it works on Ubuntu 8.04.

                        Comment


                        • #13
                          A quick note on using FTP

                          I've always used the ExecFTP server to copy files to PS2 memory cards. Unfortunately, ExecFTP's FTP implementation seems to be flawed and many FTP clients fail to do file transfers.

                          One of the compatible clients on Windows is Total Commander.

                          On Linux, I had to test a few clients and the excellent lftp was the only one working so far:

                          Code:
                          $ lftp -u ps2dev,ps2dev 192.168.0.10

                          Comment


                          • #14
                            After trying to set up a PS2DEV environment on my new Desktop machine running 64-bit Ubuntu 8.10, I realized that the toolchain can only be built using a gcc version lower than 4.3. I've updated the tutorial accordingly.

                            Comment


                            • #15
                              Ah, good to know (I remember it wasn't able to support the newest versions).
                              I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                              Comment

                              Working...
                              X