.. _netboot: Update with Net Boot -------------------- In some development or recovery scenarios, it may be preferable—or even necessary—to boot the DevKit over the network instead of using a removable device like an SD card. This is particularly useful in cases such as: - The user need to recover a board with a corrupted bootloader or filesystem and there's no SD card available. - The user is bringing up a new board and want to avoid wear on internal storage devices. In these situations, the user can use the ``--netboot`` option with the ``sima-cli bootimg`` command. This will download and extract the appropriate boot image for the target board, then serve it over a built-in TFTP server on the host machine. .. include:: ../blocks/headless_only.rst .. tabs:: .. tab:: Access U-Boot Boot from network requires a change to the `U-boot `_ configuration. To access the U-Boot shell on the DevKit: 1. Connect to the DevKit over serial. See :ref:`setup_serial_cfg` for setup instructions. 2. Power on or reset the DevKit. 3. When prompted with a countdown (e.g., “Hit any key to stop autoboot”), press any key to interrupt the boot sequence. You will then enter the U-Boot shell where you can run boot configuration commands. .. tab:: Boot From Network **Requirements** - Must be run on a Linux or macOS host - Host and DevKit must be on the same physical network or direct Ethernet link - Internet connection on the host machine is required to download firmware - Ensure that port UDP/69 is not blocked by the host machine firewall Run the following command from your **macOS machine**. Select the right ``--boardtype``. .. code-block:: console sima-cli bootimg -v 1.7.0 --boardtype [modalix|mlsoc] --netboot Run the following command from your **Linux host machine**. .. code-block:: console sudo sima-cli bootimg -v 1.7.0 --boardtype [modalix|mlsoc] --netboot .. note:: On Linux, starting TFTP server requires ``sudo`` access, this is why the user must ``sudo pip3 install sima-cli`` and start it as ``sudo sima-cli`` if the user wish to use the ``--netboot`` argument. This command performs the following steps: 1. Downloads the bootable image for the specified SDK version and board type (e.g., ``modalix`` or ``mlsoc``). 2. Extracts the files to a temporary working directory. 3. Starts a local TFTP server and serves the extracted boot files (e.g., ``Image``, ``boot.scr``, ``.dtb`` files). Once the server is running, configure the DevKit’s U-Boot environment to boot over the network. For example: .. code-block:: bash setenv boot_targets net mmc0 saveenv boot .. note:: By default, the DevKit U-boot is configured with: - ``ipaddr=192.168.1.20`` (The static IP address assigned to the DevKit’s Ethernet interface. For DevKits like the Modalix Early Access Kit or MLSoC, which have multiple Ethernet ports, this refers to the first Ethernet port with index 0.) - ``serverip=192.168.1.10`` (host machine running the TFTP server) To use these defaults: - Set the host machine’s Ethernet interface to `192.168.1.10` - Connect the host to the DevKit directly or via a switch Alternatively, update the ``serverip`` and ``ipaddr`` in U-Boot to match the user's network environment. Just ensure the DevKit can reach the host via the chosen IPs. .. code-block:: bash setenv serverip 10.0.0.10 setenv ipaddr 10.0.0.1 saveenv boot .. tab:: Update Internal Storage The ``--netboot`` option launches an interactive shell that allows the user to monitor TFTP client activity in real time. The shell supports the following commands: - ``c`` — Show all connected clients and their status. - ``f`` — Flash the selected client’s eMMC. Netboot may take some time to complete. We recommend connecting to the DevKit via the serial console to observe the full boot sequence. Once the DevKit has fully booted, Type ``c`` to view the current firmware version running on the device. Then, use ``f`` to initiate the eMMC flashing process. After flashing is complete, reboot the DevKit to boot from eMMC.