.. _Firmware and Board Software Update: Firmware and Board Software Update ********************************** This section describes the following topics: * Flashing tRoot remotely without SPI Flashing tool * Flashing Yocto Linux Image .. note:: Before running any of the below steps, check if your board is already running using the latest software release: .. code-block:: console sima-user@sima-user-machine:~$ ssh sima@ The authenticity of host '10.42.0.240 (10.42.0.240)' can't be established. ED25519 key fingerprint is SHA256:mTD8tqYTR/NrmVcE0pyMaVGYXpbkgJ4iJppskpDL3yM. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.42.0.240' (ED25519) to the list of known hosts. sima@10.42.0.240's password: davinci:~$ cat /etc/build ----------------------- Build Configuration: | ----------------------- DISTRO = poky DISTRO_VERSION = 4.0.10 MACHINE = davinci DATE = 20240917 TIME = 210846 SIMA_BUILD_VERSION = 1.4.0_master_B1230 ----------------------- Layer Revisions: | ----------------------- meta = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-poky = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-yocto-bsp = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-simaai = master:6ebb42c489f4fc53d3fc6386689baa6dc3ae5c0f -- modified meta-oe = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-python = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-networking = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-swupdate = kirkstone:d1d4abfaf82d37c31e3cec3602d6d8d56d105185 ``SIMA_BUILD_VERSION`` should be |var_palette_reqs_mlsoc_fw_version| If you have this version you can skip this page. .. _Downloading the SiMa.ai MLSoC Images: Downloading the SiMa.ai MLSoC Images ==================================== .. button-link:: https://docs.sima.ai/pkg_downloads/SDK1.4.0/MLSoC1.4_Firmware.tar :color: primary :shadow: Download Now Unzipping the MLSoC Files ========================= 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| Updating the Firmware/tRoot Image on the Board ============================================== You can find the tRoot file named ``troot-upgrade-simaai-ev.swu`` in this folder. We will copy this file to the board. .. 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 .. note:: The password for the default sima user on the board is ``edgeai``. Now let's connect to the board, we can use the serial port using a tool like minicom 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 -v -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 Wait until Flash Write is complete. Note that this will take a long time to complete (>10 minutes in some cases). If the success message appears, power cycle the board. Verify the board boots properly by checking the version/messages in the tRoot terminal. If the board does not boot, contact support@sima.ai. Updating the Yocto Linux Image on the Board =========================================== **From Palette** You can directly update using the Palette software command. Refer to :ref:`mpk firmware-upgrade`. The ``mpk firmware-upgrade`` command allows the users to wirelessly (Over-the-Air) upgrade the firmware on the MLSoC device/s using the Palette CLI. .. note:: If the board is connected over PCIe, use the slot number, ``-s `` instead of using the device IP address (``-t ``) or the device name (``-d ``). **From the Board** You can find the Yocto Linux image file named ``simaai-image-palette-upgrade-davinci.swu`` in this folder. We will copy this file to the MLSoC. .. 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 using minicom 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 Yocto Linux image: .. code-block:: console davinci:/tmp$ sudo swupdate -v -H simaai-image-palette:1.0 -i /tmp/simaai-image-palette-upgrade-davinci.swu 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@ The authenticity of host '10.42.0.240 (10.42.0.240)' can't be established. ED25519 key fingerprint is SHA256:mTD8tqYTR/NrmVcE0pyMaVGYXpbkgJ4iJppskpDL3yM. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.42.0.240' (ED25519) to the list of known hosts. sima@10.42.0.240's password: davinci:~$ cat /etc/build ----------------------- Build Configuration: | ----------------------- DISTRO = poky DISTRO_VERSION = 4.0.10 MACHINE = davinci DATE = 20240917 TIME = 210846 SIMA_BUILD_VERSION = 1.4.0_master_B1230 ----------------------- Layer Revisions: | ----------------------- meta = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-poky = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-yocto-bsp = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-simaai = master:6ebb42c489f4fc53d3fc6386689baa6dc3ae5c0f -- modified meta-oe = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-python = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-networking = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-swupdate = kirkstone:d1d4abfaf82d37c31e3cec3602d6d8d56d105185 ``SIMA_BUILD_VERSION`` should be |var_palette_reqs_mlsoc_fw_version|