.. _direct_file_copy: Update With Direct File Copy ----------------------------- With Direct File Copy, developers can update the DevKit firmware by sending image files over the network and running update commands manually on the DevKit. .. note:: - Starting from firmware version ``1.5``, developers can utilize a virtual Ethernet connection in PCIe mode to connect to the DevKit without physically altering the device setup. This enables seamless firmware updates over the existing PCIe connection. - For developers using firmware version ``1.4`` or earlier in the PCIe setup, a network connection must be manually established to perform this update. This requires physically connecting the DevKit to a network in standalone mode or using the :ref:`Palette-Assisted Update ` instead. To proceed with a direct file copy update, ensure that your host machine has a functional network connection with the DevKit. For guidance on setting up network connections in different system architectures, refer to the following: - :ref:`Standalone Mode Network Setup ` - `PCIe Mode Virtual Network Setup <../setup_pcie_mode.html#virtual-network>`_ .. tabs:: .. tab:: Prerequisites Check if your DevKit is already running using the latest firmware release: .. code-block:: console sima-user@sima-user-machine:~$ ssh sima@ "cat /etc/build"|grep SIMA_BUILD_VERSION sima@'s password: SIMA_BUILD_VERSION = 1.5.0_master_B1417 ``SIMA_BUILD_VERSION`` should be |var_palette_reqs_mlsoc_fw_version| If you have this version you can skip the firmware update process. For PCIe mode, make sure you also `update the PCIe host driver <../setup_pcie_mode.html#driver-installation>`_. .. tab:: Download Image .. include:: ../blocks/download_mlsoc_firmware.rst Let's unzip the file under the folder where you downloaded the ``.tar`` file: .. code-block:: console :substitutions: sima-user@sima-user-machine:~$ sima-user@sima-user-machine:~$ cd Downloads/ sima-user@sima-user-machine:~/Downloads$ tar -xvf |var_palette_reqs_file_version|.tar sima-user@sima-user-machine:~/Downloads$ cd |var_palette_reqs_file_version| .. note:: In the PCIe mode, update the `host driver <../setup_pcie_mode.html#driver-installation>`_ in the host to ensure compatibility. .. tab:: Update The tRoot Image The tRoot image ``troot-upgrade-simaai-ev.swu`` in the file extraction folder |var_palette_reqs_file_version| is a low level firmware that supports the DevKit hardware. This is the first component that needs to be updated. Transfer the image file to the DevKit. .. code-block:: console :substitutions: sima-user@sima-user-machine:~/Downloads/|var_palette_reqs_file_version|$ scp troot-upgrade-simaai-ev.swu sima@{Board IP Address}:/tmp sima@{Board IP Address}:'s password: troot-upgrade-simaai-ev.swu 100% 0 0.0KB/s 00:00 Now let's connect to the board, we can use the serial port or SSH through the ethernet port. For this example, we will use SSH. .. code-block:: console :substitutions: sima-user@sima-user-machine:~/Downloads/|var_palette_reqs_file_version|$ ssh sima@{Board IP Address} davinci:~$ cd /tmp davinci:/tmp$ Let's update the firmware: .. code-block:: console davinci:/tmp$ sudo swupdate -H simaai-image-troot:1.0 -i /tmp/troot-upgrade-simaai-ev.swu SWUpdate v2023.05-dirty Licensed under GPLv2. See source distribution for detailed copyright notices. [TRACE] : SWUPDATE running : [print_registered_bootloaders] : Registered bootloaders: [TRACE] : SWUPDATE running : [print_registered_bootloaders] : uboot loaded. [INFO ] : SWUPDATE running : [main] : Using default bootloader interface: uboot [INFO ] : SWUPDATE running : [main] : Running on simaai-image-troot Revision 1.0 ... [INFO ] : SWUPDATE successful ! SWUPDATE successful ! [TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again ! [INFO ] : No SWUPDATE running : Waiting for requests... [INFO ] : SWUPDATE running : [endupdate] : SWUpdate was successful ! [DEBUG] : SWUPDATE running : [postupdate] : Running Post-update command .. warning:: Do not interrupt the process. This will take a long time to complete (>10 minutes in some cases). When the success message appears, power cycle the board. Verify the DevKit boots properly by checking the version/messages in the tRoot terminal. If the DevKit does not boot, contact support@sima.ai. .. tab:: Update The Main Image .. note:: Only perform this action after the tRoot Image update was successful. The DevKit image ``simaai-image-palette-upgrade-davinci.swu`` in the file extraction folder |var_palette_reqs_file_version| is the operating system and high level software that supports the DevKit. This is the second component that needs to be updated. .. code-block:: console :substitutions: sima-user@sima-user-machine:~/Downloads/|var_palette_reqs_file_version|$ scp simaai-image-palette-upgrade-davinci.swu sima@{Board IP Address}:/tmp sima@{Board IP Address}:'s password: simaai-image-palette-upgrade-davinci.swu 100% 0 0.0KB/s 00:00 To connect to the board, you can use the serial port or SSH using the Ethernet port. The example below uses the SSH method: .. code-block:: console :substitutions: sima-user@sima-user-machine:~/Downloads/|var_palette_reqs_file_version|$ ssh sima@{Board IP Address} davinci:~$ cd /tmp davinci:/tmp$ To update the main image: .. code-block:: console davinci:/tmp$ sudo swupdate -H simaai-image-palette:1.0 -i /tmp/simaai-image-palette-upgrade-davinci.swu .. warning:: Do not interrupt the process. The board will auto reboot after image update. Next, verify that the build version matches the updated release, by running: .. code-block:: console sima-user@sima-user-machine:~$ ssh sima@ "cat /etc/build"|grep SIMA_BUILD_VERSION sima@'s password: SIMA_BUILD_VERSION = 1.5.0_master_B1417 ``SIMA_BUILD_VERSION`` should be |var_palette_reqs_mlsoc_fw_version|