recipes-core/systemd: reuse the prebuilt ldconfig cache on SOTA deployments - #479
Open
Saksham Singh (saks) (saks-singh) wants to merge 1 commit into
Conversation
SOTA deployments cause ldconfig.service to rescan all libraries during first boot even though OpenEmbedded generated a cache while constructing the root filesystem. This adds about 600-700 ms to startup. Install a service drop-in that invokes a helper to restore the prebuilt cache through a temporary file and atomic rename. Fall back to ldconfig -X when the required cache files are unavailable. Assisted-by: Codex:GPT-5 Signed-off-by: Saksham Singh <saks@qti.qualcomm.com>
| FILES:${PN}:append:qcom-distro:sota = " \ | ||
| ${systemd_system_unitdir}/ldconfig.service.d/10-use-prebuilt-ldconfig-cache.conf \ | ||
| ${libexecdir}/qcom-ldconfig-update \ | ||
| " No newline at end of file |
There was a problem hiding this comment.
missing new line
| do_install:append:qcom-distro:sota() { | ||
| install -Dm 0644 \ | ||
| ${UNPACKDIR}/10-use-prebuilt-ldconfig-cache.conf \ | ||
| ${D}${systemd_system_unitdir}/ldconfig.service.d/10-use-prebuilt-ldconfig-cache.conf |
There was a problem hiding this comment.
if the target 10-use-prebuilt-ldconfig-cache.conf is the same it can be ommited
| ${D}${systemd_system_unitdir}/ldconfig.service.d/10-use-prebuilt-ldconfig-cache.conf | ||
| install -Dm 0755 \ | ||
| ${UNPACKDIR}/qcom-ldconfig-update \ | ||
| ${D}${libexecdir}/qcom-ldconfig-update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
systemd: restore the prebuilt ldconfig cache atomically
Override ldconfig.service for qcom-distro SOTA images to reuse the linker cache generated during rootfs construction instead of scanning all libraries again on first boot, effectively saving 600-700ms running the service.
Copy the cache to a temporary file and atomically rename it into place so concurrently starting processes cannot observe a truncated cache. Fall back to ldconfig -X when either cache is unavailable.
Tested on devices IQ-9075EVK and IQ-8275EVK