Skip to content

[qcom-next] mach-snapdragon: skip serial# env set if already present - #135

Open
balajiselvanathan wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
balajiselvanathan:fix/qcom-serialno-write-once
Open

[qcom-next] mach-snapdragon: skip serial# env set if already present#135
balajiselvanathan wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
balajiselvanathan:fix/qcom-serialno-write-once

Conversation

@balajiselvanathan

Copy link
Copy Markdown

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/

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant