The U-Boot environment is a block of memory in persistent storage. It is used to store variables in the form name=value.

Where is the U-Boot environment?

The ConnectCore 93 reads the U-Boot environment (including the MAC addresses) from the eMMC. If it does not find a valid environment on the eMMC, U-Boot uses a hard-coded default environment:

  • The environment is located at the end of the eMMC boot partition 1 (device /dev/mmcblk0boot0 in Linux).

  • The size of the environment is determined by constant CONFIG_ENV_SIZE in U-Boot source code.

  • The redundant copy of the environment is located at the end of the eMMC boot partition 2 (device /dev/mmcblk0boot1 in Linux).

Find these constants at the configuration file configs/ccimx93-dvk_defconfig.

Access U-Boot environment from Linux

You can access the U-Boot environment from a Linux application. In the U-Boot source tree, you can find the environment tools in the directory tools/env. Digi Embedded Yocto compiles this tool by default and installs it on your target’s root file system as two executable files:

  • fw_printenv: to print the value of variables.

  • fw_setenv: to set the value of variables.

The tools work with the configuration file /etc/fw_env.config, which must contain two entries in the form: Device name, offset, size. The first entry must point to the U-Boot environment location. The second must point to its redundant copy. For example:

# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Device name        Offset      Size
/dev/mmcblk0boot0    -0x4000    0x4000
/dev/mmcblk0boot1    -0x4000    0x4000

Negative offsets are treated relative to the end of the eMMC partition.

Append boot arguments to the kernel command line

You can use the extra_bootargs variables to append commands to the default kernel command line.

Important U-Boot environment variables on the ConnectCore 93

The following U-Boot environment variables are worth mentioning:

MAC addresses

Variable Description Flags


MAC address of the first wired Ethernet interface



MAC address of the second wired Ethernet interface if there is one



MAC address of the Wi-Fi interface



MAC address of the Bluetooth interface


About flags

  • Variables with the write-once flag are protected and will not be overwritten by setenv or env default commands (unless manually forced with -f option).

  • Variables with the change-default flag can only be written once using setenv command (unless manually forced with -f option).

Digi programs the MAC addresses of the ConnectCore 93 during manufacturing and saves them in the U-Boot environment on the eMMC.

If the device boots from an external media different from the eMMC (for example microSD card), the system reads the U-Boot environment from it, so MAC addresses will not match the ones assigned by Digi during manufacturing. You must program the MAC addresses of the available interfaces and save the environment on your boot storage media.

You can find the Digi-assigned MAC address on the ConnectCore 93 module label. See Determine Digi MAC addresses for more information.

MMC boot device

Variable Description Flags


MMC device index where U-Boot booted from


During start-up, U-Boot initially sets this variable to the MMC device index where the device booted from:

You can use this variable to determine which MMC device the ConnectCore 93 booted from.

MMC device (update target)

Variable Description Flags


MMC device index to update firmware to


The update command uses this variable to determine the MMC device index to write the firmware to:

You can modify this variable as needed.

Module variant

Variable Description Flags


Variant ID code for the System-On-Chip


During start-up, U-Boot automatically sets this variable to the ConnectCore 93 System-On-Chip variant ID number (a hexadecimal code programmed in the SOM one-time programmable bits).

Carrier board version and ID

Variable Description Flags


Version number of the carrier board



ID number of the carrier board


These optional write-once variables can be set to the carrier board’s version and ID numbers during manufacturing. See Carrier board version and ID.

Determine Digi MAC addresses

Sequential MAC address scheme

Digi assigns MAC addresses according to a sequential scheme. The order of assignment depends on the available interfaces, but the scheme always respects the order Ethernet 1, Ethernet 2, Wi-Fi, Bluetooth and skips non-available interfaces.

Determine MAC addresses

You can determine the MAC addresses for your device either by reading the Ethernet MAC off the label and using the scheme to calculate subsequent addresses, or by reading them from your device. To read the stock environment variables from the device using the printenv command executed at the U-Boot prompt:

To get first Ethernet MAC address:

=> printenv ethaddr

If your SOM has a second Ethernet MAC address:

=> printenv eth1addr

To get Wi-Fi MAC address:

=> printenv wlanaddr

To get Bluetooth MAC address:

=> printenv btaddr