Support extra files in UUUDriver, and pass usb device path
Teach the UUUDriver to syncrhonize extra files to the exporter before invoking uuu. This is useful the the "image" passed to uuu is a script file that references such extra files. In our case, we load the u-boot image twice (first SPL, then U-Boot proper). After U-Boot starts, we load a fitimage using uuu's fastboot support.
While working with UUUDriver, we might as well tell it what USB device path to operate, so we can attach multiple targets to a single exporter. Also, avoid messing up the pytest output by add -v to the uuu command.
This is tested using with and without a coordinator.
Checklist
- [ ] Documentation for the feature
- [ ] Tests for the feature
- [x] The arguments and description in doc/configuration.rst have been updated
- [ ] Add a section on how to use the feature to doc/usage.rst
- [ ] Add a section on how to use the feature to doc/development.rst
- [x] PR has been tested
- [ ] Man pages have been regenerated
Hmm... I see now that two of my commits duplicate this (not so much) older PR: https://github.com/labgrid-project/labgrid/pull/1587
I'm happy to rebase mine, should you merge the other one.
We run into the same issue using snagrecover. Here we need multiple files with descripting names. This doesn't fit into the BootstrapProtocol.
Maybe we can add multi file support there? We would prefer a dict as input to be able to use the key as name of the file to be used in snagrecover
We run into the same issue using
snagrecover. Here we need multiple files with descripting names. This doesn't fit into theBootstrapProtocol. Maybe we can add multi file support there? We would prefer a dict as input to be able to use the key as name of the file to be used insnagrecover
Hmm.. As far as I can tell, protocols cannot specify functionality like that.
Instead, we can add a ManagedFiles util, that can synchronize multiple files to a single folder. That util can then take either a simple list of sources to transfer, or a dictionary of src: dst pairs to transfer instead?
It think the interface load with a single files as parameter is not sufficient for this use cases.
Also in your case, you can only use the extra_files from the config. You can't call load with the extra files as parameter.
Not sure if others see the need of this too.
It think the interface
loadwith a single files as parameter is not sufficient for this use cases. Also in your case, you can only use theextra_filesfrom the config. You can't callloadwith the extra files as parameter. Not sure if others see the need of this too.
I see. Yeah, we can expand the load() method in the protocol to take an optional dictionay of extra files as you suggest. That parameter can then take precedence over any configured extra files...
But we need the labgrid maintainers to weigh in here...
It would be nice if the load() method was expanded. That way i could easily expand or make my own driver to use a bmap file together with a wic file for proper sparse flashing.