Skip to content

camera_nhx: improve NHX validation portability and robustness#338

Open
smuppand wants to merge 3 commits intoqualcomm-linux:mainfrom
smuppand:camera-yavta
Open

camera_nhx: improve NHX validation portability and robustness#338
smuppand wants to merge 3 commits intoqualcomm-linux:mainfrom
smuppand:camera-yavta

Conversation

@smuppand
Copy link
Contributor

This PR improves the Camera_NHX validation flow by moving reusable logic into shared helpers and making the runner work more reliably across supported Qualcomm targets and image variants.

Why:

  • camera module selection should follow the current board instead of picking an arbitrary camera_*.ko
  • CAMERA_ICP firmware lookup should be generic and not require per-target additions
  • package detection now needs to support both older opkg images and newer dnf/rpm images
  • cam-server lifecycle handling and logging are needed around nhx.sh execution
  • dump validation should use shared file-size handling to avoid false zero-byte failures

Overall, this keeps the NHX runner focused on orchestration while pushing reusable camera and utility logic into common helper layers.

Prefer GNU stat output first, then fall back to BSD stat and wc -c.
This avoids false zero-byte results on target images where the earlier
ordering could return an incorrect numeric value before reaching a safe
fallback.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update camera helpers to better support NHX validation across targets.

Changes include:
- board-aware camera module selection from DT data
- generic CAMERA_ICP firmware discovery under /lib/firmware/qcom
- package detection for both opkg and dnf/rpm based images
- cam-server logging helpers for status and stdout capture
- NHX dump size helper built on shared file size detection

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Rework the Camera_NHX runner to use the updated shared helpers and make
the validation flow more robust.

Changes include:
- use board-aware camera module selection
- use generic CAMERA_ICP firmware lookup
- support rpm/dnf based images through shared package detection
- stop/start cam-server around nhx.sh and capture status/stdout logs
- keep pre-NHX CAMX dmesg checks warn-only
- reuse shared dump size handling during dump validation

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
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