support OpenOCD bootstrap without environment - #1
Conversation
So far, `NetworkService.username` was required and `SSHDriver` always passed it to `ssh` and `scp`. This prevented setups where the SSH username is intentionally resolved through the user's SSH configuration or by the default SSH user selection. This change makes `NetworkService.username` optional and updates `SSHDriver` to only pass `-l <username>` or `user@host` when a username is explicitly set. In addition, the client-side fallback `NetworkService` creation path no longer forces `username="root"` and now instantiates the resource with `name=None`, so ad-hoc SSH access can use the normal SSH configuration of the user. This improves compatibility with existing SSH setups and avoids hardcoding a username when it is not actually required. Add regression tests covering the no-username path in SSHDriver and the client-side fallback NetworkService creation. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Clarify that `NetworkService.username` is optional. If no username is configured on `NetworkService` or `SSHDriver`, labgrid lets SSH resolve the username through the local SSH configuration or the default SSH user selection. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add local and remote resources for FTDI data-bus GPIO lines exposed through asynchronous bit-bang mode. The resource models one output-capable bit on a selected FTDI interface and exports the USB identity, interface, index, and inversion metadata needed by the driver. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add FTDIGPIODriver and a labgrid agent for FTDI asynchronous bit-bang GPIO outputs. The agent opens the selected USB interface per operation, sets async bit-bang mode with the data bus configured as output, reads the current pin byte, and writes back only the requested bit change. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Allow labgrid-client io to create an FTDIGPIODriver for acquired NetworkFTDIGPIO resources. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Cover FTDI GPIO resource validation, supported USB IDs, driver set/get behavior, agent read-modify-write output handling, exporter parameters, and labgrid-client io integration. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Document FTDIGPIO and NetworkFTDIGPIO resources for FTDI asynchronous bit-bang data-bus outputs. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add power backend for the Minuteman RPM1521 series of power switches(2,4,8 ports). Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
Add a dedicated DigitalInputProtocol for drivers which can read a digital signal without also exposing writes. Keep DigitalOutputProtocol as a specialization of the input protocol, matching existing output drivers which already implement get(). Co-developed-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add GpioDigitalInputDriver for sysfs GPIO resources. Extend the sysfsgpio agent to configure lines for input reads while keeping output as the default path for existing users. Reconfigure cached GPIO lines before reuse so switching between input and output access leaves the sysfs direction in the state requested by the active driver. Co-developed-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Resolve labgrid-client io get via DigitalInputProtocol when a matching driver is configured. This allows input-only drivers to use the existing io command. Keep the existing NetworkSysfsGPIO fallback on GpioDigitalOutputDriver so resource-only configurations continue to behave as before. Co-developed-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Document GpioDigitalInputDriver and add coverage for sysfsgpio input direction handling, cached direction reconfiguration, input driver reads, protocol compatibility, and labgrid-client io get routing. Co-developed-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com> Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add unit tests for OpenOCD bootstrap argument parsing and the NetworkUSBDebugger fallback path in the client. Keep these tests separate from the OpenOCD integration tests so they do not depend on the openocd binary being installed. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
The bootstrap fallback path was too narrow for OpenOCD-based setups without a local environment. So far, `labgrid-client bootstrap` only auto-created `OpenOCDDriver` for `NetworkAlteraUSBBlaster`. If a place exposed only `NetworkUSBDebugger`, the client failed with "target has no compatible resource available" even though `OpenOCDDriver` can bind to that resource type. In addition, the existing `bootstrap_args` path only handled raw `key=value` strings. This was not sufficient for `OpenOCDDriver` arguments such as `load_commands`, `search`, or `config`, which often need structured values like lists. Extend the bootstrap fallback to `NetworkUSBDebugger` and parse bootstrap driver arguments as YAML values. This allows CLI-only OpenOCD bootstrap flows to pass structured driver arguments without requiring a local environment file. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
LLM reviewThis series extends run: 31177809422
|
b3f66b7 to
61b5254
Compare
The bootstrap fallback path was too narrow for OpenOCD-based setupswithout a local environment.
So far,
labgrid-client bootstraponly auto-createdOpenOCDDriverforNetworkAlteraUSBBlaster. If a place exposed onlyNetworkUSBDebugger, the client failed with "target has no compatible resource available" even thoughOpenOCDDrivercan bind to that resource type.In addition, the existing
bootstrap_argspath only handled raw 'key=valuestrings. This was not sufficient forOpenOCDDriverarguments such asload_commands,search, orconfig`, which often need structured values like lists.Extend the bootstrap fallback to
NetworkUSBDebuggerand parse bootstrap driver arguments as YAML values. This allows CLI-only OpenOCD bootstrap flows to pass structured driver arguments without requiring a local environment file.