Skip to content

Conversation

@amrianan
Copy link
Contributor

@amrianan amrianan commented Dec 2, 2025

For each configuration subnode in qcom-fitimage.its:

  • read its "compatible" property
  • strip "qcom," prefix
  • split the remaining string on "-"
  • verify that each resulting substring exists as a subnode name in qcom-metadata.dts

Output:

  • If everything passes: "success"
  • If any missing: one line per miss: fail <config_subnode_name>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add usage of the script in comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

set -euo pipefail

ITS_FILE="qcom-fitimage.its"
META_FILE="qcom-metadata.dts"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we take the file path from user? If not provided, then fallback to these?

@amrianan
Copy link
Contributor Author

Analysis:

  1. We would have used fdtget, fdtdump commandl-ine utilities instead of awk: but cannot use as these utilities need compiled dtb to run over. Since metadata exists in dts form and its need all required dtbs to get compiled into dtb format. Hence this would be not possible from build infra side to check for IDs.
  2. with "fdtget", we could have searched soc , board etc in respective subnodes only but for this also, there would need to maintain a table where we will mark that qcm6490 is a soc. with "awk": we are seaching a particular substring in entire metadata, where ever it is found. Not in specific subnodes as soc, board etc.

next
}

in_configs && /^\}/ {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking only "}" for end of the node might be causing issues if the "}" is not properly added in new line?
Can we check number of braces instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out. Added support for syntax check for qcom-metadata.dtb before starting string comparison.

Usage:
  - for any config entry added to .its, the substrings used as part of each compatibles are checked if those are part of metadata or not.
  - metadata syntax vallidation using dtc tool.

For each configuration subnode in qcom-fitimage.its:
   - read its "compatible" property
   - strip "qcom," prefix
   - split the remaining string on "-"
   - verify that each resulting substring exists as a subnode name
     in qcom-metadata.dts

 Output:
   - If everything passes: "success"
   - If any missing: one line per miss:
         fail <substring> <config_subnode_name>

Signed-off-by: Amrit Anand <amrianan@qti.qualcomm.com>
@NainaMehtaQUIC
Copy link

The syntax for FIT ITS image is not being checked with the current version, otherwise LGTM.

Copy link
Collaborator

@quic-kaushalk quic-kaushalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes look fine. Naina, as discussed regarding syntax for FIT ITS image not being checked with the current version, we can keep track of it via a github issue in this project.

@quic-kaushalk quic-kaushalk merged commit 3319596 into qualcomm-linux:main Dec 26, 2025
5 of 6 checks passed
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.

3 participants