Need help with getting setup to compile Cobra for Rebug Lite

So I found the github repo for Cobra 8.2/Rebug Lite https://github.com/Evilnat/Cobra-PS3

I planning to do a simple unmodified compile first and test run it with RPCS3 first then start changing things and see how things work after that and use RPCS3 for testing things out.

Only issue is I've never really used cygwin before so not real sure what all I need there, that and this thing doesn't exactly come with a compile manual like some other things on github do. Anybody able to help me with getting started?
 
The "official" Cobra versions used in Rebug (4.46 to 4.86) can be found at
https://github.com/Joonie86/COBRA-7.3
I suggest you download the repo, either as a full zip directly or setting up a local git repo clone.

I dunno which part or parts of Cobra you wish to recompile & whether or not you have other needs. In this post I will assume you only need the Cobra stage2.bin & you should not need cygwin to compile it.

To compile stage2 using the Makefiles from the official repo, you need the PS3SDKv2 toolchain. You can get it at
https://github.com/Joonie86/PSDK3v2.
Download the repo as a zip archive.
Unzip it at the root of your C drive, then unzip the MingW.7z inside the c:\PS3SDKv2 folder.
Unzip the ps3dev.7z archive inside the c:\PS3SDKv2 folder too.
PS3SDKv2 is now installed.

You can add the "bin" paths of PS3SDKv2 to your system environnement PATH variable if you wanna be able to use PS3SDKv2 binaries from the command line but it's not an obligation & you can always do it later anyway.

At this stage, you also need another folder to complete the setup so that you can compile Cobra stage2.
Unzip COBRA-7.3.zip if you downloaded the repo as zip.
Then go to COBRA-7.3/446/SRC/.
Copy the entire "ps3dev2" folder inside your c:\PS3SDKv2 folder.

From here on, you should be able to compile stage2.
Go to your local COBRA-7.3/486/LITE directory.
Open a command prompt there & launch make_stage2.bat from the command line (recommended) or simply double click on make_stage2.bat.

FYI
Generally speaking RPCS3 is not ideal to test things like kernel exploitation payloads.
Behind the scenes, the emulator does not behave exactly like the PS3 & you should never assume that it does. Some kernel features are not yet implemented, others are implemented differently, overall there are many differences that could impact the setup & the running of such a payload.
 
Last edited:
Not sure but isn't 7.3 out dated? because rebug's site says that 4.86 is running with Cobra 8.2 not 7.3. Also I'm not sure what exactly stage 2 means but I have a stage 0 and a stage 2 bat file here. and inside of the stage 2 bat file I see "set CYGWIN=nodosfilewarning"

So I'm a bit confused here on all this.

As for what I need, I only need to compile exactly whats compiled here with pretty much zero changes done to it. If that works just fine than I'm good to go with everything else: https://rebug.me/official-rebug-4-86-1-lite-cobra-8-2-toolbox-2-03-04-april-fools-2020/

As for the whole thing with RPCS3, I'm not majorly worried too much about it working perfectly. I just want to make sure everything boots up just fine with no issue without having to risk my ps3 being bricked(mines basically one of the 20xx slim models so its easily able to install cfw but I'd rather not risk bricking it just to play around with kernel code. That and I'd like to actually play prototype2 while taking a break from it so can't really do that while also testing on the same console.)
 
The Cobra 7.3 repo was updated continuously. It is the official source, the repo's name does not reflect the current source code version. Check the commit history for details.

As to RPCS3, use it as you will, I was only warning you that while using the emulator to test some homebrew is mostly fine, at least with supported features, executing lower level code might result in undefined behaviour. Nothing more.
 
Back
Top