~gmdduf/lava-dispatcher/gauss-support

« back to all changes in this revision

Viewing changes to doc/installation.rst

Update l-m-c cmdline options

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. _installation:
 
3
 
 
4
Installation
 
5
============
 
6
 
 
7
Prerequisites
 
8
^^^^^^^^^^^^^
 
9
 
 
10
The following debian packages are needed to use LAVA Dispatcher:
 
11
 
 
12
* cu - for serial port control
 
13
* conmux - for console management
 
14
* python >= 2.6
 
15
* python-testrepository - for running unit tests
 
16
* python-sphinx - for building documentation
 
17
 
 
18
The following python module are needed to use LAVA Dispatcher:
 
19
 
 
20
* pexpect
 
21
 
 
22
A SD/MMC card containing a 'master image'.
 
23
 
 
24
Creating a SD/MMC card with master image
 
25
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
26
 
 
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.
 
30
 
 
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. 
 
32
 
 
33
Setup the image and test partitions
 
34
-----------------------------------
 
35
 
 
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) 
 
42
 
 
43
Prepare the master image
 
44
------------------------
 
45
 
 
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::
 
48
 
 
49
    auto usb0
 
50
    iface usb0 inet dhcp
 
51
 
 
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:
 
54
    * wget
 
55
    * dosfstools
 
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::
 
57
 
 
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
 
61
    # ./setup.py install
 
62
 
 
63
Setting up serial access
 
64
^^^^^^^^^^^^^^^^^^^^^^^^
 
65
 
 
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].
 
67
 
 
68
Configuring cu and conmux
 
69
-------------------------
 
70
 
 
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.
 
74
 
 
75
First install conmux and cu::
 
76
 
 
77
    sudo add-apt-repository ppa:linaro-maintainers/tools
 
78
    sudo apt-get update
 
79
    sudo apt-get install conmux cu
 
80
 
 
81
Configuring cu
 
82
--------------
 
83
 
 
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 ::
 
88
 
 
89
    port ttyUSB0
 
90
    type direct
 
91
    device /dev/ttyUSB0
 
92
    hardflow false
 
93
    speed 115200
 
94
 
 
95
to /etc/uucp/port and append ::
 
96
 
 
97
    system  panda01
 
98
    port    ttyUSB0
 
99
    time    any
 
100
 
 
101
to /etc/uucp/sys.
 
102
 
 
103
Configuring conmux
 
104
------------------
 
105
 
 
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.
 
107
 
 
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. 
 
109
 
 
110
Create a configuration file for your board under /etc/conmux which
 
111
should look something like this::
 
112
 
 
113
    listener panda01
 
114
    application console 'panda01 console' 'cu -l /dev/ttyUSB0 -s 115200'
 
115
 
 
116
Make sure to give the file a '.cf' extension (e.g. panda01.cf).
 
117
 
 
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::
 
121
 
 
122
    sg dialout "cu -l ttyUSB0 -s 115200"
 
123
 
 
124
Finally restart conmux::
 
125
 
 
126
    sudo stop conmux
 
127
    sudo start conmux
 
128
 
 
129
You can test the connection using::
 
130
 
 
131
    conmux-console panda01
 
132
    (use ~$quit to exit)
 
133
 
 
134
Another example config, a remote console server on 10.1.1.1 port 7777 attached to a board we will call beagle01::
 
135
 
 
136
    listener beagle01 
 
137
    socket console 'beagle01 console' '10.1.1.1:7777'
 
138
 
 
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>`_
 
140
 
 
141
Installation Options
 
142
^^^^^^^^^^^^^^^^^^^^
 
143
 
 
144
There are several installation options available:
 
145
 
 
146
Using Ubuntu PPAs
 
147
-----------------
 
148
 
 
149
For Ubuntu 10.04 onward there is a stable PPA (personal package archive):
 
150
 
 
151
* ppa:linaro-validation/ppa
 
152
 
 
153
To add a ppa to an Ubuntu system use the add-apt-repository command::
 
154
 
 
155
    sudo add-apt-repository ppa:linaro-validation/ppa
 
156
 
 
157
After you add the PPA you need to update your package cache::
 
158
 
 
159
    sudo apt-get update
 
160
 
 
161
Finally you can install the package, it is called `lava-dispatcher`::
 
162
 
 
163
    sudo apt-get install lava-dispatcher
 
164
 
 
165
 
 
166
Using source tarball
 
167
--------------------
 
168
 
 
169
To install from source you must first obtain a source tarball from bazzar branch or from `Launchpad <https://launchpad.net/lava-dispatcher/+download>`_::
 
170
 
 
171
    bzr branch lp:lava-dispatcher
 
172
 
 
173
To install the package unpack the tarball and run::
 
174
 
 
175
    sudo python setup.py install
 
176