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 in USB debug mode
Requirements
-
Linux host computer.
-
Root/administrator permissions on your host computer.
For the ConnectCore 6UL SBC Pro:
-
A USB serial cable for the console.
-
A micro USB cable for recovery.
Instructions
-
Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/digiembeddedyocto/5.0/r3/images/ccimx6ulsbc/x11/
See U-Boot files by variant to verify which U-Boot binary you need. -
Download the latest Universal Update Utility (UUU), a software tool from NXP.
UUU version should be v1.5.11 or higher. -
Place the
uuuexecutable in a directory in your PATH, such as/usr/bin. -
Install
udevrules to allow any user to runuuuto access the USB port:$ sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules" $ sudo udevadm control --reload -
Connect a USB serial cable to your host computer and the other end to the target CONSOLE connector.
-
Connect a micro USB cable to your host computer and the other end to the target USB recovery connector (USB OTG on the ConnectCore 6UL SBC Pro).
-
Change the boot mode configuration to boot from USB. To do so, close the BOOT jumper near the CONSOLE connector.
-
Open a serial terminal at 115200/8/n/1.
-
Power up the board.
-
On the host computer, run the uuu tool with the U-Boot file to boot as parameter. For example:
$ uuu </path/to/u-boot-file>When TrustFence support is enabled, Digi Embedded Yocto builds a special signed U-Boot file u-boot-dtb-usb-signed-ccimx6ulsbc.imx. Use this file to recover a closed device from USB.The serial terminal shows the device starting U-Boot.
When booting in USB recovery mode, U-Boot runs the command in variable bootcmd_mfg, which runsfastbootcommand by default, to await commands from the USB port. Press Ctrl+C to get the U-Boot prompt. -
Once you have booted U-Boot, you can proceed to re-program U-Boot into the NAND. See Re-program U-Boot in the NAND.
Re-program U-Boot in the NAND
Once U-Boot is running, you can use it to update the bootloader in the NAND:
-
Reset the environment to default values:
=> env default -a -
Reset to the default partition table into the NAND:
=> run partition_nand_linux -
Save the environment with
saveenv. -
Use one of the following methods to update the files to the NAND:
Re-program bootloader from USB using Fastboot
To update U-Boot via USB device using uuu and the Fastboot protocol:
-
Connect a micro USB cable to your host computer and the other end to the target USB recovery connector (USB OTG on the ConnectCore 6UL SBC Pro).
-
Then, on the target, run the
fastbootcommand from the U-Boot console, selecting the USB interface you want it to listen to:=> fastboot 0 -
On the host, run uuu to update U-Boot into the NAND:
$ uuu FB: ucmd setenv fastboot_buffer \${loadaddr} $ uuu FB: ucmd setenv forced_update 1 $ uuu FB: download -f <file> $ uuu FB: ucmd update uboot ram \${fastboot_buffer} \${fastboot_bytes} -
Change the boot source configuration to boot from the internal NAND. To do so, remove the BOOT MODE jumper.
-
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 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 the Ethernet port.
-
Run the following command to update U-Boot into the NAND:
=> update uboot tftp <u-boot-filename>.imx -
Change the boot source configuration to boot from the internal NAND. To do so, remove the BOOT MODE jumper.
-
Power-cycle the board. The target now boots from the NAND.
Re-program 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:
=> update uboot mmc 0 fat <u-boot-filename>.imx -
Change the boot source configuration to boot from the internal NAND. To do so, remove the BOOT MODE jumper.
-
Power-cycle the board. The target now boots from the NAND.