> For the complete documentation index, see [llms.txt](https://dev.solid-run.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.solid-run.com/nxp/imx6/sbc-platform/imx6-other-articles/boot-from-usb-otg-imx6.md). Agents can also search and read this documentation through its [MCP server](https://dev.solid-run.com/~gitbook/mcp).

# Boot from USB OTG - i.MX6

## Revisions and Notes

| **Date**    | **Owner** | **Revision** | **Notes**       |
| ----------- | --------- | ------------ | --------------- |
| 23 Feb 2022 |           | 1.0          | Initial release |

## Introduction

The following documentation provides a quick guide to boot from USB OTG port.

## Step-by-step

1\. Clone a repository to install and build **imx\_usb\_loader** application by run the follwoing:

```
git clone https://github.com/boundarydevices/imx_usb_loader.git
cd imx_usb_loader
make  
```

* **imx\_usb\_loader :** This application implements the Serial Download Protocol that the i.MX6 Boot-ROM uses to communicate. It is available on [github account of boundarydevices](https://github.com/boundarydevices/imx_usb_loader).
* The final binary is called **imx\_usb** and can be executed in place.

2\. Install SPL & U-Boot binaries:

```
wget https://solid-run-images.sos-de-fra-1.exo.io/IMX6/U-Boot/v2018.01/spl-imx6-sdhc.bin
wget https://solid-run-images.sos-de-fra-1.exo.io/IMX6/U-Boot/v2018.01/u-boot-imx6-sdhc.img
```

* You can Install U-Boot & SPL binaries from [SolidRun Images](https://images.solid-run.com/IMX6/U-Boot/) site.

3\. Serial connection

Please see our pages [Cubox-i](https://dev.solid-run.com/nxp/imx6/sbc-platform/cubox-i-quick-start-guide.md#booting-from-an-sd-card), [HummingBoard Edge](https://dev.solid-run.com/nxp/imx6/sbc-platform/hummingboard-imx6-sbc-quick-start-guide/hummingboard-edge-quick-start-guide.md#booting-from-an-sd-card) under serial connection section.

4\. Connect your Male to Male USB-A cable to the OTG port on your device.

{% hint style="info" %}
**Identify the OTG port** To quote our developer Jon: “it is the top port next to the Ethernet jack” More formally it is the top port on the U5 header. This holds true of all our i.MX6 based boards.
{% endhint %}

* Make sure you can detect the USB = NXP Semiconductors in the usb devices list with the exact same vendor ID as shown in the following example:

![](https://1160211108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCsmHoAD7oNPYQbYxSWHU%2Fuploads%2Fgit-blob-64b7ff3db80440fce2fa572cda62d0ddeb92b93c%2Fimage-20220223-145818.png?alt=media)

5\. Run the script imx\_usb exec with the SPL to load SPL:

```
sudo ./imx_usb spl-imx6-sdhc.bin
```

**On success, SPL should announce itself on the serial console:**

![](https://1160211108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCsmHoAD7oNPYQbYxSWHU%2Fuploads%2Fgit-blob-4f5a2e8f33fa7e74119daa7bf5520d0e243c60b4%2Fimage-20220223-150627.png?alt=media)

6\. Run the script imx\_usb exec with the U-Boot to load U-Boot :

```
sudo ./imx_usb u-boot-imx6-sdhc.img
```

**On success, U-Boot should announce itself on the serial console:**

![](https://1160211108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCsmHoAD7oNPYQbYxSWHU%2Fuploads%2Fgit-blob-d3fd39b55ebd81238941528dad08b2044975fc54%2Fimage-20220228-082434.png?alt=media)

{% hint style="success" %}
**Success Indicator for Cubox-i**\
The Cubox-i has an LED that is off by default and turned on by u-boot. So if the LED turns red, U-Boot was loaded successfully.
{% endhint %}

At this point U-Boot has been loaded to RAM and is running.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.solid-run.com/nxp/imx6/sbc-platform/imx6-other-articles/boot-from-usb-otg-imx6.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
