Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions Runner/suites/Multimedia/Camera/Camera_NHX/README_Camera_NHX.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,18 @@ Snapshot JSON files are currently expected only for targets where the files are
- `qcom,cam-tpg1031`
- `qcom,camera`
- `fdtdump` scan for camera-related nodes through `lib_camera.sh`
- Camera kernel module detection and loaded-state validation
- Camera kernel module detection and loaded-state validation, including `camera_x1e80100` on Glymur
- ICP firmware presence check (`CAMERA_ICP`)
- `dmesg` scan for camera warnings/errors
- CAMX package presence check
- CAMX package presence check through the available `opkg`, Debian, or RPM package database
- With `--overlay`, an unavailable package inventory is warn-only after the package set was verified successfully
- Sensor presence check is warn-only because NHX may still work depending on target/test config

4. **Runs NHX**
- Resolves `nhx.sh` from `PATH`, then falls back to the packaged CAMX location `/usr/libexec/camx/nhx.sh`.
- Default mode runs `nhx.sh` with no argument, preserving the existing SoC-specific default behavior.
- Optional mode accepts one selected JSON via `--json` and optionally `--target`.
- The selected JSON is staged to the location expected by `/usr/bin/nhx.sh`.
- The selected JSON is staged to the location expected by the selected `nhx.sh` launcher.

5. **Dump validation**
- Collects dump file list from NHX output and/or dump directory based on a marker timestamp.
Expand Down Expand Up @@ -116,17 +118,18 @@ installs the `camera-nhx` package set:
camx-dkms camx-glymur libcamx-glymur1 camx-firmware-glymur camx-nhx
```

To select a FIT DTB, pass its compatibility name with `--fit-dtb`. For CAMX,
the compatibility name is `camx`:
`--overlay` requires the CAMX FIT DTB and uses the compatibility name `camx`.
The same requirement can be stated explicitly with `--fit-dtb camx`:

```sh
./run.sh --overlay --fit-dtb camx
```

The test discovers the platform's `VendorDtbOverlays` EFI variable with
`efivar -l`. The EFI variable GUID is never supplied by the user or hardcoded
in the test. It writes the requested FIT DTB name without a trailing newline,
verifies the value through `efivar -p`, and synchronizes storage.
in the test. It verifies that the payload is `camx` through `efivar -p`. If it
is not selected, the test writes `camx` without a trailing newline, reads the
variable back, and synchronizes storage.

When a new DTB selection is written, the test records `Camera_NHX SKIP` with a
reboot-required message instead of rebooting within the LAVA test shell. Reboot
Expand All @@ -138,9 +141,11 @@ reboot
./run.sh --overlay --fit-dtb camx
```

If the requested FIT DTB is already selected, the test continues directly to
the normal NHX checks. `--overlay` without `--fit-dtb` only performs the
optional package preparation and does not change the boot DTB.
If the CAMX FIT DTB is already selected, the test continues with runtime DT and
camera-module checks. A loaded board-specific camera module is used as runtime
evidence that the current boot has activated the CAMX camera stack. If EFI is
set to `camx` but the module is not loaded, the test records SKIP and asks the
operator to reboot manually. The test never issues a reboot itself.

---

Expand Down Expand Up @@ -233,7 +238,7 @@ In that case, pass `--target`:

## How JSON staging works

`/usr/bin/nhx.sh` does not accept an arbitrary absolute JSON path. It expects a JSON name and internally checks:
The `nhx.sh` launcher does not accept an arbitrary absolute JSON path. It expects a JSON name and internally checks:

```sh
/etc/camera/test/NHX/${JSON_FILE}.json
Expand Down Expand Up @@ -278,11 +283,11 @@ Options:

```text
--overlay Install the optional Camera NHX CAMX package set on Debian,
Ubuntu, or CentOS.
Ubuntu, or CentOS and ensure the CAMX FIT DTB is selected.

--fit-dtb NAME Select NAME as the FIT DTB compatibility name for the next
boot. Requires --overlay on a supported desktop distro.
Use camx to select the CAMX DTB overlay.
Camera_NHX accepts camx, which is the --overlay default.

--json JSON_FILE NHX JSON file to pass to nhx.sh.
Can be absolute, relative to Camera_NHX/, or relative
Expand All @@ -301,7 +306,7 @@ Examples:
```

```sh
./run.sh --overlay --fit-dtb camx
./run.sh --overlay
```

```sh
Expand Down Expand Up @@ -453,9 +458,10 @@ run:

### SKIP

- Missing CAMX prerequisites, such as DT patterns, camera module artifact/loaded state, ICP firmware, CAMX packages, or `nhx.sh`
- The requested FIT DTB selection was written and a reboot is required before validation
- `VendorDtbOverlays` is unavailable when `--overlay --fit-dtb` was requested
- Missing CAMX prerequisites, such as DT patterns, camera module artifact/loaded state, ICP firmware, CAMX packages, or an executable `nhx.sh` in `PATH` or `/usr/libexec/camx`
- The CAMX FIT DTB selection was written and a manual reboot is required before validation
- EFI selects `camx`, but the board-specific camera module is not loaded, so a manual reboot is required
- `VendorDtbOverlays` is unavailable when `--overlay` was requested
- `fdtdump` is not available or camera node evidence is inconclusive
- Requested `--json` file is not found
- Requested JSON filename is ambiguous and `--target` was not supplied
Expand Down
Loading
Loading