Part 1
요약·해설
dnsmasq로 DHCP·TFTP를 제공하고 board가 zephyr.efi를 PXE로 받게 합니다.
Services
DHCP · TFTP
Server
dnsmasq
Image
/srv/tftp/zephyr.efi
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
원문 SHA-256
BA8380268EE489CF8E7793FE90F5B5551BB6F424C3FD7A3281F844A54F9B75C1
:orphan:
.. start_include_here
Prepare Linux host
------------------
#. Install DHCP, TFTP servers. For example ``dnsmasq``
.. code-block:: console
$ sudo apt-get install dnsmasq
#. Configure DHCP server. Configuration for ``dnsmasq`` is below:
.. code-block:: console
# Only listen to this interface
interface=eno2
dhcp-range=10.1.1.20,10.1.1.30,12h
#. Configure TFTP server.
.. code-block:: console
# tftp
enable-tftp
tftp-root=/srv/tftp
dhcp-boot=zephyr.efi
``zephyr.efi`` is a Zephyr EFI binary created above.
#. Copy the Zephyr EFI image :file:`zephyr/zephyr.efi` to the
:file:`/srv/tftp` folder.
.. code-block:: console
$ cp zephyr/zephyr.efi /srv/tftp
#. TFTP root should be looking like:
.. code-block:: console
$ tree /srv/tftp
/srv/tftp
└── zephyr.efi
#. Restart ``dnsmasq`` service:
.. code-block:: console
$ sudo systemctl restart dnsmasq.service
Prepare the board for network boot
----------------------------------
#. Enable PXE network from BIOS settings.
#. Make network boot as the first boot option.
Booting the board
-----------------
#. Connect the board to the host system using the serial cable and
configure your host system to watch for serial data. See board's
website for more information.
.. note::
Use a baud rate of 115200.
#. Power on the board.
#. Verify that the board got an IP address. Run from the Linux host:
.. code-block:: console
$ journalctl -f -u dnsmasq
dnsmasq-dhcp[5386]: DHCPDISCOVER(eno2) 00:07:32:52:25:88
dnsmasq-dhcp[5386]: DHCPOFFER(eno2) 10.1.1.28 00:07:32:52:25:88
dnsmasq-dhcp[5386]: DHCPREQUEST(eno2) 10.1.1.28 00:07:32:52:25:88
dnsmasq-dhcp[5386]: DHCPACK(eno2) 10.1.1.28 00:07:32:52:25:88
#. Verify that network booting is started:
.. code-block:: console
$ journalctl -f -u dnsmasq
dnsmasq-tftp[5386]: sent /srv/tftp/zephyr.efi to 10.1.1.28
#. When the boot process completes, you have finished booting the
Zephyr application image.
Part 3
한국어 전문 번역
Linux host 준비
- DHCP와 TFTP server를 설치합니다. 다음 예는
dnsmasq를 사용합니다.$ sudo apt-get install dnsmasq - DHCP server를 구성합니다. 다음
dnsmasq설정은eno2interface만 listen하고 10.1.1.20~10.1.1.30 address를 12시간 lease로 제공합니다.# Only listen to this interface interface=eno2 dhcp-range=10.1.1.20,10.1.1.30,12h - TFTP server를 구성합니다. 앞서 만든 Zephyr EFI binary
zephyr.efi를 boot file로 지정합니다.# tftp enable-tftp tftp-root=/srv/tftp dhcp-boot=zephyr.efi - Zephyr EFI image
zephyr/zephyr.efi를/srv/tftpdirectory에 복사합니다.$ cp zephyr/zephyr.efi /srv/tftp - TFTP root가 다음과 같은지 확인합니다.
$ tree /srv/tftp /srv/tftp └── zephyr.efi dnsmasqservice를 restart합니다.$ sudo systemctl restart dnsmasq.service
Network boot용 board 준비
- BIOS setting에서 PXE network를 활성화합니다.
- Network boot를 첫 번째 boot option으로 설정합니다.
Board boot
- Serial cable로 board와 host를 연결하고 serial data를 볼 수 있게 host를 설정합니다. Baud rate는
115200입니다. - Board 전원을 켭니다.
- Linux host에서 board가 IP address를 받았는지 확인합니다.
$ journalctl -f -u dnsmasq dnsmasq-dhcp[5386]: DHCPDISCOVER(eno2) 00:07:32:52:25:88 dnsmasq-dhcp[5386]: DHCPOFFER(eno2) 10.1.1.28 00:07:32:52:25:88 dnsmasq-dhcp[5386]: DHCPREQUEST(eno2) 10.1.1.28 00:07:32:52:25:88 dnsmasq-dhcp[5386]: DHCPACK(eno2) 10.1.1.28 00:07:32:52:25:88 - Network boot가 시작됐는지 확인합니다.
$ journalctl -f -u dnsmasq dnsmasq-tftp[5386]: sent /srv/tftp/zephyr.efi to 10.1.1.28 - Boot process가 끝나면 Zephyr application image의 boot가 완료됩니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.