This topic shows you how to manually update specific NAND partitions or UBI volumes with the image files generated by Digi Embedded Yocto using U-Boot.

For a full deployment of the system (including partitioning of the NAND), Digi recommends you use the methods described in Step 3 - Program the Yocto firmware.

Obtain the firmware image files

The list of files built by Digi Embedded Yocto is:

  • <tf-a-filename>.stm32[1]

  • fip-ccmp15-dvk-optee.bin[1]

  • <boot-file>.boot.ubifs

  • <recovery-file>.recovery.ubifs

  • <rootfs-file>.rootfs.ubifs

(1) See U-Boot files by variant to select the appropriate file for your hardware variant.

After building the Digi Embedded Yocto firmware, you can find the image files inside the project directory at <project_folder>/tmp/deploy/images/ccmp15-dvk.

You can optionally download Digi pre-built images from:

Establish a serial connection with your device

Open a serial connection with the device. You can use any serial terminal program such as Tera Term, Minicom, CoolTerm, or HyperTerminal.

PuTTY terminal program is not recommended due to an incompatibility with the USB/serial driver.

Open a serial connection with the following settings:

Parameter Value

Port

Serial port where the device is connected

Baud rate

115200

Data bits

8

Parity

None

Stop bits

1

Flow control

None

Update firmware

Update firmware from TFTP

U-Boot bootloader allows you to update the firmware of your device over Ethernet. U-Boot uses the TFTP protocol to get the firmware images from a TFTP server running on your computer and programs them onto the NAND of the device.

This update process requires a TFTP server running on your computer with a configured exposed folder. If you don’t have a running TFTP server, follow the installation instructions in Install Digi Embedded Yocto. The devices look for the firmware files in this folder when performing the update.

Once you have the TFTP server running on your computer, you can start the update process:

  1. Copy the firmware images in your TFTP server’s exposed folder (typically /tftpboot).

  2. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  3. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process.

  4. Configure the network settings of the device by doing one of the following:

    • Get a dynamic IP address from a DHCP server by running the following commands:

      => setenv autoload no
      => dhcp
    • Configure a static IP address, where a.b.c.d is the IP address of your device:

      => setenv ipaddr a.b.c.d
  5. Configure the IP address of the machine where the TFTP server is running and save the configuration as follows, where w.x.y.z is your machine IP address where the TFTP server is running:

    => setenv serverip w.x.y.z
    => saveenv
  6. Update partitions or UBI volumes. Syntax for the update command via TFTP is:

    => update <partition-name/ubi-volume-name> tftp <filename>

    Check the list of default partitions or UBI volumes in Storage layout.

    If you update the bootloader partition, reboot your device to boot into the recently updated U-Boot, and reset the environment to the new defaults:

    => env default -a
    => saveenv

Update firmware from microSD

To program Digi Embedded Yocto from a microSD card:

  1. Copy the firmware files in the root of a microSD card.

  2. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  3. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process.

  4. Update any partition or UBI volume you need with a given file. Syntax for the update command from microSD is:

    => update <partition-name/ubi-volume-name> mmc 1  <filename>

    Check the list of default partitions or UBI volumes in Storage layout.

    Older versions of U-Boot require you to specify the file system type in the update command. Type help update to see the exact syntax for the U-Boot version in use.

    If you update the bootloader partition, reboot your device to boot into the recently updated U-Boot, and reset the environment to the new defaults:

    => env default -a
    => saveenv

Update firmware from USB mass storage

To program Digi Embedded Yocto from a USB mass storage device:

  1. Copy the firmware files in the root of a USB mass storage device.

  2. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  3. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process.

  4. Plug the USB storage device into the USB socket of the board.

  5. Start the USB:

    => usb start
  6. Update any partition or UBI volume you need with a given file. Syntax for the update command from USB is:

    => update <partition-name/ubi-volume-name> usb 0  <filename>

    Check the list of default partitions or UBI volumes in Storage layout.

    Older versions of U-Boot require you to specify the file system type in the update command. Type help update to see the exact syntax for the U-Boot version in use.

    If you update the bootloader partition, reboot your device to boot into the recently updated U-Boot, and reset the environment to the new defaults:

    => env default -a
    => saveenv