.\" Man page generated from reStructuredText. . .TH LABGRID-DEVICE-CONFIG 5 "2017-04-15" "0.3.1" "embedded testing" .SH NAME labgrid-device-config \- labgrid test configuration files . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fB*.yaml\fP .SH DESCRIPTION .sp To integrate a device into a labgrid test, labgrid needs to have a description of the device and how to access it. .sp This manual page is divided into section, each describing one top\-level yaml key. .SH TARGETS .sp The \fBtargets:\fP top key configures a \fBtarget\fP, it\(aqs \fBdrivers\fP and \fBresources\fP\&. .sp The top level key is the name of the target, it needs both a \fBresources\fP and \fBdrivers\fP subkey. The order of instantiated \fBresources\fP and \fBdrivers\fP is important, since they are parsed as an ordered dictionary and may depend on a previous driver. .sp For a list of available resources and drivers refer to \fI\%https://labgrid.readthedocs.io/en/latest/configuration.html\fP\&. .SH OPTIONS .sp The \fBoptions:\fP top key configures various options such as the crossbar_url. .SS OPTIONS KEYS .INDENT 0.0 .TP .B \fBcrossbar_url\fP takes as parameter the URL of the crossbar (coordinator) to connect to. Defaults to \(aqws://127.0.0.1:20408\(aq. .TP .B \fBcrossbar_realm\fP takes as parameter the realm of the crossbar (coordinator) to connect to. Defaults to \(aqrealm1\(aq. .UNINDENT .SH IMAGES .sp The \fBimages:\fP top key provides paths to access preconfigured images to flash onto the board. The image paths can be either relative to the YAML file or absolute. .SS IMAGE KEYS .sp The subkeys consist of image names as keys and their paths as values. The corresponding name can than be used with the appropriate tool found under TOOLS. .SS IMAGE EXAMPLE .sp Two configured images, one for the root filesystem, one for the bootloader: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C images: root: "platform\-v7a/images/root.img" boot: "platform\-v7a/images/barebox.img" .ft P .fi .UNINDENT .UNINDENT .SH TOOLS .sp The \fBtools:\fP top key provides paths to binaries such as fastboot. .SS TOOLS KEYS .INDENT 0.0 .TP .B \fBfastboot\fP Path to the fastboot binary .TP .B \fBmxs\-usb\-loader\fP Path to the mxs\-usb\-loader binary .TP .B \fBimx\-usb\-loader\fP Path to the imx\-usb\-loader binary .UNINDENT .SS TOOLS EXAMPLE .sp Configure the tool path for \fBimx\-usb\-loader\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C tools: imx\-usb\-loader: "/opt/labgrid\-helper/imx\-usb\-loader" .ft P .fi .UNINDENT .UNINDENT .SH IMPORTS .sp The \fBimports\fP key is a list of files or python modules which are imported by the environment after loading the configuration. Paths relative to the configuration file are also supported. This is useful to load drivers and strategy which are contained in your testsuite, since the import is done before instantiating the targets. .SS IMPORTS EXAMPLE .sp Import a local \fImyfunctions.py\fP file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C imports: \- myfunctions.py .ft P .fi .UNINDENT .UNINDENT .SH EXAMPLES .sp A sample configuration with one \fImain\fP target, accessible via SerialPort \fI/dev/ttyUSB0\fP, allowing usage of the ShellDriver: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C targets: main: resources: RawSerialPort: port: "/dev/ttyUSB0" drivers: SerialDriver: {} ShellDriver: prompt: \(aqroot@\ew+:[^ ]+ \(aq login_prompt: \(aq login: \(aq username: \(aqroot\(aq .ft P .fi .UNINDENT .UNINDENT .sp A sample configuration with \fIRemotePlace\fP, using the tools configuration and importing the local \fImystrategy.py\fP file. The \fIMyStrategy\fP strategy is contained in the loaded local python file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C targets: main: resources: RemotePlace: name: test\-place drivers: SerialDriver: {} ShellDriver: prompt: \(aqroot@\ew+:[^ ]+ \(aq login_prompt: \(aq login: \(aq username: \(aqroot\(aq MyStrategy: {} IMXUSBLoader: {} tools: imx\-usb\-loader: "/opt/lg\-tools/imx\-usb\-loader" imports: \- mystrategy.py .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBlabgrid\-client\fP(1), \fBlabgrid\-exporter\fP(1) .SH AUTHOR Rouven Czerwinski Organization: Labgrid-Project .SH COPYRIGHT Copyright (C) 2016-2017 Pengutronix. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. .\" Generated by docutils manpage writer. .