Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
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
4 changes: 2 additions & 2 deletions packages/jumpstarter-driver-ridesx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Both drivers require:

```{testcode}
# Flash a single partition
ridesx_client.flash("/path/to/boot.img", partition="boot")
ridesx_client.flash("/path/to/boot.img", target="boot")
```

### Flash Multiple Partitions
Expand All @@ -125,7 +125,7 @@ The driver automatically handles compressed images (`.gz`, `.gzip`, `.xz`):

```{testcode}
# Flash compressed images - decompression is automatic
ridesx_client.flash("/path/to/boot.img.gz", partition="boot")
ridesx_client.flash("/path/to/boot.img.gz", target="boot")
```

### Power Control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,22 @@ def flash(
self,
path: str | Dict[str, str],
*,
partition: str | None = None,
target: str | None = None,
operator: Operator | Dict[str, Operator] | None = None,
compression=None,
):
if isinstance(path, dict):
partitions = path
operators = operator if isinstance(operator, dict) else None
else:
if partition is None:
raise ValueError("'partition' must be provided")
partitions = {partition: path}
operators = {partition: operator} if isinstance(operator, Operator) else None
if target is None:
raise ValueError(
"This driver requires a target partition.\n"
"Usage: j storage flash --target <partition>:<file>\n"
"Example: j storage flash -t boot_a:aboot.img -t system_a:rootfs.simg -t system_b:qm_var.simg"
)
partitions = {target: path}
operators = {target: operator} if isinstance(operator, Operator) else None

for partition_name, file_path in partitions.items():
if not file_path or not file_path.strip():
Expand Down
Loading