/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 — 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> »</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’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">"tftp"</span>
<span class="n">TFTP_DIRECTORY</span><span class="o">=</span><span class="s">"/var/lib/lava/dispatcher/tmp/"</span>
<span class="n">TFTP_ADDRESS</span><span class="o">=</span><span class="s">"0.0.0.0:69"</span>
<span class="n">TFTP_OPTIONS</span><span class="o">=</span><span class="s">"--secure"</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 “kernel.”:</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">'type'</span><span class="p">:</span> <span class="s">'object'</span><span class="p">,</span>
<span class="s">'properties'</span><span class="p">:</span> <span class="p">{</span>
<span class="s">'kernel'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">False</span><span class="p">},</span>
<span class="s">'ramdisk'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
<span class="s">'dtb'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
<span class="s">'rootfs'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
<span class="s">'rootfstype'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
<span class="s">'bootloader'</span><span class="p">:</span> <span class="p">{</span><span class="s">'type'</span><span class="p">:</span> <span class="s">'string'</span><span class="p">,</span> <span class="s">'optional'</span><span class="p">:</span> <span class="bp">True</span><span class="p">,</span> <span class="s">'default'</span><span class="p">:</span> <span class="s">'u_boot'</span><span class="p">},</span>
<span class="p">},</span>
<span class="s">'additionalProperties'</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 "'0x50000000'",
setenv kernel_addr_r "'0x40007000'",
setenv initrd_addr_r "'0x42000000'",
setenv fdt_addr_r "'0x41f00000'",
setenv loadkernel "'tftp ${kernel_addr_r} ${lava_kernel}'",
setenv loadinitrd "'tftp ${initrd_addr_r} ${lava_ramdisk}; setenv initrd_size ${filesize}'",
setenv loadfdt "'tftp ${fdt_addr_r} ${lava_dtb}'",
setenv bootargs "'root=/dev/ram0 console=ttySAC2,115200n8 init --no-log ip=:::::eth0:dhcp'",
setenv bootcmd "'usb start; dhcp; setenv serverip ${lava_server_ip}; run loadkernel; run loadinitrd; run loadfdt; bootm ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r}'",
boot
boot_cmds = mmc rescan,
mmc part 0,
setenv bootcmd "'fatload mmc 0:5 0x40007000 uImage; fatload mmc 0:5 0x42000000 uInitrd; fatload mmc 0:5 0x41f00000 board.dtb; bootm 0x40007000 0x42000000 0x41f00000'",
setenv bootargs "'console=ttySAC2,115200n8 root=LABEL=testrootfs rootwait ro'",
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">"device_type"</span><span class="p">:</span> <span class="s">"arndale"</span><span class="p">,</span>
<span class="s">"actions"</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="s">"command"</span><span class="p">:</span> <span class="s">"deploy_linaro_kernel"</span><span class="p">,</span>
<span class="s">"parameters"</span><span class="p">:</span> <span class="p">{</span>
<span class="s">"kernel"</span><span class="p">:</span> <span class="s">"file:///path/to/my/zImage"</span><span class="p">,</span>
<span class="s">"ramdisk"</span><span class="p">:</span> <span class="s">"file:///path/to/my/uInitrd"</span><span class="p">,</span>
<span class="s">"dtb"</span><span class="p">:</span> <span class="s">"file:///path/to/my/exynos5250-arndale.dtb"</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s">"command"</span><span class="p">:</span> <span class="s">"boot_linaro_image"</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="s">"timeout"</span><span class="p">:</span> <span class="mi">18000</span><span class="p">,</span>
<span class="s">"job_name"</span><span class="p">:</span> <span class="s">"boot-cmds-tftp-kernel"</span>
<span class="p">}</span>
</pre></div>
</div>
<p>When this job runs, the LAVA dispatcher will download the kernel, ramdisk, dtb
to it’s download directory. It will then set the bootloader enviroment
variables on the user’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> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010-2014, Linaro Limited.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>
</html>
|