Add local docker-based build support and update documentation #43
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-drakmor/ShadowMountPlus!43
Loading…
Reference in a new issue
No description provided.
Delete branch "PSBrew/docker-build-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds a local docker-based build workflow and aligns documentation with the current build paths.
The problem
Sometimes depevelopers can't easily install the required dependencies in order to use make.
Proposed solution
Adds a
build.shthat fetches all necessary files and builds the correct payloads.Why
What changed
build.sh## Buildingsection inside READMEResult
You can now build locally with:
Additional information
I am working on other pull requests that will be submited soon related to PFS image mount.
If you have a specif way you want me to send the PRs or information, please let me know.
Summary by CodeRabbit
Chores
Documentation
Bug Fixes
📝 Walkthrough
Walkthrough
Adds a Docker-driven build script (build.sh), a "Building from source" README section for direct/Docker/CI builds, .gitignore entries for IDE directories and a local shared-object artifact, and small PFS mount/image-type code adjustments.
Changes
Build System & Documentation
.gitignore.idea/,.vscode/,/src/libkernel_sys_ext.so.README.mdmakeinstructions, Docker-based build steps (includingSMP_FORCE_REBUILD_IMAGE), and CI notes referencing.github/workflows/ps5.yml.build.shbuild.shSMP_FORCE_REBUILD_IMAGE, and builds a cached image that installs build dependencies, creates a build user, clonespacbrew-repo, copies PS5 stubs, and pre-installs SDK/sqlite packages.build.shmake clean allwithPS5_SCE_STUBS_DIR.build.shshadowmountplus.elfwas produced on the host.include/sm_mount_defs.hmkeymodecomment and switches PFS mount macros toDEVPFS_BUDGET_SYSTEMandDEVPFS_MKEYMODE_GD.src/sm_image.cLVD_ATTACH_IMAGE_TYPE_SINGLEfor LVD attach calls.Sequence Diagram
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
docker-build-supportThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
3c7feb30-99c8-4c88-a2c1-691dac273af0📥 Commits
Reviewing files that changed from the base of the PR and between
e0b41b3ca6andcc4d33dd7d.📒 Files selected for processing (3)
.gitignoreREADME.mdbuild.sh@ -6,3 +6,6 @@ notify.txtsrc/notify_icon_asset.c⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
Also ignore the
ps5-sdk/checkout directory.build.shclones the SDK into/workspace/ps5-sdk(repo root) viagit clone ... /workspace/ps5-sdk, but only/pacbrew-repo/is excluded here. After a Docker build,ps5-sdk/will show up as untracked.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Confirmed as addressed by @RenanGBarreto
@ -0,0 +1,136 @@#!/bin/bash⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: drakmor/ShadowMountPlus
Length of output: 900
🏁 Script executed:
Repository: drakmor/ShadowMountPlus
Length of output: 110
🏁 Script executed:
Repository: drakmor/ShadowMountPlus
Length of output: 10032
Fix
build.shDocker path:makepkgruns assmpbuilderbut the cloned/workspace/pacbrew-repois created as rootbuild.shclones/workspace/pacbrew-repoas root, then runsmakepkgundersu - "$BUILDER_USER"(i.e.,smpbuilder) without chowning/workspace/pacbrew-repo, somakepkg’s build directories under/workspace/pacbrew-repo/sdkand/workspace/pacbrew-repo/sqliteare likely non-writable and can break the build. (CI.github/workflows/ps5.ymldoesn’t usebuild.sh; it runsmakepkgdirectly as the runner user.)Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Confirmed as addressed by @RenanGBarreto
@ -0,0 +1,136 @@#!/bin/bashSolved
@ -0,0 +1,136 @@#!/bin/bash@RenanGBarreto, thanks for the fix! Thechownbeforemakepkgensuressmpbuilderhas write access to the cloned directories.(ˆ•ω•ˆ) 🐇
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
@ -6,3 +6,6 @@ notify.txtsrc/notify_icon_asset.cSolved by moving the sdk to be hidden inside the docker image and not n the workspace.
@ -6,3 +6,6 @@ notify.txtsrc/notify_icon_asset.c@RenanGBarreto, that's a cleaner solution — keeping the SDK entirely inside the Docker image avoids polluting the workspace directory and eliminates the need for the.gitignoreentry altogether. Thanks for the update!Actionable comments posted: 2
🧹 Nitpick comments (2)
@ -0,0 +99,4 @@RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gzRUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gzEOF⚠️ Potential issue | 🟠 Major | ⚡ Quick win
SMP_FORCE_REBUILD_IMAGE=1won't actually rebuild the cached layers.When forcing a rebuild you re-run
docker buildwith an identical Dockerfile and the same base image, so Docker reuses the cached layers for thegit cloneandmakepkgsteps. The result is that fresh SDK/SQLite sources are never fetched, which defeats the documented purpose of the flag. Pass--no-cachewhen force-rebuilding.🔧 Proposed fix
🤖 Prompt for AI Agents
✅ Confirmed as addressed by @RenanGBarreto
@ -0,0 +125,4 @@-v "$ROOT_DIR:/workspace" \-w /workspace \"$RUNTIME_IMAGE" \/bin/bash -lc "$BUILD_CMD"⚠️ Potential issue | 🔴 Critical
🧩 Analysis chain
🏁 Script executed:
Repository: drakmor/ShadowMountPlus
Length of output: 1331
🌐 Web query:
Does the ps5-payload-dev/sdk GitHub repo contain a sce_stubs directory in source, or is it generated by make/makepkg?💡 Result:
The sce_stubs directory exists in the ps5-payload-dev/sdk repository, but it is not a pre-populated source directory containing final stub files [1]. Instead, it serves as a workspace where the user generates these stubs [1]. To use it, a user must manually place decrypted.sprx (library) files into the sce_stubs directory [1]. Once the files are in place, the user executes the make command within that directory to generate the necessary stubs [1]. This workflow is explicitly documented in the repository's instructions for adding new SCE libraries [1].
Citations:
Ensure
libkernel_sys.cexists under/opt/ps5-sdk/sce_stubs(matchesPS5_SCE_STUBS_DIR).build.shsetsPS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs", and the Makefile requires$(PS5_SCE_STUBS_DIR)/libkernel_sys.c(it explicitlytest -fs it). The upstreamps5-payload-dev/sdksce_stubs/directory is a workspace that needs stub generation/population, so the plain clone may not containlibkernel_sys.c. Add a stubs-population/generation step in the image build (or at least a fail-fast check liketest -f /opt/ps5-sdk/sce_stubs/libkernel_sys.c) before runningmake clean all.🤖 Prompt for AI Agents
✅ Addressed in commit
912c682I've made a new commit to address the bot's suggestions.
In addition, I added an image caching feature that makes local rebuilds much faster after the first run. Subsequent builds now take only about 7 seconds.
I believe this feature is ready to be merged, so I’ll move on to the next one.
@ -0,0 +99,4 @@RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gzRUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gzEOFFixed
@ -0,0 +99,4 @@RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gzRUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gzEOF@RenanGBarreto, thanks for the fix! The--no-cacheflag will now ensure fresh SDK/SQLite sources are fetched whenSMP_FORCE_REBUILD_IMAGE=1is set. 🐇If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
30076350-32c4-4007-8df1-544a508621c6📥 Commits
Reviewing files that changed from the base of the PR and between
912c6825e9and 4ec1392edfa27dbe660ee0082eb749f81868dad6.📒 Files selected for processing (4)
README.mdbuild.shinclude/sm_mount_defs.hsrc/sm_image.c✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⚠️ Potential issue | 🟠 Major | ⚡ Quick win
Documentation inconsistency: comment claims "AC" but code uses "GD".
The comment on line 61 documents the default mkeymode as
"AC", but line 72 definesPFS_MOUNT_MKEYMODEasDEVPFS_MKEYMODE_GD(which resolves to"GD"per line 69). These are distinct master key modes.📝 Proposed fix to align documentation with code
If "AC" was the intended mode, then line 72 should be changed instead:
📝 Committable suggestion
🤖 Prompt for AI Agents
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.