feat(libkernel): support kern.sdk_version in sysctlbyname #2738

Closed
pushkarreddyy wants to merge 2 commits from upstream-pr/2738 into main
pushkarreddyy commented 2026-10-10 12:31:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-10T12:31:16Z.


What

Capy Mobile (PPSA92280) loads with 0 absent imports on Windows on current main (b69270dd) but stops at start-up with:

sysctlbyname_nid_postfix: unsupported name kern.sdk_version

In core/libs/prx/libkernel/System/src/SystemConfiguration.cpp, sysctlbyname previously only handled hw.ncpu and threw for all other names.

This PR adds support for kern.sdk_version:

  • Returns 4-byte uint32_t version 0x01000000 (1.00) matching PS5 baseline launch SDK formatting.
  • Any write attempts (newValue != nullptr) return -1 with errno = 1 (EPERM), matching read-only MIB semantics.
  • Documents the baseline SDK version assumption in docs/dev/TechnicalDebt.md.
  • Expands unit test coverage in core/libs/tests/GuestSystemConfiguration.cpp.

Tested

  • Checked python tools/check_conventions.py --base origin/main (100% passed).
  • Unit tested length queries, value retrieval, truncation errors (ENOMEM), and write rejection (EPERM) in core/libs/tests/GuestSystemConfiguration.cpp.
  • Verifies Capy Mobile call site in src/ps5/platform.c:64-71 (sysctlbyname("kern.sdk_version", &version, &size, NULL, 0)).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4811206676 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2738). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-10T12:31:16Z. --- ### What *Capy Mobile* (`PPSA92280`) loads with 0 absent imports on Windows on current `main` (`b69270dd`) but stops at start-up with: ``` sysctlbyname_nid_postfix: unsupported name kern.sdk_version ``` In `core/libs/prx/libkernel/System/src/SystemConfiguration.cpp`, `sysctlbyname` previously only handled `hw.ncpu` and threw for all other names. This PR adds support for `kern.sdk_version`: - Returns 4-byte `uint32_t` version `0x01000000` (1.00) matching PS5 baseline launch SDK formatting. - Any write attempts (`newValue != nullptr`) return `-1` with `errno = 1` (`EPERM`), matching read-only MIB semantics. - Documents the baseline SDK version assumption in `docs/dev/TechnicalDebt.md`. - Expands unit test coverage in `core/libs/tests/GuestSystemConfiguration.cpp`. ### Tested - Checked `python tools/check_conventions.py --base origin/main` (100% passed). - Unit tested length queries, value retrieval, truncation errors (`ENOMEM`), and write rejection (`EPERM`) in `core/libs/tests/GuestSystemConfiguration.cpp`. - Verifies *Capy Mobile* call site in `src/ps5/platform.c:64-71` (`sysctlbyname("kern.sdk_version", &version, &size, NULL, 0)`). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-10 12:32:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T12:32:39Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097528340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2738#issuecomment-6097528340). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T12:32:39Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!2738
No description provided.