USB OTG Boot - FrankBau/meta-marsboard-bsp GitHub Wiki

With USB-OTG Boot, an iMX6 board can be booted from a Linux host (or Windows) via a mini-USB cable. This is very handy during development and for "unbricking" a board, e.g. when the on-board boot media are corrupted or need update.

Prerequisites:

Set Boot Mode Switch SW1 into Boot via USB-OTG Position: Jumper 1: OFF (towards the iMX) Jumper 2: ON (towards the network plug)

Connect USB-OTG Port to Host PC (tested with Ubuntu 14).

Reset or power-on MarS Board.

Note: If U-Boot finds a valid Linux on the microSD card (or the eMMC), it might do its job and boot Linux before you have a chance to stop it doing so. Do not yet insert a microSD card. Optionally use a second USB cable for a serial terminal connection (see below) and stop U-Boot boot process by quickly hitting the space key.

Enter command on host PC shell (assuming that imx_usb is on the path and you are in the u-boot.imx folder):

sudo imx_usb u-boot.imx

The usb loader will output:

loading binary file(...) to 177fb000, skip=0, fsize=48104 type=aa
<<<295172, 295172 bytes>>>
succeeded (status 0x88888888)
jumping to 0x177fb000

Now, remove the mini-USB connector from MarSBoard USB-OTG and connect it to serial ("debug") console port of the MarS Board (or: use a second cable).

Enter the following command (where /dev/ttyUSB0 is the “serial” port on the Host PC side):

$ sudo minicom -D /dev/ttyUSB0
  • A terminal window opens. When you now press enter, you are in the U-Boot:

    MarsBoard > MarsBoard > ver U-Boot 2013.04 (Oct 04 2014 - 17:42:32) arm-poky-linux-gnueabi-gcc (GCC) 4.8.2 GNU ld (GNU Binutils) 2.24

Booting Linux, update U-Boot, etc.

Now, from the u-boot shell its possible to