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 MP25 Development Kit:
-
One USB type-C cable
-
One USB serial console cable
Instructions
-
Download the TF-A binary image file suitable to boot from USB (
tf-a-ccmp25-dvk-usb.stm32
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/arm-trusted-firmware/. -
Download the FIP DDR firmware binary image file (
fip-ccmp25-dvk-ddr.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/fip/. -
Download the FIP binary image file (
fip-ccmp25-dvk-optee.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/fip/. -
Install the
dfu-util
software tool on your development PC:$ sudo apt-get install dfu-util
-
Connect the USB serial cable to the CONSOLE connector on the board and to your host computer.
-
Connect a USB type-C cable to your development PC and the other end to the target USB type-C connector.
-
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
: OFF -
BOOT.4
: OFF
-
-
Open a serial terminal at 115200/8/n/1.
-
Power up the board.
-
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-ccmp25-dvk-usb.stm32 $ dfu-util -a 0 -e $ sleep 1 $ dfu-util -a 0 -D fip-ccmp25-dvk-ddr.bin $ dfu-util -a 0 -e $ sleep 1 $ dfu-util -a 1 -D fip-ccmp25-dvk-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 eMMC. See Reprogram bootloader in the eMMC.
Reprogram bootloader in the eMMC
Once U-Boot is running, you can use it to update the TF-A and FIP images in the eMMC:
-
Download the TF-A binary image file suitable to boot from eMMC (
tf-a-ccmp25-dvk-emmc.stm32
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/arm-trusted-firmware/. -
Download the FIP binary image file suitable to boot from eMMC (
fip-ccmp25-dvk-optee.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/fip/. -
Download the Metadata binary image file (
metadata.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp25-dvk/wayland/arm-trusted-firmware/. -
Reset the environment to default values:
=> env default -a
-
Reset to the default partition table into the eMMC:
=> run partition_emmc_linux
-
Save the environment with
saveenv
. -
Use one of the following methods to update the files to the eMMC:
Re-program bootloader from Ethernet (TFTP)
-
Place the TF-A and FIP binaries inside your host computer TFTP exported folder.
-
On the target, configure your network settings (IP of the device, IP of the host/server):
=> setenv ipaddr <your-ip> => setenv serverip <server-ip>
-
Connect an Ethernet cable to the Ethernet port.
-
Run the following commands to update TF-A and FIP images into the eMMC:
=> update boot1 tftp tf-a-ccmp25-dvk-emmc.stm32 => update boot2 tftp tf-a-ccmp25-dvk-emmc.stm32 => update metadata1 tftp metadata.bin => update metadata2 tftp metadata.bin => update fip-a tftp fip-ccmp25-dvk-optee.bin => update fip-b tftp fip-ccmp25-dvk-optee.bin
-
Change the boot mode configuration to boot from the internal eMMC.
To do so, set the boot mode micro-switches as follows:
-
BOOT.1
: OFF -
BOOT.2
: OFF -
BOOT.3
: OFF -
BOOT.4
: OFF
-
-
Power-cycle the board. The target now boots from the eMMC.
Re-program bootloader from microSD card
-
Place the TF-A and FIP binaries inside a FAT-formatted microSD card.
-
Insert the microSD card in the board.
-
Run the following commands to update TF-A and FIP images into the eMMC:
=> update boot1 mmc 1 tf-a-ccmp25-dvk-emmc.stm32 => update boot2 mmc 1 tf-a-ccmp25-dvk-emmc.stm32 => update metadata1 mmc 1 metadata.bin => update metadata2 mmc 1 metadata.bin => update fip-a mmc 1 fip-ccmp25-dvk-optee.bin => update fip-b mmc 1 fip-ccmp25-dvk-optee.bin
-
Change the boot mode configuration to boot from the internal eMMC.
To do so, set the boot mode micro-switches as follows:
-
BOOT.1
: OFF -
BOOT.2
: OFF -
BOOT.3
: OFF -
BOOT.4
: OFF
-
-
Power-cycle the board. The target now boots from the eMMC.
Re-program bootloader from a USB mass storage
-
Place the TF-A and FIP binaries inside a FAT-formatted USB mass storage.
-
Insert the USB storage in the board.
-
Start the USB:
=> usb start
-
Run the following commands to update TF-A and FIP images into the eMMC:
=> update boot1 usb 0 tf-a-ccmp25-dvk-emmc.stm32 => update boot2 usb 0 tf-a-ccmp25-dvk-emmc.stm32 => update metadata1 usb 0 metadata.bin => update metadata2 usb 0 metadata.bin => update fip-a usb 0 fip-ccmp25-dvk-optee.bin => update fip-b usb 0 fip-ccmp25-dvk-optee.bin
-
Change the boot mode configuration to boot from the internal eMMC.
To do so, set the boot mode micro-switches as follows:
-
BOOT.1
: OFF -
BOOT.2
: OFF -
BOOT.3
: OFF -
BOOT.4
: OFF
-
-
Power-cycle the board. The target now boots from the eMMC.