labgrid-project / labgrid

Embedded systems control library for development, testing and installation
https://labgrid.readthedocs.io/
Other
327 stars 164 forks source link

bootstrap without USB #1350

Closed sjg20 closed 4 months ago

sjg20 commented 5 months ago

I would like to bootstrap any device, not just one with a USB bootrom.

For example, for rpi3 (Raspberry Pi) I want to:

After that, cycling power/ reset should boot the new bootloader.

It looks like this might be possible with a new driver that implements the BootstrapProtocol. There is already USBStorageDriver for accessing the filesystem, but it seems that much of the above could be handled automatically, with perhaps an RpiDriver (with BootstrapProtocol) that does the sd-mux and USBStorageDriver.write_files()

It might be necessary to add some yaml info to RpiDriver to tell it which rpi version it is (e.g. 3), but perhaps it can figure out the sdwire and storage itself?

Emantor commented 5 months ago

We usually advice to handle more complicated sequences which are not restricted to one resource via a strategy, these can also be loaded by the labgrid-client via an environment file. See Using a strategy.

sjg20 commented 4 months ago

OK I am trying that and will come back on this

sjg20 commented 4 months ago

This seems to work OK. I need a few other features but will raise issues / discussions for those