Perform a rescue boot

If the bootloader has been erased from the storage media (or written with an invalid image) and the target does not boot, you can boot the target from a different media.

Boot in USB debug mode

Requirements

  • Linux host computer

  • Root/administrator permissions on your development computer

For the ConnectCore MP13 Development Kit:

  • One micro USB cable

  • One USB serial console cable

Instructions

  1. Download the TF-A binary image file suitable to boot from USB (tf-a-ccmp13-dvk-<ram_size>-usb.stm32) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp13-dvk/fb/arm-trusted-firmware/.

    Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant).
  2. Download the FIP binary image file (fip-ccmp13-dvk-<ram_size>-optee.bin) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp13-dvk/fb/fip/.

    Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant).
  3. Install the dfu-util software tool on your development PC:

    $ sudo apt-get install dfu-util
  4. Connect the USB serial cable to the CONSOLE connector on the board and to your host computer.

  5. Connect a micro USB cable to your development PC and the other end to the target USB OTG connector.

  6. Change the boot mode configuration to boot from USB. To do so, set the boot mode micro-switches as follows:

    • BOOT.1: OFF

    • BOOT.2: ON

    • BOOT.3: ON

    • BOOT.4: n/a

  7. Open a serial terminal at 115200/8/n/1.

  8. Power up the board.

  9. On the host computer, run the dfu-util tool with the TF-A and FIP files as follows:

    $ dfu-util -a 0 -D tf-a-ccmp13-dvk-<ram_size>-usb.stm32
    $ dfu-util -a 0 -e
    $ dfu-util -a 0 -D fip-ccmp13-dvk-<ram_size>-optee.bin
    $ dfu-util -a 0 -e

    The serial terminal shows the device starting U-Boot. You can proceed to re-program U-Boot into the NAND. See Reprogram bootloader in the NAND.

Boot from microSD card

  1. Create a bootable microSD card. See Boot from microSD card for instructions.

  2. Power off the device.

  3. Insert the microSD card into the microSD card holder.

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

    • BOOT.1: OFF

    • BOOT.2: ON

    • BOOT.3: ON

    • BOOT.4: n/a

  5. Power on the device.

You can proceed to re-program U-Boot into the NAND. See Reprogram bootloader in the NAND.

Reprogram bootloader in the NAND

Once U-Boot is running, you can use it to update the TF-A and FIP images in the NAND:

  1. Download the TF-A binary image file suitable to boot from NAND (tf-a-ccmp13-dvk-<ram_size>-nand.stm32) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp13-dvk/fb/arm-trusted-firmware/.

    Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant).
  2. Download the FIP binary image file suitable to boot from NAND (fip-ccmp13-dvk-<ram_size>-optee.bin) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp13-dvk/fb/fip/.

    Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant).
  3. Reset the environment to default values:

    => env default -a
  4. Reset to the default partition table into the NAND:

    => run ubivolscript
  5. Save the environment with saveenv.

  6. Use one of the following methods to update the files to the NAND:

Re-program bootloader from Ethernet (TFTP)

  1. Place the TF-A and FIP binaries inside your host computer TFTP exported folder.

  2. On the target, configure your network settings (IP of the device, IP of the host/server):

    => setenv ipaddr <your-ip>
    => setenv serverip <server-ip>
  3. Connect an Ethernet cable to the Ethernet port.

  4. Run the following commands to update TF-A and FIP images into the NAND:

    => update fsbl1 tftp tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fsbl2 tftp tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fip-a tftp fip-ccmp13-dvk-<ram_size>-optee.bin
    => update fip-b tftp fip-ccmp13-dvk-<ram_size>-optee.bin
  5. Change the boot mode configuration to boot from the internal NAND.

    To do so, set the boot mode micro-switches as follows:

    • BOOT.1: OFF

    • BOOT.2: OFF

    • BOOT.3: OFF

    • BOOT.4: n/a

  6. Power-cycle the board. The target now boots from the NAND.

Re-program bootloader from microSD card

  1. Place the TF-A and FIP binaries inside a FAT-formatted microSD card.

  2. Insert the microSD card in the board.

  3. Run the following commands to update TF-A and FIP images into the NAND:

    => update fsbl1 mmc 1 tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fsbl2 mmc 1 tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fip-a mmc 1 fip-ccmp13-dvk-<ram_size>-optee.bin
    => update fip-b mmc 1 fip-ccmp13-dvk-<ram_size>-optee.bin
  4. Change the boot mode configuration to boot from the internal NAND.

    To do so, set the boot mode micro-switches as follows:

    • BOOT.1: OFF

    • BOOT.2: OFF

    • BOOT.3: OFF

    • BOOT.4: n/a

  5. Power-cycle the board. The target now boots from the NAND.

Re-program bootloader from a USB mass storage

  1. Place the TF-A and FIP binaries inside a FAT-formatted USB mass storage.

  2. Insert the USB storage in the board.

  3. Start the USB:

    => usb start
  4. Run the following commands to update TF-A and FIP images into the NAND:

    => update fsbl1 usb 0 tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fsbl2 usb 0 tf-a-ccmp13-dvk-<ram_size>-nand.stm32
    => update fip-a usb 0 fip-ccmp13-dvk-<ram_size>-optee.bin
    => update fip-b usb 0 fip-ccmp13-dvk-<ram_size>-optee.bin
  5. Change the boot mode configuration to boot from the internal NAND.

    To do so, set the boot mode micro-switches as follows:

    • BOOT.1: OFF

    • BOOT.2: OFF

    • BOOT.3: OFF

    • BOOT.4: n/a

  6. Power-cycle the board. The target now boots from the NAND.