Quantcast
Channel: PSX Place
Viewing all articles
Browse latest Browse all 593

CELL SDK 3.1 Setup [COBRA compiling environment] on Fedora

$
0
0
I've been wanting to make a guide for setup compilation environment for COBRA payload (cell binaries),

ever since I learned through efforts and helps from many other developers, I began to think it would be nice to share my experience with

you all just in case if anyone wants to compile their own Cobra payload with available sources.

This is W.I.P. meaning work-in-process, so this guide will continuously be updated hopefully one day I could write a full tutorial of how to port cobra for different fw versions.
By the way @haxxxen @_NzV_ did nice job on porting Cobra to psl1ght, so maybe this guide seems not really needed but this was how originally done from long ago, also backward compatible with all cobra sources including @haxxxen 's 4.21 / 7.1, which is why I keep insist on using this.
Maybe in near future I should try port my own with psl1ght and make another guide like this but that's just a thought anyways let's start.

The original guide

COBRA 7.00 - PSX-Scene

The cobra dev wrote this really really well, and this is like a bible to me, I've read this about maybe more than 30 times, and still it gives me new info everytime I read this. Maybe I'm just dumb.. lol

This guide is based on this sentence

Quote:

The source code of components is in SRC folder. The main components of Cobra expect the toolchain found at BSC page, with gcc 4.1.1. install all ppu* files for your architecture.
This was way too short for me at the beginning, so I'd assume some people may feel like how I felt, so that was one of those reason I decided to write this guide. :)


Requirement

1. Windows + Virtual Machine such as Virtual Box or VMWare or native Fedora

- VMware Virtualization for Desktop & Server, Application, Public & Hybrid Clouds | United States
- https://www.virtualbox.org/

You can use Windows + VM or just Native Fedora on dual boot system if you ever intend to do.

Currently I installed Fedora 22 LXDE edition on my netbook and KDE version via VM / Windows 8.1 on my desktop.

2. Fedora 22 LiveCD or pre-installed VM image

- Fedora official website
https://getfedora.org/en/workstation/download/

- Pre-installed Fedora 22 VM image link
Fedora Virtual Machine


************************************************** ****************

Spoiler


************************************************** ****************

Either one works fine, you can setup the whole OS from the scratch just to have fun with, or get the one that's ready-to-boot but you still need to install CELL SDK as well.

3. CELL SDK 3.0 or 3.1 [at your choice]

Reference : Cell Programming IBM - PS3 Developer wiki

- 3.0 rpm packages
BSC File List: Browsing - /projects/deepcomputing/linuxoncell/cellsimulator/sdk3.0/custom/header.html

- 3.1 rpm packages

LINK 1
http://www.bsc.es/projects/deepcompu...Fedora/x86_64/

LINK 2 the full package Uploaded on mediafire
http://www.mediafire.com/download/tk.../cellsdk31.rar

NOTE



The Cobra dev recommended gcc 4.1.1, however from my experience, gcc version didn't really matter, you can start with what's recommended and make an adjustment to your dev environment at your choice.

My current setup is Fedora 22 64bit + CellSDK 3.1 + ppu-gcc 4.1.1 version, [native gcc compiler is already included when you install the official fedora package, however that's not enough to compile cobra payload source.]

Download/Install all those ppu rpm packages, and then install all of them. I think gcc-fortran wasn't needed besides you will have an issue with installation due to dependency, so forget about it if it ever gives you any issue.

4. Setup an environment path for the toolchain

You need to edit .bashrc file from your HOME folder, it's hidden file so you need to make it shown to edit with any text editor



So put this inside the file
Code:

# CELL SDK 3.1 Path
export PATH=$PATH:/opt/ibm/systemsim-cell/bin:/opt/cell/toolchain/bin

5. Place pre-compiled scetool inside /usr/bin/ folder.

in case you're getting a compilation error from stage1

Code:

sh: scetool: command not found
Cannot open temp.elf
Makefile_475C:44: recipe for target 'stage1_475C.bin' failed
make[1]: *** [stage1_475C.bin] Error 255
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

Place pre-compiled scetool inside /usr/bin/ folder.

You generally don't have an access to this path, so you need to get "root" access first by typing

"sudo -s" on terminal, then do

"chmod 777 /usr/bin/" then you can place scetool in that path.



also in case of you're getting key errors while compiling stage1

make sure to put data folder that has all the up-to-date keys for kernel signing process

FYI, my sources on github already includes this pre-compiled scetool and data folder with keys

There you go, now you're ready to compile COBRA sources :)

here is my log from a compilation of stage2

Spoiler



Hope this helped!

Many thanks to @evilsperm @haxxxen and @habib for sharing awesome tips :)

Viewing all articles
Browse latest Browse all 593

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>