Developer and Documentation Maintenance
Keep source behavior, user instructions, CI contracts, release packaging and third-party attribution synchronized.
- Building from Source: PS2BUILD SDK, LLVM/Clang toolchain, dependency scripts, DS34 variant, verification, packaging, tests and GCC comparison builds.
- Architecture & Repository Layout: what is in each directory and the runtime rules.
- Contributing & Testing: workflow, CI gates, writing tests and documentation requirements.
Source of truth
The public site is generated from docs-site/content/*.html plus docs-site/manifest.json by docs-site/build.py. docs/wiki/*.md contains the version-controlled, wiki-style guide set, and the Synchronize GitHub Wiki workflow mirrors it, the site pages and docs/THIRD_PARTY_CREDITS.md into the repository wiki without deleting unmanaged pages. Do not hand-edit the generated gh-pages branch or the wiki: the publishing workflows replace them. Pages are HTML fragments (no <html> wrapper); give every h2/h3 an id so it appears in the table of contents and search, and reuse the existing callout, matrix, tree and table markup.
Build at a glance
Release builds use the PS2BUILD SDK and its LLVM/Clang toolchain, exactly as CI does. After installing or refreshing the SDK with sh scripts/ps2build_sdk.sh --llvm "$HOME/.local/share/ps2build" and adding that directory to PATH:
bash scripts/build_cloud_tls.sh # Mbed TLS 3.6.7 for the active toolchain
bash scripts/build_jpeg.sh # libjpeg-turbo 3.1.3 for the active toolchain
python3 scripts/gen_cloud_client.py # Google OAuth client header (from env, optional)
python3 scripts/gen_githash.py --require-git
ps2build build # -> build/bin/wLaunchELF-packed.elf
python3 scripts/configure_ds34.py # DualShock variant
ps2build build -c .ps2-ds34.yaml -o build-ds34The full procedure, including the verification scripts, packaging, tests and GCC comparison builds, is on Building from Source.
Build and validate the documentation
python3 docs-site/build.py --out site --zip Launchstation-Documentation.zipThe generator checks the page inventory, unresolved template fragments, site assets, images, stale upstream branding outside Credits, and internal HTML links before writing the offline archive. A page that exists in content/ but not in the manifest is not built (though the wiki sync still publishes it), and a manifest entry with no fragment fails the build. python3 tests/test_wallpaper_docs.py and tests/test_project_branding.py guard the theme guide and the project identity strings.
Main CI gates
.github/workflows/compile.yml runs on every push to master/main, every pull request and manual dispatch:
- More than a hundred compiled or source-contract regression tests (device/USB/PAD timing, navigation, settings, MMCE backup and recovery, cloud, updater and release-workflow safeguards, storage drivers, PC CARD CF, UDPFS). The list is explicit in the workflow.
- Documentation site build, then the SDK install and update.
- Mbed TLS and libjpeg-turbo cross-builds, the Google client header, and the isolated PC CARD CF driver and
ps2ips_rpcsocket server. - Standard and DS34 cross-builds with
check_ds34_build.py(variant symbols),check_toolchain_purity.py(Clang-only objects),check_udpfs_smap.py(source-built SMAP and bundled peer ABI) andcheck_loader_layout.sh(embedded loader fits0x84000..0xa0000). - Package generation and verification, copy-test fixture upload and artifact hashes.
Hardware-only timing, USB bridge behavior, console model quirks and external game-core interaction remain separate from automated acceptance.
Rolling release and Pages
A verified push to master publishes APP_LAUNCHSTATION.psu, APP_LAUNCHSTATION-<build>.zip, APP_LAUNCHSTATION-DS.psu, APP_LAUNCHSTATION-DS-<build>.zip (the build number is the commit count, also shown in the release title and notes), the loose LAUNCHSTATION.ELF, LAUNCHSTATION-DS.ELF, BOOT.ELF and BOOT2.ELF, and the optional full kit LAUNCHSTATION-<build>.zip (scripts/package_kit.py: the standard app and PSU under RiptOPL’s ZIP layout with POPS/ and EMBER/ pinned to a RiptOPL commit in ship/kit-externals.json, the ps2max32/neutrino latest release and the ship/shortcuts; refresh-pin --commit moves the pin) to the rolling latest release. The step skips superseded builds, refuses to move the latest tag unless the old commit is an ancestor of the new one, uploads, downloads the assets back and compares them byte for byte, and only then moves the tag and marks the release Latest. After that it removes the previous builds' app ZIPs. A failed upstream download or kit check skips the new kit and keeps the previous kit attached; its filename build number can therefore differ from the current release title. Release notes come from scripts/release_notes.py, which prefers the ## Rolling section of CHANGELOG.md and adds first-parent merge links when that text did not change. The documentation workflow builds from the same source and publishes gh-pages whenever docs-site/** changes on master. A docs-only commit therefore produces a new rolling build without implying runtime behavior changed.
Native updater
Check for updates (Settings > System) queries the GitHub API for the latest release, reads the SHA-256 digest GitHub reports for this variant's PSU (APP_LAUNCHSTATION.psu or APP_LAUNCHSTATION-DS.psu, chosen at compile time), and asks GitHub to compare the installed commit with the release commit. Only a release that is strictly ahead is offered; same, behind, diverged or unverifiable results are not installed. On confirmation it downloads the PSU (at most 16 MiB, up to six HTTPS redirects) into RAM via cloudHttpDownloadMem() (update_ram_buffer() needs the package plus a 4 MB heap reserve, otherwise the update is refused before anything is touched), verifies the digest, locates the ELF with selfUpdateLocatePsuElf(), checks that it is a PS2 ELF, adds a missing WLE-UPDATE-CA.PEM or BGM.ADP from the package (never overwriting existing files), and writes the new ELF straight over the running one with genOpen(FIO_O_WRONLY | FIO_O_CREAT | FIO_O_TRUNC) (mcman truncates only in its O_CREAT branch). No second file, rename, delete or backup is made; a failed write reports the step (1 open, 2 write, 3 close) and the error code. Before writing it removes a leftover .BAK and refuses when filerFreeSpace() on the app's own (already mounted) device plus the old ELF's size is less than the new ELF plus 32 KB. In-place update is supported for ELFs on mc, mass/usb, mmce, mx4sio, ilink, ata and hdd paths. See Downloads.
Runtime architecture
Neutrino uses an already mounted backing-store stack for quick-boot, while Ember's USB path first performs a controlled clean IOP storage-stack rebuild and remounts the same game identity before its final keep-IOP launch. Neither follows the ordinary ELF reset preference. Local MMCE history is verified before optional Drive upload. See Architecture & Repository Layout.
Building the Google client into a build
Official builds embed the project's own Google OAuth client. CI passes the repository secrets WLE_GOOGLE_CLIENT_ID and WLE_GOOGLE_CLIENT_SECRET to scripts/gen_cloud_client.py; forks and local builds without them have no built-in client, and users must supply their own in WLE-CLOUD.CNF (Advanced setup). To create a client for your own builds:
- In Google Cloud console create a project (no billing account is required) and enable the Google Drive API.
- Configure the OAuth consent screen as External with only the
https://www.googleapis.com/auth/drive.filescope. - Set the publishing status to In production.
drive.fileis a non-sensitive scope, so no verification review is needed; apps left in Testing work only for listed test users and Google revokes their refresh tokens after 7 days. - Create an OAuth client of type TVs and Limited Input devices, then export
WLE_GOOGLE_CLIENT_IDandWLE_GOOGLE_CLIENT_SECRET(or add them as repository secrets) before runninggen_cloud_client.py.
Google does not treat installed-device client secrets as confidential; keeping them out of git only stops forks from reusing the project's quota by accident. The values are compiled into the ELF. Never commit the generated header or any WLE-CLOUD.TOK. See docs/NATIVE_CLOUD.md.
Claude Code cloud sessions
A SessionStart hook in .claude/settings.json runs .claude/hooks/session-start.sh in Claude Code cloud sessions. It installs the PS2BUILD SDK and LLVM toolchain with the upstream installer, runs ps2build update and fetches LLVM if its compiler config is missing, and exports PATH, LLVM_BIN and PS2BUILD_TOOLCHAIN=llvm, for subsequent build commands. The hook does not use CI's resolver/mirror script; the dependency scripts and generated headers still need the steps on Building from Source. It does nothing outside cloud sessions.
Developer aids
Defining DASH_AUTOTEST in the wLaunchELF target's defines replays a scripted button sequence and seeds a sample library for emulator screenshots, and DASH_THEME_TOUR cycles every theme preset; neither belongs in a release. See docs/dashboard.md. bash scripts/stale_code_audit.sh writes build/stale-code-report.txt with stale markers, disabled blocks and the largest files; CI does not run it.
Attribution discipline
Every external project mentioned in READMEs, site pages and guides must appear in Credits with its role identified. Update the attribution inventory when vendoring modules, incorporating sources or adding external handoff targets. Preserve each original file-level license; a reference is not the same as a redistributed component.