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 MP15 Development Kit:
-
One micro USB cable
-
One USB serial console cable
Instructions
-
Download the TF-A binary image file suitable to boot from USB (
tf-a-ccmp15-dvk-<ram_size>-usb.stm32
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp15-dvk/wayland/arm-trusted-firmware/.Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant). -
Download the FIP binary image file (
fip-ccmp15-dvk-<ram_size>-optee.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp15-dvk/wayland/fip/.Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant). -
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 micro USB cable to your development PC and the other end to the target USB OTG 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
: ON -
BOOT.4
: n/a
-
-
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 1 -D tf-a-ccmp15-dvk-<ram_size>-usb.stm32 $ dfu-util -a 3 -D fip-ccmp15-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
-
Create a bootable microSD card. See Boot from microSD card for instructions.
-
Power off the device.
-
Insert the microSD card into the microSD card holder.
-
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
-
-
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:
-
Download the TF-A binary image file suitable to boot from NAND (
tf-a-ccmp15-dvk-<ram_size>-nand.stm32
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp15-dvk/wayland/arm-trusted-firmware/.Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant). -
Download the FIP binary image file suitable to boot from NAND (
fip-ccmp15-dvk-<ram_size>-optee.bin
) from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccmp15-dvk/wayland/fip/.Select the -<ram_size>- that matches your variant RAM configuration (refer to U-Boot files by variant). -
Reset the environment to default values:
=> env default -a
-
Reset to the default partition table into the NAND:
=> run ubivolscript
-
Save the environment with
saveenv
. -
Use one of the following methods to update the files to the NAND:
Re-program bootloader from USB OTG using Fastboot
To update U-Boot via USB OTG using uuu and the Fastboot protocol:
-
Connect a micro USB cable between target and host.
-
Then, on the target, run the
fastboot
command from the U-Boot console, selecting the USB interface you want it to listen to:=> fastboot 0
-
On the host, run the following fastboot commands through the uuu tool (as root):
$ uuu FB: ucmd setenv fastboot_buffer \${loadaddr} $ uuu FB: ucmd setenv forced_update 1 $ uuu FB: download -f tf-a-ccmp15-dvk-<ram_size>-nand.stm32 $ uuu FB: ucmd update fsbl1 ram \${fastboot_buffer} \${filesize} $ uuu FB: ucmd update fsbl2 ram \${fastboot_buffer} \${filesize} $ uuu FB: download -f fip-ccmp15-dvk-<ram_size>-optee.bin $ uuu FB: ucmd update fip-a ram \${fastboot_buffer} \${filesize} $ uuu FB: ucmd update fip-b ram \${fastboot_buffer} \${filesize}
-
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
-
-
Power-cycle the board. The target now boots from the NAND.
For additional commands and information, see the NXP UUU manual.
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 NAND:
=> update fsbl1 tftp tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fsbl2 tftp tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fip-a tftp fip-ccmp15-dvk-<ram_size>-optee.bin => update fip-b tftp fip-ccmp15-dvk-<ram_size>-optee.bin
-
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
-
-
Power-cycle the board. The target now boots from the NAND.
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 NAND:
=> update fsbl1 mmc 1 tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fsbl2 mmc 1 tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fip-a mmc 1 fip-ccmp15-dvk-<ram_size>-optee.bin => update fip-b mmc 1 fip-ccmp15-dvk-<ram_size>-optee.bin
-
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
-
-
Power-cycle the board. The target now boots from the NAND.
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 NAND:
=> update fsbl1 usb 0 tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fsbl2 usb 0 tf-a-ccmp15-dvk-<ram_size>-nand.stm32 => update fip-a usb 0 fip-ccmp15-dvk-<ram_size>-optee.bin => update fip-b usb 0 fip-ccmp15-dvk-<ram_size>-optee.bin
-
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
-
-
Power-cycle the board. The target now boots from the NAND.