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

For a full deployment of the system (including partitioning of the eMMC, and formatting of the update partition), 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:

  • <u-boot-file>.bin. See U-Boot files by variant to select the appropriate file for your hardware variant.

  • <boot-file>.boot.vfat

  • <recovery-file>.recovery.vfat

  • <rootfs-file>.rootfs.ext4.gz

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

You can optionally download Digi pre-built images from:

You must decompress the rootfs file before installing it on the target:

$ gzip -d <rootfs-file>.rootfs.ext4.gz

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 eMMC 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. Syntax for the update command is:

    => update <partition-name> tftp <filename>

    Run one or more of these commands, as needed:

    => update uboot tftp <u-boot-file>.bin
    => update linux tftp <boot-file>.boot.vfat
    => update recovery tftp <recovery-file>.recovery.vfat
    => update rootfs tftp <rootfs-file>.rootfs.ext4

    If you update the uboot 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 the 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 you need with a given file. Syntax for the update command is:

    => update <partition-name> mmc 1  <filename>
    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.

Run one or more of these commands, as needed:

+

=> update uboot mmc 1  <u-boot-file>.bin
=> update linux mmc 1  <boot-file>.boot.vfat
=> update recovery mmc 1  <recovery-file>.recovery.vfat
=> update rootfs mmc 1  <rootfs-file>.rootfs.ext4

+

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

=> env default -a
=> saveenv

Format the update partition

You can use the update partition to store *.swu images for updating the firmware from a running system. See Program firmware from Linux.

To be able to use the update partition, you must format it first.

Formatting is only needed the first time, or after modifying the partition table.

To format the update partition, run the following commands in U-Boot:

=> setenv recovery_command wipe_update
=> saveenv
=> run recoverycmd

This will boot the system and ramdisk on the recovery partition, which will format the update partition.