Skip to main content

Overview

The fself tool converts standard ELF executables into SELF (Signed ELF) format for the PlayStation 3. It creates “fake” SELF files that can run on custom firmware but are not officially signed by Sony.
FSELF files are for homebrew development and custom firmware only. They will not run on retail PS3 systems with official firmware.

SELF vs FSELF

SELF (Signed ELF)

Official PlayStation 3 executable format signed by Sony. Required for all PS3 applications and games on retail firmware.

FSELF (Fake SELF)

Unsigned SELF format for homebrew. Works on custom firmware (CFW) without Sony’s signature. Used during development.

Key Differences

  • SELF: Cryptographically signed, runs on retail PS3
  • FSELF: Unsigned, only runs on custom firmware
  • Use Case: FSELF for development, SELF for distribution (requires signing keys)

Command-Line Usage

fself [options] input.elf output.self
If no output filename is specified, fself defaults to creating EBOOT.BIN

Basic Example

# Convert ELF to SELF
fself myapp.elf myapp.self

# Create EBOOT.BIN (default output)
fself myapp.elf

Options

-n
flag
Create NPDRM SELF for use with pkg.py packaging. Required when building PKG files.

NPDRM Mode

# Create NPDRM SELF for packaging
fself -n myapp.elf EBOOT.BIN
NPDRM (PlayStation Network Platform Digital Rights Management) format is required when creating installable PKG packages.

Build Process Integration

The fself tool is automatically integrated into the PSL1GHT build system through ppu_rules:
%.self: %.elf
    $(STRIP) $< -o $(BUILDDIR)/$(notdir $<)
    $(SPRX) $(BUILDDIR)/$(notdir $<)
    $(SELF) $(BUILDDIR)/$(notdir $<) $@
    $(FSELF) $(BUILDDIR)/$(notdir $<) $(basename $@).fake.self

Typical Build Workflow

1

Compile ELF

Compile your application source code to create an ELF executable:
make
2

Strip Symbols

Remove debugging symbols to reduce file size:
ppu-strip myapp.elf
3

Create SELF

Convert to SELF format:
fself myapp.elf myapp.self
4

Load or Package

Either load directly with ps3load or package into PKG format

File Format Details

SELF Header Structure

The FSELF tool creates a complete SELF file with the following components:
  • SELF Header: Magic number, offsets, and metadata
  • App Info: Application type and authentication information
  • ELF Header: Standard ELF header from input file
  • Program Headers: Segment information from ELF
  • Section Info: Section metadata
  • SCE Version: PlayStation 3 version information
  • Control Info: Optional NPDRM control data
  • ELF Data: The actual executable code and data
// From tools/fself/source/main.c:63
self_build_app_info_header(&app_info, npdrm);
self_build_controlinfo_header(&control_info, &info_len, elf_data, elf_len, npdrm);
self_build_self_header(&self_header, &elf_header, &headerEnd, &elfOffset, elf_len, info_len, npdrm);

Example: Creating EBOOT.BIN

# Compile your application
ppu-gcc -o myapp.elf main.c -lrsx -lgcm_sys

# Strip debugging symbols
ppu-strip myapp.elf

# Create EBOOT.BIN for direct loading
fself myapp.elf EBOOT.BIN

Common Use Cases

Development Testing

# Quick test build
fself myapp.elf test.self
ps3load test.self

Package Creation

# Build NPDRM SELF for distribution
fself -n build/myapp.elf pkg/USRDIR/EBOOT.BIN

Dual Output

# Create both regular and fake SELF (done automatically by ppu_rules)
fself myapp.elf myapp.self
fself myapp.elf myapp.fake.self

Source Code Reference

The fself implementation is located in:
  • Main: tools/fself/source/main.c:3-95
  • SELF Builder: tools/fself/source/self.c
  • Utilities: tools/fself/source/tools.c

Troubleshooting

The input file is not a valid ELF file or is corrupted. Ensure you compiled correctly:
file myapp.elf  # Should show "ELF 64-bit MSB executable"
Check file permissions and disk space. The output directory must be writable:
mkdir -p output/
fself myapp.elf output/myapp.self
FSELF files only work on custom firmware. Ensure your PS3 has CFW installed and homebrew loading is enabled.

See Also

PS3 Loading

Load SELF files over network for testing

PKG Creation

Package SELF files for installation

SPRX Linker

Prepare ELF for SELF conversion

Build System

Integrate into your build process

Build docs developers (and LLMs) love