PSX-SCENE Forum Discussion for Sony PlayStation/PsOne/PS2/PS3/PSP/PS VITA
  • ps3dev builder with Osx Mountain Lion by bigboss

    The multi-platform Homebrew Developer bigboss who was known in the PS2 Community as being a member of the PS2Reality Team, who with the help from Hermes and Mavy brought to you the very first homebrew Media-Player for PS2 users some years ago. Has just recently released a new program that will automatically build and install a compiler with other tools used in the creation of homebrew for the PlayStation 3 using the OSX Mountian Lion. This is truly a great thing for homebrew development in the PS3 scene as it now allows for Mac users to develop and compile homebrew on a Mac OSX without having Windows OS as a requirement. Find all the details below in the the official release quote & readme file.



    ps3dev builder with Osx Mountain Lion
    i have just released a tool to let you build under Osx Mountain Lion:
    - Sony binutils and toolchain gcc 4.1.1 for SDK 3.60. Don't ask about how to get SDK 3.60
    - ps3dev binutils,toolchain , psl1ght and ps3libraries

    More details at:

    https://github.com/bigboss-ps3dev/ps3dev-mountain-lion

    Enjoy more to come...
    What does this do?

    This program will automatically build and install a compiler and other tools official and homebrew used in the creation of official and homebrew software for the Sony PlayStation 3 videogame system using Osx Mountain Lion
    What do i need ?

    You will need a few tool installed before:

    1) Your mac with Osx Mountain Lion. All was tested with mac mini late 2012

    2) Enable root account. Ref OS X Mountain Lion: Enable and disable the root user

    3) Install xquartz (x11) Ref XQuartz

    4) Install xcode from app store. After install it, open it and install command line tools. You must go yo Downloads section of Xcode's preferences to do it


    5) Install macport https://distfiles.macports.org/MacPo...untainLion.pkg

    6) Update macport and enable +universal

    sudo port -v selfupdate

    it will ask you root password, after finish it execute the following line:

    if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi

    7) Install port utils (I installed these, you can have other requirements) sudo port install autoconf automake bison flex texinfo ncurses wget libelf zlib libtool git-core gmp openssl mpfr libmpc unrar subversion bzip2

    8) Install wine port i use it when some Sony tools are not availables in osx

    sudo port install wine

    after finish it open a new terminal and run

    winecfg

    it will create basic wine configuration needed later

    Run these commands from terminal

    sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist

    launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

    9) Create /usr/local/cell and /usr/local/ps3dev folder:

    su -

    it will ask you root password

    mkdir -p /usr/local/cell

    mkdir -p /usr/local/ps3dev

    I am using my own user and group, use your own configuration as you like

    chown -R bigboss:staff /usr/local/cell

    chown -R bigboss:staff /usr/local/ps3dev

    10) Go to /usr/local/cell and get my repository

    mkdir /usr/local/cell/work

    cd /usr/local/cell/work

    git clone https://github.com/bigboss-ps3dev/ps...ntain-lion.git

    11) Install a good and light editor


    I am using one of the best editor ever made Textmate you can get it from https://github.com/textmate/textmate there are prebuilt binaries

    How do I use it to build Sony toolchain?

    1) Get Sony SDK 3.60 full google for it or if you are a Sony PlayStation licensee get it from scedev.net as usual
    2) You will need to put some files on /usr/local/cell/work/sdk this directory is not in my repo, don't upload illegal stuff to github please. These files are mandatory put on /usr/local/cell/work/sdk if you have other names change the script build_sony.sh or change filenames:

    [159]-PS3_SDK-360_002.zip
    [166]-PS3_SDK_Samples-360_001.zip
    [78]-PS3_SDK-360_001.zip
    toolchain-src-3.6.0-GCC411.zip

    These files are optional put on /usr/local/cell/work/sdk

    [28]-PS3_SDKDoc-360_01-CHM-English.zip
    [29]-PS3_SDKDoc-360_01-Help2-English.zip
    [30]-PS3_SDKDoc-360_01-HTML-English.zip
    [31]-PS3_SDKDoc-360_01-Latest-English.zip

    These files are not needed to build toolchain but you can use them with wine to work with your PlayStation 3 DEX

    [84]-SNCPPUToolchainforPlayStation3v360.1.zip
    [85]-ProDGforPlayStation3v360.2.0.exe
    [86]-TargetManagerForPlayStation3v360.2.0.exe
    [87]-TunerforPS3v360.2.0.exe

    3) Open a new terminal and go to work directory cd /usr/local/cell/work
    4) Run build.sh script for sony ./build.sh sony

    You must overwrite some files choosing A option asked with propmt
    5) Wait until finish

    You can test your new toolchain compiling some sample for example

    cd /usr/local/cell/work

    You will need profile variables

    . ./sce_profile

    cd $CELL_SDK/samples/sdk/usbd/usbdesc

    make

    This sample is compiled natively in osx, only when elf is linked it will call ppu-lv2-prx-fixup wine wrapper. This tool is used to fix lib stub counts and some other things (you have a source example of this part for elf files and --stub-fix-only option implemented if you like to know what is Sony doing when it is calling this tool from linker, i lose some time making it but prx use other options that i have not implemented yet so for this, wrapper is enabled)

    Making fself for DEX is using a wine wrapper if you have a legal native solution for osx share sources for it

    Sample output:

    bigmini:usbdesc bigboss$ pwd

    /usr/local/cell/samples/sdk/usbd/usbdesc

    bigmini:usbdesc bigboss$ ls

    Makefile main.c readme_e.txt readme_j.txt usbdesc.vcproj

    bigmini:usbdesc bigboss$ make

    /usr/local/cell/host-osx/ppu/bin/ppu-lv2-gcc -c -g -O2 -std=c99 -W -Wall -Wuninitialized -Wcomment -Wchar-subscripts -Wdeprecated-declarations -Wendif-labels -Wformat=2 -Wformat-extra-args -Wimplicit -Wimport -Winline -Wmissing-braces -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wswitch -Wunknown-pragmas -Wunused -Wwrite-strings -Wmain -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -I/usr/local/cell/target/ppu/include/cell/usbd -DCELL_DATA_DIR=\"/usr/local/cell/sample_data\" -Wp,-MMD,objs/main.ppu.d,-MT,objs/main.ppu.o -o objs/main.ppu.o main.c

    /usr/local/cell/host-osx/ppu/bin/ppu-lv2-g++ -mno-sn-ld objs/main.ppu.o -lusbd_stub -lsysmodule_stub -lsysutil_stub -o sample.elf

    calling ppu-lv2-prx-fixup with --stub-fix-only sample.elf

    finished ppu-lv2-prx-fixup process with 0

    /usr/local/cell/host-osx/bin/make_fself sample.elf sample.self

    calling make_fself with sample.elf sample.self

    fixme:msvcrt:MSVCRT__sopen_s : pmode 0x01c0 ignored

    finished make_fself process with 0

    bigmini:usbdesc bigboss$ ls

    Makefile objs readme_j.txt sample.self main.c readme_e.txt sample.elf usbdesc.vcproj

    How do I use it to build homebrew toolchain?

    1) Open a new terminal cd /usr/local/cell/work

    2) Run build.sh for ps3dev ./build.sh ps3dev
    3) Wait until finish ignore errors in last lib NoRSX

    How to load samples to PS3 CEX and DEX?

    TODO

    Sources: Bigboss' Blog & Github


    PSX-SCENE: The Pinnacle Scene Xenocracy
    Comments 3 Comments
    1. r1c0la's Avatar
      r1c0la -
      saw that headline as "OSX Mountain Lion ported to PS3" lolo

      still a nifty project though
    1. STLcardsWS's Avatar
      STLcardsWS -
      LOL^, that would be fun

      Even if this doesn't apply to you directly its a great thing for the homebrew scene. , Will help in bringing more developers into the scene. Which is a good things for everyone and the scene.

      Great work bigboss!!!
    1. fromzero's Avatar
      fromzero -
      Quote Originally Posted by r1c0la View Post
      saw that headline as "OSX Mountain Lion ported to PS3" lolo

      still a nifty project though
      I was hoping to read something similar but had a strong feeling that "it is what it is"