This topic explains how to boot Digi Embedded Yocto images without updating the firmware on the internal eMMC. This is helpful during the development phase, as it preserves the original firmware on the SOM.

Open a serial connection

You must open a serial connection to communicate with your device.

  1. Open a serial connection using any terminal program such as Tera Term, Minicom, Coolterm, or HyperTerminal. This documentation demonstrates using Minicom to work with the device command line.

    Use 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

  2. Reset the device by pressing the reset button on the board. Then immediately press any key in the serial terminal to stop the auto-boot process. The U-Boot bootloader prompt displays:

    U-Boot SPL dub-2023.04-r3.2 (Jan 30 2024 - 10:57:23 +0000)
    SOC: 0xa1009300
    LC: 0x2040010
    PMIC: Over Drive Voltage Mode
    M33 prepare ok
    Normal Boot
    Trying to boot from BOOTROM
    Boot Stage: Primary boot
    image offset 0x0, pagesize 0x200, ivt offset 0x0
    Load image from 0x4f400 by ROM_API
    NOTICE:  BL31: v2.8(release):lf-6.1.55-2.2.0-0-g08e9d4eef226-dirty
    NOTICE:  BL31: Built : 16:47:44, Jan 30 2024
    
    
    U-Boot dub-2023.04-r3.2 (Jan 30 2024 - 10:57:23 +0000)
    
    CPU:   i.MX93(52) rev1.1 1700 MHz (running at 1692 MHz)
    CPU:   Industrial temperature grade (-40C to 105C) at 42C
    Reset cause: POR (0x1)
    DRAM:  992 MiB
    Core:  202 devices, 29 uclasses, devicetree: separate
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    In:    serial
    Out:   serial
    Err:   serial
    Model: Digi ConnectCore 93 Development Kit
    ConnectCore 93 SOM variant 0x01: 992 MiB LPDDR4, Wi-Fi, Bluetooth
    Boot:  MMC0
    
    BuildInfo:
      - ELE firmware version 0.1.0-44880904
    
    flash target is MMC:0
    Net:   eth0: ethernet@428a0000 [PRIME]
    Fastboot: Normal
    Normal Boot
    Hit any key to stop autoboot:  0
    => 

Boot the system from network

This shows how to transfer the images to the target via TFTP or NFS, and mount an NFS root file system.

This requires that you set up your PC workstation as explained in Set up native Linux PC.

1. Prepare the device artifacts

  1. Get the Digi Embedded Yocto firmware images to boot from network:

    • The kernel file: Image.gz.

    • The device tree: ccimx93-dvk.dtb.

    • Any device tree overlays files that apply to your hardware: <device-tree-overlay-file>.dtbo (see Pre-compiled device tree overlays).

    • The compressed root file system: <rootfs-file>.rootfs.tar.bz2.

    1. After building the Digi Embedded Yocto firmware, you can find the image files inside the project directory at:

      <project_folder>/tmp/deploy/images/ccimx93-dvk

    2. You can download Digi provided pre-built images from:

  2. Untar the root file system tarball (*.rootfs.tar.bz2) in the NFS exported directory of your development workstation. See Set up native Linux PC.

    $ sudo tar xvfp image.rootfs.tar.bz2 -C /exports/nfsroot-ccimx93_dvk
  3. Copy the kernel *.bin file to the TFTP exported directory of your development workstation.

    $ sudo cp <kernel-file>.bin /tftpboot
  4. Copy the device tree *.dtb file to the TFTP exported directory of your development workstation.

    $ sudo cp <device-tree-file>.dtb /tftpboot
  5. (Optional) Copy any device tree overlay *.dtbo files that apply to your variant to the TFTP exported directory of your development workstation.

    $ sudo cp <device-tree-overlay-file>.dtbo /tftpboot

2. Configure your device’s network settings

  1. Get a dynamic IP for your target:

    => setenv autoload no
    => dhcp

    or you can set a static IP:

    => setenv ipaddr 192.168.115.222
  2. Configure the IP of the development workstation with TFTP and NFS servers installed. See Set up native Linux PC:

    => setenv serverip 192.168.115.1

3. Boot from network

Boot from TFTP+NFS

  1. Set the directory with the rootfs to mount. This directory is the one exported via NFS in your development workstation. See Set up an NFS server.

    => setenv rootpath /exports/nfsroot-ccimx93_dvk
  2. Specify the device tree (*.dtb) file name. This is the name of the *.dtb file you copied to the TFTP exported directory of your development workstation.

    => setenv fdt_file <device-tree-file>.dtb
  3. (Optional) Use a comma-separated list to specify the device tree overlay (*.dtbo) files you want to apply. These are the names of the *.dtbo files you copied to the TFTP exported directory of your development workstation.

    => setenv overlays <overlay1>.dtbo,<overlay2>.dtbo
  4. Establish the kernel file (*.bin) name. This is the name of the *.bin file you copied to the TFTP exported directory of your development workstation.

    => setenv imagegz <kernel-file>.bin
  5. Save the changes.

    => saveenv
  6. Boot from TFTP.

    => dboot linux tftp

    You can make these changes persistent by writing the following command:

    => setenv bootcmd 'dboot linux tftp'
    => saveenv

The target now loads the kernel and device tree from the TFTP server and the root file system from the NFS server.

Boot entirely from NFS

To avoid using TFTP for kernel and device tree files and boot everything from NFS, copy the kernel *.bin and device tree *.dtb files to the NFS-exported directory of your development workstation (instead of to the TFTP directory). See Set up an NFS server.

=> dboot linux nfs

Boot from microSD card

U-Boot can start a complete Digi Embedded Yocto system from a microSD card. To boot a system from a microSD card, follow these steps:

1. Create a bootable microSD card from a Digi Embedded Yocto image

Requirements:

  • Root/Administrator permissions in your development computer

  • A microSD card with a minimum capacity of 2 GB

The following procedure will destroy existing data in the microSD card.

To create a bootable microSD card from an existing Digi Embedded Yocto image:

  1. Download the bootable Digi Embedded Yocto image from this URL: https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccimx93-dvk/xwayland/.

  2. Extract the .sdcard.gz file from the zip you downloaded into a folder of your choice.

  3. Decompress the file using the following command:

    $ gzip -d -f <path/filename.sdcard.gz>
  4. Insert the microSD card into your computer and check the node Linux assigns to it (/dev/[sdcard]) using dmesg:

    $ dmesg
    [1413652.901270] sd 41:0:0:0: [sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
    [1413652.903140] sd 41:0:0:0: [sdc] No Caching mode page present
    [1413652.903144] sd 41:0:0:0: [sdc] Assuming drive cache: write through
    [1413652.905638] sd 41:0:0:0: [sdc] No Caching mode page present
    [1413652.905642] sd 41:0:0:0: [sdc] Assuming drive cache: write through
    [1413652.915154] sdc: sdc1

    Do not mount any partitions the card might contain (or unmount any partition if automatically mounted) as you will be writing to the entire block device.

    Using an incorrect device node in the next step might destroy all data on your computer hard drive.
  5. Raw write the image file to the microSD card with this command:

    $ sudo dd if=<path/filename.sdcard> of=/dev/<sdcard> bs=64K && sync

    In this example:

    • You must substitute <path/filename.sdcard> with the path and filename to the SD card image.

    • You must substitute <sdcard> with the device node Linux assigned to your microSD card.

The microSD card is now ready.

Substitute the bootloader

The .sdcard image contains the bootloader of the default variant of the ConnectCore 93. Attempting to boot it on a non-default variant will result in unexpected behavior. You can substitute the bootloader on the image with the one corresponding to your variant by raw writing it to the microSD card at a specific offset after the .sdcard image has been written:

$ sudo dd if=<path/filename.bin> of=/dev/<sdcard> bs=1k seek=32 oflag=sync

2. Boot Digi Embedded Yocto from the microSD card

  1. Power off the device.

  2. Insert the microSD card into the microSD card holder (bottom side of the board).

  3. Change the boot source configuration to boot from the microSD card. To do so, set the boot mode micro-switches as follows:

    • SW3.1: ON

    • SW3.2: OFF

    • SW3.3: OFF

    • SW3:4: n/a

  4. Power on the device. Digi Embedded Yocto boots from the microSD card.