Skip to content

Commit 3527f96

Browse files
committed
[ci] remove udev workarounds
Containers in our CI infrastructure can now observe udev events properly, therefore the workarounds around stale USB devices can be removed. Signed-off-by: Gary Guo <gary.guo@lowrisc.org>
1 parent 799af4a commit 3527f96

File tree

2 files changed

+4
-38
lines changed

2 files changed

+4
-38
lines changed

.github/workflows/fpga.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,12 @@ jobs:
5252
with:
5353
job-patterns: ${{ inputs.bitstream }}
5454

55-
# We run the update command twice to workaround an issue with udev on the container,
56-
# where rusb cannot dynamically update its device list in CI (udev is not completely
57-
# functional). If the device is in normal mode, the first thing that opentitantool
58-
# does is to switch it to DFU mode and wait until it reconnects. This reconnection is
59-
# never detected. But if we run the tool another time, the device list is queried again
60-
# and opentitantool can finish the update. The device will now reboot in normal mode
61-
# and work for the hyperdebug job.
6255
- name: Update hyperdebug firmware
6356
if: inputs.interface == 'hyper310'
6457
run: |
6558
./bazelisk.sh run \
6659
//sw/host/opentitantool:opentitantool -- \
67-
--interface=hyperdebug_dfu transport update-firmware \
68-
|| ./bazelisk.sh run \
69-
//sw/host/opentitantool:opentitantool -- \
70-
--interface=hyperdebug_dfu transport update-firmware || true
60+
--interface=hyperdebug_dfu transport update-firmware
7161
7262
- name: Execute tests
7363
run: |

.github/workflows/nightly.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,8 @@ jobs:
4141
service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}'
4242

4343
- name: Update hyperdebug
44-
# We run the update command twice to workaround an issue with udev on the container.
45-
# Where rusb cannot dynamically update its device list in CI (udev is not completely
46-
# functional). If the device is in normal mode, the first thing that opentitantool
47-
# does is to switch it to DFU mode and wait until it reconnects. This reconnection is
48-
# never detected. But if we run the tool another time, the device list is queried again
49-
# and opentitantool can finish the update. The device will now reboot in normal mode
50-
# and work for the hyperdebug job.
5144
run: |
52-
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware \
53-
|| ./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
45+
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
5446
5547
- name: Run tests after ROM boot stage
5648
if: success() || failure()
@@ -116,16 +108,8 @@ jobs:
116108
service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}'
117109

118110
- name: Update hyperdebug
119-
# We run the update command twice to workaround an issue with udev on the container.
120-
# Where rusb cannot dynamically update its device list in CI (udev is not completely
121-
# functional). If the device is in normal mode, the first thing that opentitantool
122-
# does is to switch it to DFU mode and wait until it reconnects. This reconnection is
123-
# never detected. But if we run the tool another time, the device list is queried again
124-
# and opentitantool can finish the update. The device will now reboot in normal mode
125-
# and work for the hyperdebug job.
126111
run: |
127-
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware \
128-
|| ./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
112+
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
129113
130114
- name: Run tests after ROM boot stage
131115
if: success() || failure()
@@ -191,16 +175,8 @@ jobs:
191175
service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}'
192176

193177
- name: Update hyperdebug
194-
# We run the update command twice to workaround an issue with udev on the container.
195-
# Where rusb cannot dynamically update its device list in CI (udev is not completely
196-
# functional). If the device is in normal mode, the first thing that opentitantool
197-
# does is to switch it to DFU mode and wait until it reconnects. This reconnection is
198-
# never detected. But if we run the tool another time, the device list is queried again
199-
# and opentitantool can finish the update. The device will now reboot in normal mode
200-
# and work for the hyperdebug job.
201178
run: |
202-
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware \
203-
|| ./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
179+
./bazelisk.sh run //sw/host/opentitantool -- --interface=hyperdebug_dfu transport update-firmware
204180
205181
- name: Run tests
206182
if: success() || failure()

0 commit comments

Comments
 (0)