[qcom-next] mach-snapdragon: skip serial# env set if already present - #135
Open
balajiselvanathan wants to merge 1 commit into
Open
Conversation
serial# is flagged write-once (ENV_FLAGS_VARACCESS_PREVENT_OVERWR), so
any attempt to set it again after it has been loaded from a saved
environment is unconditionally rejected, even when the new value is
identical. qcom_set_serialno() (and the qcom_socinfo_init() it calls)
unconditionally call env_set("serial#", ...) on every boot, which
trips this once the environment has been saved with saveenv:
## Error: Can't overwrite "serial#"
## Error inserting "serial#" variable, errno=1
Skip the whole serial# lookup/set path if the variable is already
present in the environment, matching the pattern used on other
platforms (e.g. arch/arm/mach-rockchip/board.c).
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.
serial# is flagged write-once (ENV_FLAGS_VARACCESS_PREVENT_OVERWR), so any attempt to set it again after it has been loaded from a saved environment is unconditionally rejected, even when the new value is identical. qcom_set_serialno() (and the qcom_socinfo_init() it calls) unconditionally call env_set("serial#", ...) on every boot, which trips this once the environment has been saved with saveenv:
Error: Can't overwrite "serial#"
Error inserting "serial#" variable, errno=1
Skip the whole serial# lookup/set path if the variable is already present in the environment, matching the pattern used on other platforms (e.g. arch/arm/mach-rockchip/board.c).
Upstream link: https://lore.kernel.org/u-boot/20260903-snapdragon-serialno-write-once-v1-1-887c200f7b14@oss.qualcomm.com/