summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book-enea-linux-user-guide/doc/using_enea_linux.xml')
-rw-r--r--doc/book-enea-linux-user-guide/doc/using_enea_linux.xml228
1 files changed, 129 insertions, 99 deletions
diff --git a/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml b/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml
index a0b7d2c..ea801b2 100644
--- a/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml
+++ b/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml
@@ -21,9 +21,8 @@
21 21
22 <programlisting>$ mkdir enea-linux 22 <programlisting>$ mkdir enea-linux
23$ cd enea-linux 23$ cd enea-linux
24$ export MACHINE=&lt;machine&gt;
25$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \ 24$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \
26 -b refs/tags/Enea_Linux_7.0 -m $MACHINE/default.xml 25 -b refs/tags/Enea_Linux_8.0 -m $MACHINE/default.xml
27$ repo sync</programlisting> 26$ repo sync</programlisting>
28 </step> 27 </step>
29 28
@@ -101,9 +100,8 @@ $ cd &lt;build_dir&gt;/tmp/deploy/images/&lt;target&gt;/ # Here are the build b
101 100
102 <programlisting>$ mkdir enea-linux 101 <programlisting>$ mkdir enea-linux
103$ cd enea-linux 102$ cd enea-linux
104$ export MACHINE=&lt;machine&gt;
105$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \ 103$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \
106 -b refs/tags/Enea_Linux_7.0 -m $MACHINE/default.xml 104 -b refs/tags/Enea_Linux_8.0 -m $MACHINE/default.xml
107$ repo sync</programlisting> 105$ repo sync</programlisting>
108 </step> 106 </step>
109 107
@@ -173,109 +171,142 @@ $ cd &lt;build_dir&gt;/tmp/deploy/sdk/ # Here is the SDK installer script</prog
173 <para>Enea Linux supports multiple booting methods so those will be 171 <para>Enea Linux supports multiple booting methods so those will be
174 described in the following sections.</para> 172 described in the following sections.</para>
175 173
176 <section id="boot_from_arm"> 174 <section id="enea-linux-x86-pxe">
177 <title>Boot from RAM</title> 175 <title>Boot via PXE using DHCP, TFTP, and NFS servers</title>
178 176
179 <para>This example requires that a TFTP server is set up at IP address 177 <para>Below you find an example of how to boot Enea Linux in a target
180 <literal>&lt;tftp_server_ip&gt;</literal>, and that the server stores 178 supporting PXE. The PXE boot is handled by the target BIOS.</para>
181 the Enea Linux image files, kernel image, device tree blob and root
182 filesystem, in <literal>/tftpboot/&lt;download_directory&gt;.</literal>
183 Please refer to <xref linkend="prebuiltprereq" /> for more details on
184 how to install and configure the TFTP server.</para>
185 179
186 <para>Once you have that in place, run the following commands on the 180 <para>This requires the setup of DHCP, TFTP and NFS servers on the host.
187 target:</para> 181 The DHCP server contains a configuration for the target, found via the
188 182 target MAC address, and refers to the TFTP server for the boot image and
189 <programlisting>## set tftp server IP 183 to the NFS server for the root file system.</para>
190U-Boot&gt; setenv serverip &lt;tftp_server_ip&gt;
191
192## tftp the image files on the target machine
193U-Boot&gt; tftpboot 0x01000000 Image
194U-Boot&gt; tftpboot 0x02000000 Image-bcm2837-rpi-3-b.dtb
195U-Boot&gt; tftpboot 0x03000000 enea-image-standard-raspberrypi3-64.ext2.gz.u-boot
196
197## add any other bootargs values if necessary
198U-Boot&gt; setenv bootargs "8250.nr_uarts=1 root=/dev/ram rw ramdisk_size=500000 ip=dhcp \
199console=ttyS0,115200"
200
201## Start boot sequence
202U-Boot&gt; booti 0x01000000 0x03000000 0x02000000</programlisting>
203 </section>
204
205 <section id="boot_from_sd">
206 <title>Boot from SD card</title>
207 184
208 <para>Copy the 185 <para><emphasis role="bold">DHCP server</emphasis>: In addition to
209 <filename>enea-image-standard-raspberrypi3-64.rpi-sdimg</filename> image 186 general DHCPD configuration, the DHCPD configuration should contain an
210 to the SD card using the Linux dd tool or Win32DiskImager in Windows, 187 entry for the target with the following information about the
211 and insert it into the RPi. The Raspberry Pi will not start without a 188 target:</para>
212 properly formatted SD Card, containing the bootloader, kernel image and
213 rootfs.</para>
214
215 <para>Below you can find two methods of how to format an SD Card:</para>
216 189
217 <itemizedlist> 190 <itemizedlist spacing="compact">
218 <listitem> 191 <listitem>
219 <para><emphasis role="bold">Format and copy images to the SD card 192 <para>Host name</para>
220 using the Linux dd command line</emphasis></para> 193 </listitem>
221 194
222 <para>The <command>dd</command> command copies a file, converting 195 <listitem>
223 the format of the data in the process, according to the operands 196 <para>MAC hardware ethernet address (also available in the TFTP
224 specified:</para> 197 configuration)</para>
198 </listitem>
225 199
226 <programlisting>sudo dd bs=4M if=enea-image-standard-sdk-raspberrypi3-64.rpi-sdimg of=/dev/sdg</programlisting> 200 <listitem>
201 <para>IP address, (assuming a fixed IP address is used)</para>
202 </listitem>
227 203
228 <note> 204 <listitem>
229 <para>Use <command>dd</command> cautiously - improper usage or 205 <para>The TFTP server shall be defined as
230 entering the wrong values could inadvertently wipe, destroy, or 206 "<literal>next-server</literal>"</para>
231 overwrite the data on your hard drive.</para>
232 </note>
233 </listitem> 207 </listitem>
234 208
235 <listitem> 209 <listitem>
236 <para><emphasis role="bold">Format the SD card using the 210 <para>The relative path in the TFTP server to the PXE file
237 Win32DiskImager program</emphasis></para> 211 <filename><literal>pxelinux.0</literal></filename></para>
212 </listitem>
238 213
239 <orderedlist> 214 <listitem>
240 <listitem> 215 <para>The NFS server IP address and the path to the rootfs on the
241 <para>Download and unzip <ulink 216 NFS server, defined as "<literal>option root-path</literal>"</para>
242 url="https://sourceforge.net/projects/win32diskimager/">Win32DiskImager</ulink></para> 217 </listitem>
243 </listitem> 218 </itemizedlist>
244 219
245 <listitem> 220 <para>Example of a DHCP server configuration:</para>
246 <para>Run <filename>Win32DiskImager.exe</filename></para> 221
247 </listitem> 222 <programlisting>host intel-corei7-64_host {
223 hardware ethernet 01:00:25:90:c8:c5:98;
224 fixed-address 192.168.1.38;
225 next-server 192.168.2.10;
226 filename "intel-corei7-64_tftp/pxelinux.0";
227 option root-path "192.168.2.20:/export/intel-corei7-64_rootfs";
228}</programlisting>
229
230 <para><emphasis role="bold">TFTP server</emphasis>: The TFTP path to the
231 target's <literal>pxelinux.0</literal> is given in the DHCP
232 configuration. Example of files in the TFTP subdirectory indicated by
233 the DHCP configuration:</para>
234
235 <programlisting>pxelinux.0
236vesamenu.c32
237boot/device01/bzImage (bootable image file)
238pxelinux.cfg/01-00-25-90-c8-c5-98 (Configuration file)</programlisting>
239
240 <para>One configuration file has the same name as the target's MAC
241 address (but with hyphens instead of a colon). This configuration file
242 contains a pointer to the bootable image and also a list of command line
243 arguments to append when the image is started. The same NFS path to the
244 root file system is both in the DHCP and the TFTP configuration.</para>
245
246 <para>Example of a configuration file:</para>
247
248 <programlisting>default vesamenu.c32
249prompt 0
250timeout 100
251
252label device01
253 menu label ^EneaLinuxNFS
254 menu default
255 kernel boot/device01/bzImage
256 <emphasis role="bold">append</emphasis> root=/dev/nfs nfsmount=192.168.2.20:/export/intel-corei7-64_rootfs ip=dhcp
257 console=ttyS0,115200</programlisting>
258
259 <para><emphasis role="bold">NFS server</emphasis>: The NFS server shall
260 contain an unpacked root file system in the path indicated both in the
261 DHCP and in the TFTP configuration.</para>
262
263 <para>After configuring the servers, copy files from the build directory
264 into the correct configured paths:</para>
265
266 <orderedlist spacing="compact">
267 <listitem>
268 <para>Ensure the target is not already running an OS, otherwise the
269 target might attempt to change files on the root file system while
270 it is populated with new files.</para>
271 </listitem>
248 272
249 <listitem> 273 <listitem>
250 <para>Select the drive of your SD card</para> 274 <para>Copy <filename>pxelinux.0</filename> and
251 </listitem> 275 <filename>vesamenu.c32</filename> from the build directory, e.g.
276 from
277 <filename>&lt;build_dir&gt;tmp/work/corei7-64-enea-linux/syslinux/6.03-r0/image/usr/share/syslinux/</filename>.</para>
278 </listitem>
252 279
253 <listitem> 280 <listitem>
254 <para>Select the image 281 <para>Copy <filename>bzImage</filename> from
255 <filename><filename>enea-image-standard-raspberrypi3-64.rpi-sdimg</filename></filename></para> 282 <filename>&lt;build_dir&gt;/tmp/deploy/images/&lt;target&gt;/</filename>.</para>
256 </listitem> 283 </listitem>
257 284
258 <listitem> 285 <listitem>
259 <para>Click "Write" and wait for the write to complete</para> 286 <para>Populate the root file system in the NFS directory by
260 </listitem> 287 unpacking
288 <filename>enea-image-standard-intel-corei7-64.tar.gz</filename>
289 found at
290 <filename>&lt;build_dir&gt;/tmp/deploy/images/&lt;target&gt;/</filename>.</para>
291 </listitem>
292 </orderedlist>
261 293
262 <listitem> 294 <para>Boot the target by:</para>
263 <para>Exit the imager and eject the SD Card</para>
264 </listitem>
265 295
266 <listitem> 296 <orderedlist>
267 <para>Plug the card into your Raspberry Pi</para> 297 <listitem>
268 </listitem> 298 <para>Use the BIOS or boot setup to select PXE boot, if not already
269 </orderedlist> 299 selected.</para>
300 </listitem>
270 301
271 <note> 302 <listitem>
272 <para>Be careful to select the correct drive. If you choose the 303 <para>Reboot the target.</para>
273 wrong one you may destroy your HDD data. If you are using an SD
274 Card slot and can't see the drive in the Win32DiskImager window,
275 try using an affordable external adapter in a USB slot.</para>
276 </note>
277 </listitem> 304 </listitem>
278 </itemizedlist> 305 </orderedlist>
306
307 <para>The boot setup menu is usually launched by pressing F12 or ESC
308 during BIOS power up tests. Look up the manufacturer's documentation for
309 your board model to find the appropriate key.</para>
279 </section> 310 </section>
280 </section> 311 </section>
281 312
@@ -338,8 +369,7 @@ BBLAYERS ?= " \
338 /path/to/poky/meta-el-common \ 369 /path/to/poky/meta-el-common \
339 /path/to/poky/meta-el-standard \ 370 /path/to/poky/meta-el-standard \
340 /path/to/poky/meta-enea-bsp-common \ 371 /path/to/poky/meta-enea-bsp-common \
341 /path/to/poky/meta-enea-bsp-&lt;arch&gt; \ 372 /path/to/poky/meta-enea-bsp-x86 \
342 /path/to/poky/meta-fsl-&lt;arch&gt; \
343 /path/to/poky/meta-openembedded/meta-oe \ 373 /path/to/poky/meta-openembedded/meta-oe \
344 /path/to/poky/meta-openembedded/meta-networking \ 374 /path/to/poky/meta-openembedded/meta-networking \
345 /path/to/poky/meta-openembedded/meta-filesystems \ 375 /path/to/poky/meta-openembedded/meta-filesystems \
@@ -382,8 +412,8 @@ BBLAYERS ?= " \
382 <para>As a result, <filename>BBLAYERS</filename> shall be extended with 412 <para>As a result, <filename>BBLAYERS</filename> shall be extended with
383 the bsp-layer/s layer for your target and any other additional layer/s. 413 the bsp-layer/s layer for your target and any other additional layer/s.
384 For details on how to do this, see the <ulink 414 For details on how to do this, see the <ulink
385 url="http://www.yoctoproject.org/docs/2.3/dev-manual/dev-manual.html#understanding-and-creating-layers">Yocto 415 url="http://www.yoctoproject.org/docs/2.5/dev-manual/dev-manual.html#understanding-and-creating-layers">Yocto
386 2.3 Dev Manual, section "Understanding and Creating Layers"</ulink> . If 416 2.5 Dev Manual, section "Understanding and Creating Layers".</ulink> If
387 needed replace the Yocto version.</para> 417 needed replace the Yocto version.</para>
388 418
389 <para>Layers can be added when you initialize the build environment. The 419 <para>Layers can be added when you initialize the build environment. The
@@ -410,10 +440,10 @@ BBLAYERS ?= " \
410 <title>Adding a Recipe</title> 440 <title>Adding a Recipe</title>
411 441
412 <para>Study the <ulink 442 <para>Study the <ulink
413 url="https://www.yoctoproject.org/docs/2.3/dev-manual/dev-manual.html#new-recipe-single-c-file-package-hello-world"><ulink 443 url="https://www.yoctoproject.org/docs/2.5/dev-manual/dev-manual.html#new-recipe-single-c-file-package-hello-world"><ulink
414 url="https://www.yoctoproject.org/docs/2.3/dev-manual/dev-manual.html#new-recipe-single-c-file-package-hello-world">Hello 444 url="https://www.yoctoproject.org/docs/2.5/dev-manual/dev-manual.html#new-recipe-single-c-file-package-hello-world">Hello
415 World recipe</ulink></ulink> in the Yocto Project Development Manual. If 445 World recipe</ulink></ulink> in the Yocto Project Development Manual. If
416 needed replace the example version (2.3) with the Yocto version in your 446 needed replace the example version (2.5) with the Yocto version in your
417 Enea Linux distribution.</para> 447 Enea Linux distribution.</para>
418 </section> 448 </section>
419 449
@@ -646,7 +676,7 @@ $ ./enea-*-toolchain-&lt;version&gt;.sh</programlisting>
646 676
647 <para>Example:</para> 677 <para>Example:</para>
648 678
649 <programlisting>$ . /opt/enea/environment-setup-aarch64-enea-linux</programlisting> 679 <programlisting>$ . /opt/enea/environment-setup-corei7-64-enea-linux</programlisting>
650 </listitem> 680 </listitem>
651 </orderedlist> 681 </orderedlist>
652 682
@@ -663,8 +693,8 @@ $ ./enea-*-toolchain-&lt;version&gt;.sh</programlisting>
663 image in a consistent way, e.g. to install, upgrade, or delete packages 693 image in a consistent way, e.g. to install, upgrade, or delete packages
664 considering the dependencies. The package management systems supported by 694 considering the dependencies. The package management systems supported by
665 Enea Linux are described in this section. More information about PMS can 695 Enea Linux are described in this section. More information about PMS can
666 be found in the Yocto 2.3 document <ulink 696 be found in the Yocto 2.5 document <ulink
667 url="http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html">Yocto 697 url="http://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html">Yocto
668 Project Mega Manual</ulink>. If needed replace the Yocto version in the 698 Project Mega Manual</ulink>. If needed replace the Yocto version in the
669 link.</para> 699 link.</para>
670 700
@@ -672,7 +702,7 @@ $ ./enea-*-toolchain-&lt;version&gt;.sh</programlisting>
672 <title>APT Package Management (DEB Packages)</title> 702 <title>APT Package Management (DEB Packages)</title>
673 703
674 <para>Enea Linux provides DEB packages on <ulink 704 <para>Enea Linux provides DEB packages on <ulink
675 url="http://linux.enea.com/EneaLinux7.0/">linux.enea.com</ulink> site, 705 url="http://linux.enea.com/EneaLinux8.0/">linux.enea.com</ulink> site,
676 in directory 706 in directory
677 <literal><literal>&lt;release&gt;/&lt;target&gt;/deb</literal>/</literal>.</para> 707 <literal><literal>&lt;release&gt;/&lt;target&gt;/deb</literal>/</literal>.</para>
678 708
@@ -773,4 +803,4 @@ ptest-runner-dev - A C program to run all installed ptests - Development files</
773 </section> 803 </section>
774 </section> 804 </section>
775 </section> 805 </section>
776</chapter> \ No newline at end of file 806</chapter>