.. include:: /keyword.rst
===========
|G1200-EVK|
===========
.. contents:: Sections
:local:
:depth: 1
.. toctree::
:hidden:
:maxdepth: 1
--------------------------------
tftpboot (POC)
--------------
``tftpboot`` is a method for booting devices over a network using the Trivial File Transfer Protocol (TFTP).
It allows devices to download files such as kernel images, configurations, and other data from a TFTP server over a network.
|G1200-EVK| supports the Ethernet driver in U-Boot since |IOT-YOCTO| v24.0. It also provides support for booting via ``tftpboot`` natively in U-Boot.
There are many tutorials and how-to guides for `tftpboot` with U-Boot available on the Internet and on YouTube.
Here, we provide a very simple example of network setup for ``tftpboot`` on U-Boot.
Prepare TFTP Server on PC Host
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are many TFTP server software options for Windows or Linux PC hosts.
Developers will need a TFTP server on the PC host and prepare the image for the target EVK.
For example, we suggest `tftpd64 `_ for Windows PC hosts, and `tftpd `_ for Linux PC hosts.
Please refer to the documentation of these software for server settings and how to place the ``test.image`` in the folder accessible by the TFTP server.
Configuration Example on |G1200-EVK|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
After TFTP server has been installed, please ensure the Ethernet of |G1200-EVK| and the PC host are in the same LAN network with the same IPv4 subnet.
In the following example, the IP address of the PC host is ``192.168.0.111``, and the IP address of |G1200-EVK| is ``192.168.0.100``.
Prepare the ``test.image`` in the folder controlled by the TFTP server.
1. Enter the U-Boot shell on |G1200-EVK|.
2. Input the following commands for network settings and check the network connection:
.. prompt:: bash # auto
=> setenv serverip 192.168.0.111
=> setenv ipaddr 192.168.0.100
=> setenv gatewayip 192.168.0.255
=> setenv netmask 255.255.255.0
=> setenv ethaddr 08:00:00:00:22:01
=> ping 192.168.0.111
Developers should see the following output:
.. prompt:: bash # auto
=> ping 192.168.0.111
Using ethernet@11021000 device
host 192.168.0.111 is alive
Transfer Test Image to |G1200-EVK|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3. Transfer `test.image` from the PC host to |G1200-EVK|:
.. prompt:: bash # auto
=> tftpboot test.image
Using ethernet@11021000 device
TFTP from server 192.168.0.111: our IP address is 192.168.0.100
Filename 'test.image'.
Load address: 0x4c000000
Loading: ##################################################################
##################################################################
##########################################################
11.4 MiB/s
done
Bytes transferred = 104857600 (6400000 hex)
Now the `test.image` has been transferred to the address `0x4c000000`.
If this is a fitImage, you can use the command ``bootm`` to boot the Linux kernel from this fitImage.
However, there are many other settings that need to be taken care of, such as loading the device tree blob (DTB), etc.
Please read the U-Boot script carefully and modify it as needed to ensure a successful boot.