Skip to content

Conversation

@pamaury
Copy link
Contributor

@pamaury pamaury commented Jan 9, 2026

Backport #26647. Depends on #29019, #29036, #29048 and #29067.
Also includes fixes from d8b2486 (zerocopy update) and 8d1c28f#diff-2e97cb98a06ad8b16fca42f8dcca9fc0edcc294e359f5798e757324a7f1589e5 (deprecate cli for reset delay)

@pamaury pamaury requested review from a team and cfrantz as code owners January 9, 2026 13:57
@pamaury pamaury requested review from jwnrt and moidx and removed request for a team January 9, 2026 13:57
@pamaury pamaury force-pushed the backport_26647 branch 4 times, most recently from e5fb9ed to 57924e9 Compare January 12, 2026 12:49
pamaury and others added 8 commits January 12, 2026 14:31
Without this provider, rules using binaries will default to
DefaultInfo which causes errors if there is more than one execution
environment.

Signed-off-by: Amaury Pouly <[email protected]>
Rescue mode should not automatically reboot the chip after processing a
data transfer.  Instead, the chip should wait for a subsequent command
or a reboot request via the `REBO` command.

This mode of operation is more aligned with how alternate rescue
protocols (like USB-DFU) work.  Making this behavior consistent among
the supported protocols allows for easier test automation and
configuration flows.

Addresses: lowRISC#26481

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 9264a7f)
Implement the DFU state machine and control endpoint to manage
transfer of data in and out of the chip.

USB AltSettings are used to permit the rescue protocol to communicate
with different ROM_EXT services (e.g. boot-log, boot-services,
device-id, etc).

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 1343e45)
`rusb` 0.9.4 no longer needs `mut` for certain operations.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 1d6201b)
1. Enhance the `UsbBackend` to allow for timeout-based detection of USB
   devices.
2. Give the `RescueParams` struct the ability to set SW_STRAP or
   GPIO-based triggers.
3. Define DFU constants and a `DfuOperations` trait to represent the
   basic DFU operations.
4. Create a UsbDfu rescue struct that implements the `Rescue` trait
   using `DfuOperations`.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit b17c4f0)
1. Create a rescue configuration in the `test_owner` configuration.  The
   protocol and triggering information can be controlled through
   preprocessor directives.
2. Re-arrange the ROM_EXT deps such that the rescue implementation is a
   link-time decision.  Add a usb-dfu ROM_EXT for testing.
3. Re-arrange the rescue e2e tests to test both xmodem and DFU based
   rescue.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit e53a35a)
Temporarily mark the rescue `usbdfu` tests as broken.

In CI, the tests are unable to find the USB device.  I'm marking these
tests as broken until I can debug what is going wrong in CI.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 0955ac6)
The CI issue causing this is now fixed.

Signed-off-by: Gary Guo <[email protected]>
(cherry picked from commit d514518)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants