Load the memory card drivers before reading IPCONFIG.DAT on first boot #3

Merged
techwritescode merged 1 commit from load-mc-before-ipconfig into master 2026-09-29 23:38:27 +00:00

On first boot ps2link read IPCONFIG.DAT before loading any IOP module, so open() failed with ENODEV (errno 19) and the default address was used. The first-boot branch of loadModules() (ROM SIO2MAN, MCMAN, MCSERV) exists for this but the reordered start-up no longer reached it.

main() now calls loadModules() before getIpConfig() on first boot. Those loads no longer sleep forever on failure, so a launcher that already loaded the modules cannot hang ps2link; pkoLoadModule is removed as unused.

Tested on hardware from mc0:/ABC with IPCONFIG.DAT next to the ELF (built with ps2build v2026.09.29, packed with the stub from ps2/tools stub-forward-args): configured address used, ping, console output and the host: file tests pass.

🤖 Generated with Claude Code

On first boot ps2link read `IPCONFIG.DAT` before loading any IOP module, so `open()` failed with `ENODEV` (errno 19) and the default address was used. The first-boot branch of `loadModules()` (ROM SIO2MAN, MCMAN, MCSERV) exists for this but the reordered start-up no longer reached it. `main()` now calls `loadModules()` before `getIpConfig()` on first boot. Those loads no longer sleep forever on failure, so a launcher that already loaded the modules cannot hang ps2link; `pkoLoadModule` is removed as unused. Tested on hardware from `mc0:/ABC` with `IPCONFIG.DAT` next to the ELF (built with ps2build v2026.09.29, packed with the stub from ps2/tools stub-forward-args): configured address used, ping, console output and the host: file tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Load the memory card drivers before reading IPCONFIG.DAT on first boot
All checks were successful
Build / build (push) Successful in 15s
Build / build (pull_request) Successful in 17s
9fc638c1e5
The config is read before the IOP reset and before any module loads, so open() of
IPCONFIG.DAT failed with ENODEV and the default address was used. loadModules() already had the
first-boot branch that loads the ROM SIO2MAN/MCMAN/MCSERV; it was no longer reached. Load failures
are ignored so a launcher that already loaded them cannot hang ps2link.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
techwritescode force-pushed load-mc-before-ipconfig from 9fc638c1e5
All checks were successful
Build / build (push) Successful in 15s
Build / build (pull_request) Successful in 17s
to cc430101cd
All checks were successful
Build / build (pull_request) Successful in 15s
Build / build (push) Successful in 16s
2026-09-29 23:38:02 +00:00
Compare
techwritescode deleted branch load-mc-before-ipconfig 2026-09-29 23:38:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ps2/ps2link!3
No description provided.