Skip to content

Conversation

benjamin1313
Copy link
Contributor

This adds a driver and resource that can be used to take a raspberry pi put into usbboot mode and boot it as a mass storage device.
This is helpful when working with hardware based around raspberry pi compute modules, which might use a ssd or emmc for storage instead of a sd-card.

Currently being use to bootstrap a 10' chipsee panel before running automated tests.
The script used for this has been added to examples.

For this implementation it was chosen to keep it simple and not add support for using a serial number to chose between multiple devices because when adding the -i argument to the rpiboot like so rpiboot -i [serialno] i experienced that rpiboot would sit and wait for a raspberry pi to connect instead of using the one already connected. Which then leave me in a situation where labgrid is stuck executing the rpiboot command, waiting for the pi to be rebooted but not being able to do so because labgrid is stuck in the rpiboot command.

Checklist

  • Documentation for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • PR has been tested

@benjamin1313 benjamin1313 force-pushed the rpiboot-support branch 2 times, most recently from d60f357 to 352740d Compare September 16, 2025 07:49
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 52.83019% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.4%. Comparing base (e9e43aa) to head (1ac9a8c).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/rpibootdriver.py 66.6% 8 Missing ⚠️
labgrid/resource/udev.py 42.8% 8 Missing ⚠️
labgrid/remote/exporter.py 0.0% 7 Missing ⚠️
labgrid/resource/remote.py 71.4% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1734   +/-   ##
======================================
  Coverage    45.4%   45.4%           
======================================
  Files         172     173    +1     
  Lines       13500   13553   +53     
======================================
+ Hits         6130    6158   +28     
- Misses       7370    7395   +25     
Flag Coverage Δ
3.10 45.4% <52.8%> (+<0.1%) ⬆️
3.11 45.4% <52.8%> (+<0.1%) ⬆️
3.12 45.4% <52.8%> (+<0.1%) ⬆️
3.13 45.4% <52.8%> (+<0.1%) ⬆️
3.9 45.4% <52.8%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Allow for using the rpiboot tool to start up a raspberry pi cm 4 or 5
as a MassStorageDevice so that a USBStorageDriver can be used to bootstrap
a raspberry pi cm 4 or 5.

https://github.com/raspberrypi/usbboot
Signed-off-by: Benjamin B. Frost <[email protected]>
Signed-off-by: Benjamin B. Frost <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant