PS2 homebrew toolchain build scripts (EE/IOP/DVP)
  • Shell 58.4%
  • PowerShell 35.9%
  • Batchfile 5.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
techwritescode d81e957dc3 release-sdk.ps1: write per-target .clangd into the installed ps2sdk tree
Editor "go to definition" opens headers from the installed prefix
(ee/include, iop/include, common/include - a flat aggregated copy, not
one directory per source module), not the ps2sdk source repo, so a
.clangd placed in the source repo would never actually be seen by
clangd. This adds the -D_EE/-D_IOP fallback (plus the same -G*/-m*/
-fno-toplevel-reorder Remove: list every project-level .clangd already
uses) directly to the installed ee/, iop/, common/ dirs, so it survives
being shipped in an SDK release rather than only existing on one
dev machine.

Fixes ps2sdk headers spuriously tripping their own
"#if !defined(_EE) && !defined(_IOP)" guard when opened standalone in
an editor with no enclosing translation unit's -D flags in scope.
2026-08-24 19:49:56 -05:00
dvp Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
ee Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
iop Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
lib Initial commit: PS2 toolchain build scripts 2026-08-24 15:00:14 -05:00
.gitignore Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
build-all.bat Initial commit: PS2 toolchain build scripts 2026-08-24 15:00:14 -05:00
build-dvp.bat Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
build-ee.bat Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
build-iop.bat Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
install-msys2.ps1 Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
LICENSE Add license 2026-08-24 15:20:15 -05:00
README.md Consolidate all build output under one gitignored build/ folder 2026-08-24 15:15:09 -05:00
release-sdk.ps1 release-sdk.ps1: write per-target .clangd into the installed ps2sdk tree 2026-08-24 19:49:56 -05:00
release-toolchain.ps1 Add release-toolchain.ps1 and release-sdk.ps1 2026-08-24 17:16:47 -05:00

ps2toolchain

Builds the PS2 homebrew toolchain (EE, IOP, and DVP cross-compilers/ binutils) on Windows, using a portable MSYS2 install - no system installer, no manual PATH setup.

Setup

powershell -ExecutionPolicy Bypass -File install-msys2.ps1

Downloads a portable MSYS2 into .\build\msys2 inside this repo and installs the packages the build needs.

Build

build-all.bat

Builds DVP, then IOP, then EE, into .\build\toolchain. Or build one target at a time with build-ee.bat, build-iop.bat, build-dvp.bat.

Everything the build generates - MSYS2, cloned sources, build trees, the installed toolchain itself - lives under build\ in this repo and nowhere else. It's gitignored; delete it any time to start clean.

Each target's build.sh fetches every source repo it needs up front, before building anything, so a network problem or a bad ref fails fast instead of surfacing after an earlier stage has already spent minutes compiling. It also accepts specific step numbers, to re-run just one stage without repeating the whole thing - e.g. from inside an MSYS2 shell: cd ee && ./build.sh 3 re-runs only the newlib step.

Layout

lib/common.sh    - shared helpers (source fetching, host env setup)
ee/              - EE (Emotion Engine) toolchain: binutils + 2-stage GCC/newlib
iop/             - IOP (I/O Processor) toolchain: vanilla binutils + GCC
dvp/             - DVP (Vector Unit) toolchain: binutils + masp + openvcl
build/           - gitignored - everything generated: msys2/, toolchain/ (install prefix), ee/, iop/, dvp/ (source + build trees)

Each target directory has its own config.sh (source repo/ref pins) and build.sh (orchestrates steps/*.sh in order).

License

This repo's own code is public domain (CC0 1.0 - see LICENSE) and build multiple projects. See each project's own repo for its license terms.