This file is indexed.

/usr/share/doc/lava-server-doc/html/tftp-deploy.html is in lava-server-doc 2014.09.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Deploying a Bootloader Device &mdash; LAVA Server 2014.09.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2014.09.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="top" title="LAVA Server 2014.09.1 documentation" href="index.html" />
    <link rel="next" title="Hooks, Signals and External Measurement" href="external_measurement.html" />
    <link rel="prev" title="Building and manipulating images" href="bootimages.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="external_measurement.html" title="Hooks, Signals and External Measurement"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="bootimages.html" title="Building and manipulating images"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">LAVA Server 2014.09.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="deploying-a-bootloader-device">
<span id="deploy-bootloader"></span><h1>Deploying a Bootloader Device<a class="headerlink" href="#deploying-a-bootloader-device" title="Permalink to this headline"></a></h1>
<p>Adding a Bootloader device allows the LAVA user to directly control the
bootloader on the target, and provide the desired boot sequence. This page
outlines the steps required to add a new Bootloader device to your LAVA
deployment and make it able to accept job requests.</p>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>The Bootloader device extends master image type devices to allow backwards
compatiblity. In the example below, an Arndale target will be used as an
example to show how you can tftp boot a target.</p>
</div>
<div class="section" id="installing-a-tftp-server-on-each-dispatcher">
<h2>Installing a tftp server on each dispatcher<a class="headerlink" href="#installing-a-tftp-server-on-each-dispatcher" title="Permalink to this headline"></a></h2>
<p>Any tftp server will work, if configured correctly. Use this as a guideline.</p>
<p>Install tftpd-hpa package on the dispatcher(s):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># apt-get install tftpd-hpa</span>
</pre></div>
</div>
<p>Install openbsd-inetd package on the dispatcher(s):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># apt-get install openbsd-inetd</span>
</pre></div>
</div>
</div>
<div class="section" id="configuring-the-tftp-server-on-each-dispatcher">
<h2>Configuring the tftp server on each dispatcher<a class="headerlink" href="#configuring-the-tftp-server-on-each-dispatcher" title="Permalink to this headline"></a></h2>
<p>Configure each TFTP server to serve from the dispatcher&#8217;s download directory:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># /etc/default/tftpd-hpa</span>

<span class="n">TFTP_USERNAME</span><span class="o">=</span><span class="s">&quot;tftp&quot;</span>
<span class="n">TFTP_DIRECTORY</span><span class="o">=</span><span class="s">&quot;/var/lib/lava/dispatcher/tmp/&quot;</span>
<span class="n">TFTP_ADDRESS</span><span class="o">=</span><span class="s">&quot;0.0.0.0:69&quot;</span>
<span class="n">TFTP_OPTIONS</span><span class="o">=</span><span class="s">&quot;--secure&quot;</span>
</pre></div>
</div>
<p>Reload the TFTP server:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># stop tftpd-hpa</span>
<span class="c"># start tftpd-hpa</span>
</pre></div>
</div>
</div>
<div class="section" id="configure-the-dispatcher-for-tftp-booting">
<h2>Configure the dispatcher for tftp booting<a class="headerlink" href="#configure-the-dispatcher-for-tftp-booting" title="Permalink to this headline"></a></h2>
<p>Deployment schema:</p>
<p>This schema describes the options for deploy_linaro_kernel. It is important
to notice that only manditory property is &#8220;kernel.&#8221;:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">parameters_schema</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;object&#39;</span><span class="p">,</span>
    <span class="s">&#39;properties&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;kernel&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">False</span><span class="p">},</span>
        <span class="s">&#39;ramdisk&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
        <span class="s">&#39;dtb&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
        <span class="s">&#39;rootfs&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
        <span class="s">&#39;rootfstype&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
        <span class="s">&#39;bootloader&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s">&#39;type&#39;</span><span class="p">:</span> <span class="s">&#39;string&#39;</span><span class="p">,</span> <span class="s">&#39;optional&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">,</span> <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="s">&#39;u_boot&#39;</span><span class="p">},</span>
        <span class="p">},</span>
    <span class="s">&#39;additionalProperties&#39;</span><span class="p">:</span> <span class="bp">False</span><span class="p">,</span>
    <span class="p">}</span>
</pre></div>
</div>
<p>Device configuration example:</p>
<div class="highlight-python"><div class="highlight"><pre># /etc/lava-dispatcher/devices/arndale01.conf

device_type = arndale
hostname = arndale01
hard_reset_command = /usr/local/lab-scripts/pdu1.sh 192.168.1.11 3
power_off_cmd = /usr/local/lab-scripts/pdu1.sh 192.168.1.11 3 0
power_on_cmd = /usr/local/lab-scripts/pdu1.sh 192.168.1.11 3 1
soft_boot_cmd = reboot
bootloader_prompt = ARNDALE5250
interrupt_boot_command = autoboot
interrupt_boot_prompt = autoboot
connection_command = telnet localhost 2000

boot_cmds_tftp =
    setenv autoload no,
    setenv usbethaddr 00:40:5c:26:0a:5b,
    setenv pxefile_addr_r &quot;&#39;0x50000000&#39;&quot;,
    setenv kernel_addr_r &quot;&#39;0x40007000&#39;&quot;,
    setenv initrd_addr_r &quot;&#39;0x42000000&#39;&quot;,
    setenv fdt_addr_r &quot;&#39;0x41f00000&#39;&quot;,
    setenv loadkernel &quot;&#39;tftp ${kernel_addr_r} ${lava_kernel}&#39;&quot;,
    setenv loadinitrd &quot;&#39;tftp ${initrd_addr_r} ${lava_ramdisk}; setenv initrd_size ${filesize}&#39;&quot;,
    setenv loadfdt &quot;&#39;tftp ${fdt_addr_r} ${lava_dtb}&#39;&quot;,
    setenv bootargs &quot;&#39;root=/dev/ram0 console=ttySAC2,115200n8 init --no-log ip=:::::eth0:dhcp&#39;&quot;,
    setenv bootcmd &quot;&#39;usb start; dhcp; setenv serverip ${lava_server_ip}; run loadkernel; run loadinitrd; run loadfdt; bootm ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r}&#39;&quot;,
    boot

boot_cmds = mmc rescan,
    mmc part 0,
    setenv bootcmd &quot;&#39;fatload mmc 0:5 0x40007000 uImage; fatload mmc 0:5 0x42000000 uInitrd; fatload mmc 0:5 0x41f00000 board.dtb; bootm 0x40007000 0x42000000 0x41f00000&#39;&quot;,
    setenv bootargs &quot;&#39;console=ttySAC2,115200n8  root=LABEL=testrootfs rootwait ro&#39;&quot;,
    boot

boot_options =
    boot_cmds

[boot_cmds]
default = boot_cmds
</pre></div>
</div>
<p>Required configuration parameters:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># boot_cmds_tftp - These are the boot commands to TFTP boot the device.</span>
<span class="c"># connection_command - This is the serial connection command.</span>
<span class="c"># bootloader_prompt - This is the bootloader prompt string.</span>
<span class="c"># hard_reset_command - This command will power cycle the device.</span>
<span class="c"># power_off_cmd - This command will turn off power to the device.</span>
</pre></div>
</div>
<p>Job example:</p>
<p>Below shows how to netboot an Arndale device, by supplying a kernel, ramdisk,
and dtb to the LAVA server:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># /tmp/boot-cmds-tftp-kernel.json</span>

<span class="p">{</span>
  <span class="s">&quot;device_type&quot;</span><span class="p">:</span> <span class="s">&quot;arndale&quot;</span><span class="p">,</span>
  <span class="s">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s">&quot;command&quot;</span><span class="p">:</span> <span class="s">&quot;deploy_linaro_kernel&quot;</span><span class="p">,</span>
      <span class="s">&quot;parameters&quot;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&quot;kernel&quot;</span><span class="p">:</span> <span class="s">&quot;file:///path/to/my/zImage&quot;</span><span class="p">,</span>
        <span class="s">&quot;ramdisk&quot;</span><span class="p">:</span> <span class="s">&quot;file:///path/to/my/uInitrd&quot;</span><span class="p">,</span>
        <span class="s">&quot;dtb&quot;</span><span class="p">:</span> <span class="s">&quot;file:///path/to/my/exynos5250-arndale.dtb&quot;</span>
      <span class="p">}</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s">&quot;command&quot;</span><span class="p">:</span> <span class="s">&quot;boot_linaro_image&quot;</span>
    <span class="p">}</span>
  <span class="p">],</span>
  <span class="s">&quot;timeout&quot;</span><span class="p">:</span> <span class="mi">18000</span><span class="p">,</span>
  <span class="s">&quot;job_name&quot;</span><span class="p">:</span> <span class="s">&quot;boot-cmds-tftp-kernel&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>When this job runs, the LAVA dispatcher will download the kernel, ramdisk, dtb
to it&#8217;s download directory. It will then set the bootloader enviroment
variables on the user&#8217;s behalf so that they can be referenced in
boot_cmds_tftp and served to the target over TFTP.</p>
<blockquote>
<div>ARNDALE5250 # lava_server_ip=192.168.1.7
ARNDALE5250 # lava_kernel=images/tmpZXJ0J1/.uImage
ARNDALE5250 # lava_ramdisk=images/tmpZXJ0J1/.uInitrd
ARNDALE5250 # lava_dtb=images/tmpZXJ0J1/exynos5250-arndale.dtb</div></blockquote>
<p>To test, you can execute the dispatcher directly with the following
commands as <tt class="docutils literal"><span class="pre">root</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">lava</span><span class="o">-</span><span class="n">dispatch</span> <span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">boot</span><span class="o">-</span><span class="n">cmds</span><span class="o">-</span><span class="n">tftp</span><span class="o">-</span><span class="n">kernel</span><span class="o">.</span><span class="n">json</span><span class="o">.</span><span class="n">json</span>
</pre></div>
</div>
</div>
<div class="section" id="submitting-a-bootloader-job">
<h2>Submitting a Bootloader Job<a class="headerlink" href="#submitting-a-bootloader-job" title="Permalink to this headline"></a></h2>
<p>The scheduler documentation includes instructions for <a class="reference internal" href="overview.html#job-submission"><em>Job Submission</em></a> to
LAVA. You can use the job file shown above as the basis for your new job.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/linaro.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Deploying a Bootloader Device</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#installing-a-tftp-server-on-each-dispatcher">Installing a tftp server on each dispatcher</a></li>
<li><a class="reference internal" href="#configuring-the-tftp-server-on-each-dispatcher">Configuring the tftp server on each dispatcher</a></li>
<li><a class="reference internal" href="#configure-the-dispatcher-for-tftp-booting">Configure the dispatcher for tftp booting</a></li>
<li><a class="reference internal" href="#submitting-a-bootloader-job">Submitting a Bootloader Job</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="bootimages.html"
                        title="previous chapter">Building and manipulating images</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="external_measurement.html"
                        title="next chapter">Hooks, Signals and External Measurement</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/tftp-deploy.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="external_measurement.html" title="Hooks, Signals and External Measurement"
             >next</a> |</li>
        <li class="right" >
          <a href="bootimages.html" title="Building and manipulating images"
             >previous</a> |</li>
        <li><a href="index.html">LAVA Server 2014.09.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010-2014, Linaro Limited.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>