10
The following debian packages are needed to use LAVA Dispatcher:
12
* cu - for serial port control
13
* conmux - for console management
15
* python-testrepository - for running unit tests
16
* python-sphinx - for building documentation
18
The following python module are needed to use LAVA Dispatcher:
22
A SD/MMC card containing a 'master image'.
24
Creating a SD/MMC card with master image
25
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
You will need to have a card containing a 'master image' for your
28
board. The process of creating a master image is outlined on
29
https://wiki.linaro.org/Platform/Validation/Specs/MasterBootImage.
31
The master image is a stable, default image the system can boot into for deployment and recovery. It's a simple modification of an existing stable image, and does not take long to create. Once you've created one for your board, you may want to consider making a dd image of it for future use. We do not provide dd images for this already. Due to differences in size of SD cards, it's likely that doing so would either waste a lot of space if you have a larger card, or be competely useless if you have a smaller sd card.
33
Setup the image and test partitions
34
-----------------------------------
36
* Start with a stable Linaro image from the current, or previous cycle. For instance, the nano, or headless images make a good starting place. Using linaro-media-create, create an sdcard with this image, and the hardware pack for your board. (minimum 8GB sd card is recommended, but 4GB can work also).
37
* Using parted (or gparted, etc), shrink the root partition so that only 1-1.5GB or so is used (Make sure to leave at least 2G free on the card).
38
* Create an additional primary partition (should normally be partition 3), of about 70MB. Format it as vfat and give it the label testboot.
39
* Create partition 4 as an Extended partition, using the remainder of the space on the card.
40
* Create partition 5 (logical partition) using 2GB. Format it as ext3, and give it the label testrootfs
41
* Finally, create one more logical partition using the remainder of the space. It should be vfat formatted, and have the label sdcard (NB: This is only needed if you want to test android images. If you don't wish to test android, this can be skipped)
43
Prepare the master image
44
------------------------
46
* Boot the image created above on your test board, and attach to the serial console
47
* Ensure that networking is set up so that the default network interface is automatically started. Generally you will want to use dhcp for this. For example, if your network interface is eth0, make sure that /etc/network/interfaces contains something like this::
52
* Edit /etc/hostname and /etc/hosts to change the hostname to "master". This will allow easy detection of which image we are booted into.
53
* Install the following packages:
56
* If you want to test your own build kernel by a deb package(see following example job file for detail), you need to add linaro-media-tools support in master image::
58
# apt-get install bzr python-distutils-extra python-testtools python-parted command-not-found python-yaml python-beautifulsoup python-wxgtk2.6
59
# bzr branch lp:linaro-media-tools
60
# cd linaro-media-tools
63
Setting up serial access
64
^^^^^^^^^^^^^^^^^^^^^^^^
66
To talk to the target test systems, the dispatcher uses a tool called conmux. If you are running Ubuntu 11.04 or later, conmux is in the archives and can be easily installed [TODO: point to ppa for conmux installation -lt 11.04].
68
Configuring cu and conmux
69
-------------------------
71
For LAVA development and testing using only locally attached resources,
72
you should be able to make use of most features, even without the use of
73
special equipment such as a console server.
75
First install conmux and cu::
77
sudo add-apt-repository ppa:linaro-maintainers/tools
79
sudo apt-get install conmux cu
84
You should be able to type commands and interact with the shell inside
85
conmux-console. If you cannot, run "sudo stop conmux" and try running
86
'sg dialout "cu -l ttyUSB0 -s 115200"'. If that doesn't work, you
87
probably need to add some files to /etc/uucp. Add ::
95
to /etc/uucp/port and append ::
106
Connect a development board to a local serial device (e.g. ttyUSB0). You may have permission problem with cu running as root under conmux.
108
Configuration files for conmux are stored under /etc/conmux. It can be configured for either local connections (via serial or usb), or remote configurations such as console servers. Configurations for each board you wish to connect to should be stored in it's own .cf file under /etc/conmux.
110
Create a configuration file for your board under /etc/conmux which
111
should look something like this::
114
application console 'panda01 console' 'cu -l /dev/ttyUSB0 -s 115200'
116
Make sure to give the file a '.cf' extension (e.g. panda01.cf).
118
If you see this permission problem when running cu, you can try
119
adjusting your .cf file to call cu using sg, and the group name owning
120
the device. For example::
122
sg dialout "cu -l ttyUSB0 -s 115200"
124
Finally restart conmux::
129
You can test the connection using::
131
conmux-console panda01
134
Another example config, a remote console server on 10.1.1.1 port 7777 attached to a board we will call beagle01::
137
socket console 'beagle01 console' '10.1.1.1:7777'
139
.. seealso:: If you are using a snowball with serial USB, then you'll need to follow `this guide <https://wiki.linaro.org/Platform/Validation/LAVA/Documentation/GettingSnowballWorking>`_
144
There are several installation options available:
149
For Ubuntu 10.04 onward there is a stable PPA (personal package archive):
151
* ppa:linaro-validation/ppa
153
To add a ppa to an Ubuntu system use the add-apt-repository command::
155
sudo add-apt-repository ppa:linaro-validation/ppa
157
After you add the PPA you need to update your package cache::
161
Finally you can install the package, it is called `lava-dispatcher`::
163
sudo apt-get install lava-dispatcher
169
To install from source you must first obtain a source tarball from bazzar branch or from `Launchpad <https://launchpad.net/lava-dispatcher/+download>`_::
171
bzr branch lp:lava-dispatcher
173
To install the package unpack the tarball and run::
175
sudo python setup.py install