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
3 changes: 3 additions & 0 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2616,6 +2616,7 @@ Implements:
RKUSBDriver:
image: 'mybootloaderkey'
usb_loader: 'myloaderkey'
offset: 0x100

images:
mybootloaderkey: 'path/to/mybootloader.img'
Expand All @@ -2626,6 +2627,8 @@ Arguments:
of an image to bootstrap onto the target
- usb_loader (str): optional, key in :ref:`images <labgrid-device-config-images>` containing the path
of a first-stage bootloader image to write
- offset (int): optional, offset (in multiples of 512 bytes) at which the image passed as argument
should be written. If missing, 0x40 is assumed

UUUDriver
~~~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion labgrid/driver/usbloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class RKUSBDriver(Driver, BootstrapProtocol):

image = attr.ib(default=None)
usb_loader = attr.ib(default=None)
offset = attr.ib(default=0x40)

def __attrs_post_init__(self):
super().__attrs_post_init__()
Expand Down Expand Up @@ -140,7 +141,7 @@ def load(self, filename=None):
try:
processwrapper.check_output(
self.loader.command_prefix +
[self.tool, 'wl', '0x40', mf.get_remote_path()],
[self.tool, 'wl', hex(int(self.offset)), mf.get_remote_path()],
print_on_silent_log=True
)
break
Expand Down