Skip to content

Commit 5f46217

Browse files
authored
Merge pull request #1090 from jremmet/WIP/uuu
labgrid/driver/usbloader: fix uuu command
2 parents 3adfbaf + 3790824 commit 5f46217

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ Implements:
22142214
Arguments:
22152215
- image (str): optional, key in :ref:`images <labgrid-device-config-images>` containing the path
22162216
of an image to bootstrap onto the target
2217-
- cmd (str, default="spl"): single command used for mfgtool
2217+
- script (str): run built-in script with "uuu -b", called with image as arg0
22182218

22192219
USBStorageDriver
22202220
~~~~~~~~~~~~~~~~

labgrid/driver/usbloader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class UUUDriver(Driver, BootstrapProtocol):
153153
}
154154

155155
image = attr.ib(default=None)
156-
cmd = attr.ib(default='spl', validator=attr.validators.instance_of(str))
156+
script = attr.ib(default='', validator=attr.validators.instance_of(str))
157157

158158
def __attrs_post_init__(self):
159159
super().__attrs_post_init__()
@@ -177,8 +177,10 @@ def load(self, filename=None):
177177
mf = ManagedFile(filename, self.loader)
178178
mf.sync_to_resource()
179179

180+
cmd = ['-b', self.script] if self.script else []
181+
180182
processwrapper.check_output(
181-
self.loader.command_prefix + [self.tool, mf.get_remote_path(), self.cmd]
183+
self.loader.command_prefix + [self.tool] + cmd + [mf.get_remote_path()]
182184
)
183185

184186

0 commit comments

Comments
 (0)