PS3 [Guide] PSL1GHT Setup on Windows 10 (Cygwin or MinGW)(2017 Edition)

CaptainCPS-X

Developer
[Guide] PSL1GHT Setup on Windows 10 (Cygwin or MinGW) (2017 Edition)

adm5QRdi.png

INTRODUCTION
Welcome to my 2017 updated guide. Here I will explain as clear and direct as possible how to build you own PSL1GHT environment on Windows 10. It should still work fine in previous versions of Windows.

Please be aware that this guides are using PSL1GHT v2 and latest PS3 Toolchain, so any homebrew that was specifically adjusted for older PSL1GHT v1 will not compile properly, for example "Showtime Media Center".

Make sure not to have conflicting Cygwin / MinGW installation paths in your system "Environment Variables" (PATH)

NOTES / UPDATES

Please, always check this section for any update regarding the guides.
[#2][August 11, 2017] - Added fix for Python when making PKG files.
[#1][August 7, 2017] - Updated CYGWIN guide for Windows 10, now using my own Git repositories as well.



IMPORTANT NOTICE (PLEASE READ)
:
By following this guide, you accept and agree with the following:
1 - I am in no way responsible for any damage caused to your operative system, files and/or data.
2 - You accept full responsibility of anything you do on your computer.
3 - You understand the contents and objective of this guide completely.​

THANKS TO (In no specific order)
  • Graf_chokolo.
  • Everyone involved in PSL1GHT development.
  • Hermes, Estwald, and others involved in Iris Manager development.
  • aldostools for you awesome ps3tools, they are very useful.
  • The guys responsible for PSL1GHT Wiki and all the contributors.
  • Everyone else that has contributed to the PS3 Scene in some way.

GENERAL REQUIREMENTS

  • Windows 7/8/10 (x86/x64) (logged user account should have Admin permissions).
  • Basic knowledge of Windows 7/8/10 (Copy, Paste, Extract ZIP/RAR, etc...).
  • 4-8GB Free Hard Disk Space.
  • Internet connection
  • Motivation! :)
CYGWIN GUIDE (ADVANCED)

abnbDSg5.png


  • CYGWIN ENVIRONMENT REQUIREMENTS

    • Cygwin x86 Setup - [download] (Regular "setup-x86.exe" from official site)

  • CYGWIN ENVIRONMENT SETUP

    Step 1 - Install Cygwin x86
    1 - Run "setup-x86.exe" and press "Next"
    2 - Make sure to select "Install from Internet" (Default option)

    9blO7ZcG.png


    3 - Select "C:\cygwin_local_package" for the package, or any place you like

    s28nGFLu.png


    4 - Select the Root Directory for Cygwin (default is "C:\cygwin").

    PRDm0ABY.png


    5 - Continue until this window:

    066N8zci.png


    6 - Now you will write "wget" on the top-left search box, and from the Web category click on "Skip" to select/switch its installation, it should become "1.xx.x-x" (use the latest).

    Jo62zeXO.png


    G6Gk7buv.png


    7 - On next window confirm and continue setup normally without changing any other option.

    NOTE: You will probably get some warnings at the end of the installation log, it is normal, and that's why we will restart at "step 9" and run the rebaseall command. If you don't get warnings, even better.

    8 - On your Desktop there should be a new shortcut for "Cygwin Terminal"
    8a - If you don't end up with a shortcut on the Desktop don't worry, do the following to create a shortcut:

    1 - Go to your Desktop and right-click to open up the shell menu.
    2 - Select "New->Shortcut"
    3 - On the new window, write on the text-box "c:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -" (assuming you installed it on the default location) and press "Next".
    4 - Write the title for the shortcut "Cygwin Terminal" and you will be done!
    5 - Now, using Windows Explorer you must run "c:\cygwin\Cygwin.bat" (assuming you used the default directory) at least once, so Cygwin can create some initial configuration files and such, or else you will have issues.
    9 - Restart Windows (not logoff, full restart).
    10 - Open "cmd" prompt as administrator (in the start menu search box write "cmd", right-click "cmd" and select "Run as administrator")

    S6oMebQP.png


    11 - Write "c:\cygwin\bin\ash /usr/bin/rebaseall" and press "Enter", when it finish close the window.

    Step 2 - Installing all required Cygwin packages

    1 - Run "Cygwin Terminal" and carefully copy and paste the following:

    Code:
    wget --no-check-certificate https://raw.githubusercontent.com/CaptainCPS/apt-cyg/master/apt-cyg
    chmod +x apt-cyg
    mv apt-cyg /usr/bin
    apt-cyg update
    apt-cyg install autoconf automake bison flex texinfo libncurses-devel gcc4 gcc-g++ make libelf0-devel python python2-devel zlib-devel libtool libgmp-devel openssl-devel pkg-config git subversion mercurial patch bzip2 mc mpfr
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.

    Step 3 - Creating new Environment Variables and Directories

    1 - Run "Cygwin Terminal" and carefully copy and paste the following:

    Code:
    echo 'mount -c /' >> ~/.bash_profile
    echo 'mount -m > /etc/fstab' >> ~/.bash_profile
    echo 'export PS3SRC=/usr/src/ps3dev' >> ~/.bash_profile
    echo 'export PS3DEV=/usr/local/ps3dev' >> ~/.bash_profile
    echo 'export PSL1GHT=$PS3DEV/psl1ght' >> ~/.bash_profile
    echo 'export PATH="$PATH:$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin"' >> ~/.bash_profile
    . ~/.bash_profile
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.

    * Info about the previous commands:

    This will change the cygdrive prefix, so you can access a path without having to write "/cygdrive/c/mydir/..." just "/c/mydir/..." and add the following new Environment Variables to Cygwin:

    - PS3SRC
    - PS3DEV
    - PSL1GHT
    - PATH (updated with binaries or "bin" directories)

    2 - Copy and paste the following to create the needed directories:

    Code:
    mkdir $PS3DEV
    mkdir $PS3SRC
    chown "$USER" $PS3DEV
    chown "$USER" $PS3SRC
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.

    Step 4 - Getting PS3 Toolchain from my Git (build fixes and portlibs included):

    1 - Do this on "Cygwin Terminal":

    Code:
    git clone https://github.com/CaptainCPS/ps3toolchain.git $PS3SRC

    Note: If it gives you the following error, just try again, it happens sometimes.

    Code:
    Cloning into '/usr/src/ps3dev'...
          1 [main] git-remote-https 1324 child_info_fork::abort: G:\cygwin\bin\cygroken-18.dll: Loaded to different address: parent(0x330000) != child(0x2B0000)
    error: cannot fork() for fetch-pack: Resource temporarily unavailable

    Step 5 - Build everything (this will take some time, so please be patient)

    1 - Do this on "Cygwin Terminal":

    Code:
    cd $PS3SRC
    ./toolchain.sh
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.


  • PKGCRYPT / PYTHON FIX (NOT NEEDED ANYMORE)

    If you run into the following error while trying to make a PKG file:

    Code:
    Traceback (most recent call last):
      File "/usr/local/ps3dev/bin/pkg.py", line 229, in <module>
        import pkgcrypt
    ImportError: Permission denied
    make: *** [Makefile:263: pkg] Error 1

    Just open the Cygwin Terminal and run this command to fix the problem:

    Code:
    chmod +x /usr/local/ps3dev/bin/pkgcrypt.dll

    Note: This fix is left here for reference, since now I included a script on my ps3toolchain git that takes care of the issue :).

  • TESTING PSL1GHT ON CYGWIN ENVIRONMENT

    We will use latest Iris Manager from Estwald Git for the test.

    1 - Run "Cygwin Terminal" and do this:

    Code:
    cd $PS3DEV
    mkdir irismanager-4-x
    chown $USER irismanager-4-x
    git clone https://github.com/Estwald/irismanager-4-x.git irismanager-4-x
    cd irismanager-4-x
    make
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.

    2 - After running those commands, Iris Manager should be compiled without any issues.



MINGW GUIDE (EASY)

Tu5BD2OE.png

  • MINGW ENVIRONMENT REQUIREMENTS
    • PSDK3 v2 from Estwald's Git - [download] [~322MB]


  • MINGW ENVIRONMENT SETUP

    Step 1 - Preparing the the PSDK3 v2 directory

    1 - Extract "PSDK3v2-master.zip" to "C:\PSDK3v2"
    2 - Go to "C:\PSDK3v2" and extract "MinGW.7z" and "ps3dev.7z" in there.
    3 - Make sure that everything looks like this:

    acu8cEMH.png

    Step 2 - Creating a new "MSYS Terminal" shortcut on your Desktop

    1 - Go to your Desktop and right-click to open the shell menu.
    2 - Select "New->Shortcut"
    3 - On the next window, write this "C:\PSDK3v2\MinGW\msys\1.0\msys.bat -norxvt" and press "Next".
    4 - Now write the title "MSYS Terminal"
    5 - Now, right-click the new shortcut you just created and select "Properties"
    6 - Change "Start in" text to "C:\PSDK3v2\MinGW\msys\1.0\bin"
    7 - Make sure it looks like this:

    aciOTuxH.png

    Step 3 - If you installed PSDK3 v2 in a different place than "C:\PSDK3v2\" check this:

    1 - Using Windows Explorer go to where you installed PSDK3 v2 (Ex. "X:\PSDK3v2")
    2 - Navigate to "X:\PSDK3v2\MinGW\msys\1.0\etc" and open "profile" with a text editor.
    3 - Go to the bottom of the text-based file (profile), and change the following line with the corresponding drive, in this example "X":

    Code:
    export PS3SDK="/c/PSDK3v2"

    to

    Code:
    export PS3SDK="/x/PSDK3v2"

    4 - Save the file and you're done!


  • TESTING PSL1GHT ON MINGW / MSYS ENVIRONMENT

    1 - Run "MSYS Terminal" and do the following:

    Code:
    cd $PS3SDK
    wget --no-check-certificate -O irismanager-4-x-master.zip https://github.com/Estwald/irismanager-4-x/archive/master.zip
    unzip irismanager-4-x-master.zip
    cd irismanager-4-x-master
    make npdrm
    cd ./

    Note: Make sure all command lines are executed, if you end up with last one hanging, press enter. Better yet, I recommend doing each line one-by-one.

    2 - After running those commands, Iris Manager should be compiled without any issues.

    SeeYa!
    :D
 
Last edited by a moderator:
Nice updated tut... Thanks for that & for taking the time to sort out proper repos...

Btw you do well to warn about conflicting mingw/cygwin path in the windows environment variables, it's a classic problem that many users would be stuck with without understanding the reason...
It reminds me of another typical cygwin issue with certain paths like cygdrive not working correctly if ever the cygwin bin folder path is not the first item in the PATH variable...

The last time I compiled & installed psl1ght on Linux, 7/8 months ago, using a clone of the latest & "updated" ps3dev repos, I was plagued with wget certificate issues in the scripts & I ended up having to edit half the scripts.
Edit: In fact, come to think of it, I remember I simply disabled all wget certificate checks globally & re-enabled them after installation... Got tired of editing the 10/12 installation scripts that required it...
Hopefully this repo will sort that out...
 
Last edited:
Nice updated tut... Thanks for that & for taking the time to sort out proper repos...

Btw you do well to warn about conflicting mingw/cygwin path in the windows environment variables, it's a classic problem that many users would be stuck with without understanding the reason...
It reminds me of another typical cygwin issue with certain paths like cygdrive not working correctly if ever the cygwin bin folder path is not the first item in the PATH variable...

The last time I compiled & installed psl1ght on Linux using a clone of the latest & "updated" ps3dev repos, I was plagued with wget certificate issues in the scripts & I ended up having to edit half the scripts.
Hopefully this repo will sort that out...

Thanks! I was away from the scene for so long, it has been a pleasure to come back and start to participate again with this guide. Hopefully it will help those who want to collaborate in some way making homebrew with PSL1GHT.

SeeYa!
:D
 
Hi everyone just updated the guide with a fix when making PKG files, I will incorporate this fix later in my repository scripts so it is done automatically. For now here is the workaround :)

PACKAGES (PKG) & PYTHON FIX

If you run into the following error while trying to make a PKG file:

Code:
Traceback (most recent call last):
  File "/usr/local/ps3dev/bin/pkg.py", line 229, in <module>
  import pkgcrypt
ImportError: Permission denied
make: *** [Makefile:263: pkg] Error 1

Just open the Cygwin Terminal and run this command to fix the problem:

Code:
chmod +x /usr/local/ps3dev/bin/pkgcrypt.dll

Note: I will incorporate this fix into my repository scripts later on.

SeeYa!
:D
 
I just updated my ps3toolchain with various changes including the fix for pkgcrypt and python. So if you follow my guide you don't have to worry about that error anymore since it will be fixed automatically.

- Added script to give 'pkgcrypt' execute permission flag and allow python to run it.
- Added status notification for the new scripts (10 and 11).
- Updated readme.txt to include a link to my official guide at PSX-Place.

https://github.com/CaptainCPS/ps3toolchain

SeeYa!
:D
 
I need help~ how to fix issue
OS:WIN8.1 + cygwin

gcc: fatal error: no input files
compilation terminated.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I../../bfd -I../../bfd/../include -DHAVE_bfd_elf64_powerpc_vec -DHAVE_bfd_elf64_powerpcle_vec -DHAVE_bfd_elf32_powerpc_vec -DHAVE_bfd_elf32_powerpcle_vec -DHAVE_rs6000coff_vec -DHAVE_rs6000coff64_vec -DHAVE_aix5coff64_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec "-DBINDIR=\\/usr/local/ps3dev/ppu/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -c -o archures.lo -DDEFAULT_VECTOR=bfd_elf64_powerpc_vec -DSELECT_VECS=&bfd_elf64_powerpc_vec,&bfd_elf64_powerpcle_vec,&bfd_elf32_powerpc_vec,&bfd_elf32_powerpcle_vec,&rs6000coff_vec,&rs6000coff64_vec,&aix5coff64_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec -DSELECT_ARCHITECTURES=&bfd_rs6000_arch,&bfd_powerpc_arch ../../bfd/archures.c" -o archures.o
gcc: fatal error: no input files
compilation terminated.
gcc: fatal error: no input files
compilation terminated.
gmake[4]: *** [Makefile:1541: bfd.lo] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: *** [Makefile:1541: archive.lo] Error 1
gmake[4]: *** [Makefile:1541: bfdio.lo] Error 1
gmake[4]: *** [Makefile:1903: archures.lo] Error 1
gmake[4]: Leaving directory 'D:/Cygwin/usr/src/ps3dev/build/binutils-2.22/build-ppu/bfd'
gmake[3]: *** [Makefile:1579: all-recursive] Error 1
gmake[3]: Leaving directory 'D:/Cygwin/usr/src/ps3dev/build/binutils-2.22/build-ppu/bfd'
gmake[2]: *** [Makefile:1082: all] Error 2
gmake[2]: Leaving directory 'D:/Cygwin/usr/src/ps3dev/build/binutils-2.22/build-ppu/bfd'
gmake[1]: *** [Makefile:2510: all-bfd] Error 2
gmake[1]: Leaving directory 'D:/Cygwin/usr/src/ps3dev/build/binutils-2.22/build-ppu'
gmake: *** [Makefile:843: all] Error 2
../scripts/001-binutils-PPU.sh: Failed.
 
But you need python-devl:
apt-cyg install python-devel

Ok. If somebody trying this first solution with cygwin at 2019 - it works, but at step 4 you need to write this:

git clone https://github.com/ps3dev/ps3toolchain.git $PS3SRC

This repo support gcc 7.2

Who what help me to try compile Retro Arch for PS3? xbins.org (where is the compiled package) dosen't update it any more.

Looks very nice! Thanks! :D

@STLcardsWS I got a surprise coming soon, I will be posting the WIP in a few moments :)

SeeYa!
:D

My Captain, are you here?
 
Can someone update this Guide, cygwinx86 does not work on 64bit systems, and on MinGW 'wget' is not working. I managed to install cygwin64, but have some errors, i think 3 of the dependencies didnt download at all, is it because of 64bit version or am i doing something wrong? When i type './toolchain.sh' i get an error saying that i have to install 'autoconf' but i'm prety sure it's there. On MinGW i think it's an old link to irismanager that is not working. I'm not sure. Btw i'm using Win8.1x64. Thank you all for great stuff. Keep it going.
 
Can someone update this Guide, cygwinx86 does not work on 64bit systems, and on MinGW 'wget' is not working. I managed to install cygwin64, but have some errors, i think 3 of the dependencies didnt download at all, is it because of 64bit version or am i doing something wrong? When i type './toolchain.sh' i get an error saying that i have to install 'autoconf' but i'm prety sure it's there. On MinGW i think it's an old link to irismanager that is not working. I'm not sure. Btw i'm using Win8.1x64. Thank you all for great stuff. Keep it going.
I haven't compiled the toolchain in about 2 years (i compiled in CygwinX64 and also Mingw) but i had problems with the official git, but i did have more luck with bucanero's fork worked great for me at
https://github.com/bucanero/ps3toolchain
It worked for my on cygwinX64 until PSL1GHT part where it failed on "028-mbedTLS-2.16.6.sh" on the script line that had \n twice on it, but after removing the \n it worked fine.
EDIT:- Also i followed his dependencies but there was still rhash and zip missing so install those too.
Mingw took a little more work and required changing the scripts a bit more, there are more posts on that somewhere in this thread
https://www.psx-place.com/threads/compiling-open-source-ps3-toolchain-nowadays-in-2020.30030/

I hope that helps, i havent tried compiling recently so not sure if its changed, from what you said there are some wget problems ? i will check this and get back to you soon (it could be some change has happened in the links).

EDIT: Just checked and im getting wget errors so something has changed (maybe my setup is just too out of date ?), i will try updating wget and seeing if it continues
EDIT2: Still failed on wget even after updating it to the latest version on cygwin
EDIT3: Ok adding "--no-check-certificate" to the wget scripts fixes the problem for me.
 
Last edited:
Thank you for confirming this, i will try what you suggested. This command didn't work for me in MinGW
'wget --no-check-certificate -O irismanager-4-x-master.zip https://github.com/Estwald/irismanager-4-x/archive/master.zip'
yet everething seemed to be in place, on the root of the 'C' drive. I have a linux distro on an older chromebook and i have found a precompiled version on ps3devwiki, so maybe i'll go that way if i have no luck setting this up on windows.
 
Thank you for confirming this, i will try what you suggested. This command didn't work for me in MinGW
'wget --no-check-certificate -O irismanager-4-x-master.zip https://github.com/Estwald/irismanager-4-x/archive/master.zip'
yet everething seemed to be in place, on the root of the 'C' drive. I have a linux distro on an older chromebook and i have found a precompiled version on ps3devwiki, so maybe i'll go that way if i have no luck setting this up on windows.

Odd, i just copied and pasted your command into Msys2/Mingw-UCRT64 and it got the file and named it irismanager-4-x-master.zip fine
Code:
$ wget --no-check-certificate -O irismanager-4-x-master.zip https://github.com/Estwald/irismanager-4-x/archive/master.zip
--2023-03-24 12:12:52--  https://github.com/Estwald/irismanager-4-x/archive/master.zip
Loaded CA certificate '/usr/ssl/certs/ca-bundle.crt'
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
WARNING: The certificate of 'github.com' is not trusted.
WARNING: The certificate of 'github.com' doesn't have a known issuer.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/Estwald/irismanager-4-x/zip/refs/heads/master [following]
--2023-03-24 12:12:55--  https://codeload.github.com/Estwald/irismanager-4-x/zip/refs/heads/master
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
WARNING: The certificate of 'codeload.github.com' is not trusted.
WARNING: The certificate of 'codeload.github.com' doesn't have a known issuer.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: 'irismanager-4-x-master.zip'

irismanager-4-x-master.z     [   <=>                             ]   4.07M  7.11MB/s    in 0.6s

2023-03-24 12:12:56 (7.11 MB/s) - 'irismanager-4-x-master.zip' saved [4273068]
so not sure why that that didn't work for you.
But im also curious why you are downloading Irismanager anyway when trying to compile the toolchain ? or do you just want to compile Irismanager so you want the toolchain too ?
 
I will try to reinstall everething to see if that will fix it. Maybe it's my ispn, i'll investigate into that possibility. It could be antivirus software that is blocking connection. Im not sure. Will reply later. The last option is to use linux natively for compilation or to use the link of precompiled software provided on ps3devwiki. I just want to try MinGW with 'irismanager' and to see how it's working btw, with the toolchain i was using cygwin and i was getting error saying 'autoconf' is not installed, but i know it was there... Thank you once again.
 
Last edited:

Similar threads

Back
Top