Recover your device
USB debug mode 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 the USB device port.
Note If you install the Digi Embedded Yocto SDK in a location other than the default location, you must use the -c parameter to specify the directory containing the configuration files.
Use the following syntax, replacing $SDK_FOLDER with the name of the non-standard folder where the SDK was installed:
imx_usb -c ${SDK_FOLDER}/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb -c ${SDK_FOLDER}/sysroots/x86_64-deysdk-linux/etc/imx-loader.d/
To boot in USB debug mode and restore the bootloader, follow these steps:
Requirements:
- Linux host computer
- Root/Administrator permissions on your development computer
- USB serial cable
- Micro USB cable
Boot U-Boot in USB debug mode
- Install the SDK toolchain. See Application development.
- Connect the USB serial cable to the CONSOLE connector on the board and to your host computer.
-
Connect the micro USB cable to the USB device port of the board (bottom layer, under the USB host connectors).
- Close the BOOT jumper near the CONSOLE connector.
- Power up the board.
- Open a serial terminal at 115200/8/n/1.
- On the host computer, as root, run the imx_usb tool installed with the SDK toolchain with the U-Boot file to boot as parameter. For example:
sudo /opt/dey/2.2-r3/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb /mypath/u-boot-ccimx6ulsbc.imxThe serial terminal shows the device starting U-Boot.
Boot via USB on a closed device
With TrustFence enabled, signed U-Boot images are created. In order to boot signed U-Boot images on a closed device, you must configure the imx_usb application provided with Digi Embedded Yocto as follows:
- Modify the mx6_usb_work.conf configuration under /opt/dey/2.2-r3/sysroots/x86_64-deysdk-linux/etc/imx-loader.d/, adding the following lines:
/path/to/u-boot.imx:dcd /path/to/u-boot-usb-signed.imx:no_clear_boot_data,jump headerReplace /path/to/u-boot.imx with the path to the unsigned u-boot image and /path/to/u-boot-signed-usb.imx with the path to the signed USB bootable image.
- Execute the imx_usb_loader tool without a U-Boot image argument:
sudo /opt/dey/2.2-r3/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb
Update U-Boot in the NAND flash
Once U-Boot is running, you can use it to update the bootloader in the NAND flash:
Update bootloader from Ethernet (TFTP)
- Place the U-Boot binary 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 ENET1 Ethernet port (beside the USB connector).
- Run the following command to update U-Boot into the NAND flash:
=> update uboot tftp <u-boot-filename>
- Remove BOOT jumper and power-cycle the device. The target now boots from the NAND flash.
Update bootloader from microSD card
- Place the U-Boot binary inside a FAT-formatted microSD card.
- Insert the microSD card in the board.
- Run the following command to update U-Boot into the NAND flash:
=> update uboot mmc 0 fat <u-boot-filename>
- Remove BOOT jumper and power-cycle the device. The target now boots from the NAND flash.