Skip to content

Commit ff3cdfc

Browse files
finikorgjhedberg
authored andcommitted
doc: boards: x86: Add generic net_boot.rst
Add generic documentation for the Network Boot over PXE. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
1 parent 510bbde commit ff3cdfc

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

boards/x86/common/net_boot.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Prepare Linux host
2+
------------------
3+
4+
#. Install DHCP, TFTP servers. For example ``dnsmasq``
5+
6+
.. code-block:: console
7+
8+
$ sudo apt-get install dnsmasq
9+
10+
#. Configure DHCP server. Configuration for ``dnsmasq`` is below:
11+
12+
.. code-block:: console
13+
14+
# Only listen to this interface
15+
interface=eno2
16+
dhcp-range=10.1.1.20,10.1.1.30,12h
17+
18+
#. Configure TFTP server.
19+
20+
.. code-block:: console
21+
22+
# tftp
23+
enable-tftp
24+
tftp-root=/srv/tftp
25+
dhcp-boot=zephyr.efi
26+
27+
``zephyr.efi`` is a Zephyr EFI binary created above.
28+
29+
#. Copy the Zephyr EFI image :file:`zephyr/zephyr.efi` to the
30+
:file:`/srv/tftp` folder.
31+
32+
.. code-block:: console
33+
34+
$ cp zephyr/zephyr.efi /srv/tftp
35+
36+
37+
#. TFTP root should be looking like:
38+
39+
.. code-block:: console
40+
41+
$ tree /srv/tftp
42+
/srv/tftp
43+
└── zephyr.efi
44+
45+
#. Restart ``dnsmasq`` service:
46+
47+
.. code-block:: console
48+
49+
$ sudo systemctl restart dnsmasq.service
50+
51+
Prepare the board for network boot
52+
----------------------------------
53+
54+
#. Enable PXE network from BIOS settings.
55+
56+
#. Make network boot as the first boot option.
57+
58+
Booting the board
59+
-----------------
60+
61+
#. Connect the board to the host system using the serial cable and
62+
configure your host system to watch for serial data. See board's
63+
website for more information.
64+
65+
.. note::
66+
Use a baud rate of 115200.
67+
68+
#. Power on the the board.
69+
70+
#. Verify that the board got an IP address. Run from the Linux host:
71+
72+
.. code-block:: console
73+
74+
$ journalctl -f -u dnsmasq
75+
dnsmasq-dhcp[5386]: DHCPDISCOVER(eno2) 00:07:32:52:25:88
76+
dnsmasq-dhcp[5386]: DHCPOFFER(eno2) 10.1.1.28 00:07:32:52:25:88
77+
dnsmasq-dhcp[5386]: DHCPREQUEST(eno2) 10.1.1.28 00:07:32:52:25:88
78+
dnsmasq-dhcp[5386]: DHCPACK(eno2) 10.1.1.28 00:07:32:52:25:88
79+
80+
#. Verify that network booting is started:
81+
82+
.. code-block:: console
83+
84+
$ journalctl -f -u dnsmasq
85+
dnsmasq-tftp[5386]: sent /srv/tftp/zephyr.efi to 10.1.1.28
86+
87+
#. When the boot process completes, you have finished booting the
88+
Zephyr application image.

0 commit comments

Comments
 (0)