# robertferanec/imx6tinyrex_uboot_v2014_10 architecture

> Architecture diagram of the GitHub repository robertferanec/imx6tinyrex_uboot_v2014_10, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/robertferanec/imx6tinyrex_uboot_v2014_10
- Repository: https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10

## Overview

This repository is a U-Boot 2014.10 firmware tree customized for Voipac TinyRex i.MX6 Solo, DualLite, and Quad boards. Its principal workflow is platform startup and hardware initialization, followed by U-Boot runtime services that let an operator select and boot an image. A separate documented runtime feature exposes a block device over USB mass storage. The tree also includes other CPU and SoC implementations; sampled code supports the USB flow and selected hardware components, but does not establish the complete boot-command call chain.

Main entry points: [`common/cmd_usb_mass_storage.c`](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/cmd_usb_mass_storage.c) (UMS command), [`drivers/usb/gadget/f_mass_storage.c`](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/usb/gadget/f_mass_storage.c) (USB gadget transport), [`arch/arm/imx-common/spl.c`](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/imx-common/spl.c) (Early boot), [`common`](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/tree/master/common) (U-Boot runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Platform startup"]
  node_mx6cpu["i.MX6 CPU setup<br/>[soc.c]"]
  node_mx6clock["i.MX6 clocks<br/>[clock.c]"]
  node_mx6ddr["i.MX6 DDR<br/>[ddr.c]"]
  node_spl["Early boot<br/>[spl.c]"]
end

subgraph group_runtime["Boot services"]
  node_uboot["U-Boot runtime"]
  node_bootimage["Boot image"]
  node_api["Application API<br/>[api.c]"]
  node_storageapi["Storage enumeration<br/>[api_storage.c]"]
end

subgraph group_usb["USB mass storage"]
  node_umscommand["UMS command"]
  node_gadget["USB gadget transport<br/>[f_mass_storage.c]"]
  node_storagecommon["SCSI definitions<br/>[storage_common.c]"]
  node_umsbackend["Block callbacks"]
end

subgraph group_hardware["Hardware support"]
  node_blockdevice[("Block device")]
  node_socfpga["SoCFPGA support"]
  node_ddrfsl["Freescale DDR<br/>[main.c]"]
  node_usbhoststorage["USB storage driver<br/>[usb_storage.c]"]
end

node_power(("Board power-on"))
node_operator(("Operator"))
node_usbhost(("USB host"))

node_power -->|"starts"| node_spl
node_spl -->|"initializes"| node_mx6cpu
node_spl -->|"initializes"| node_mx6clock
node_spl -->|"initializes"| node_mx6ddr
node_operator -->|"uses"| node_uboot
node_uboot -->|"boots"| node_bootimage
node_uboot -->|"provides"| node_api
node_api -->|"enumerates"| node_storageapi
node_operator -->|"invokes"| node_umscommand
node_umscommand -->|"selects"| node_blockdevice
node_umscommand -->|"initializes"| node_gadget
node_umscommand -->|"initializes device mode"| node_usbhost
node_umscommand -->|"dispatches"| node_gadget
node_gadget -->|"uses definitions"| node_storagecommon
node_gadget -->|"reads and writes"| node_umsbackend
node_umsbackend -->|"reads and writes"| node_blockdevice
node_usbhost -->|"transfers commands"| node_gadget
node_usbhost -->|"connects"| node_usbhoststorage
node_socfpga -.->|"configures platform hardware"| node_power
node_ddrfsl -.->|"supports memory setup"| node_blockdevice

click node_mx6cpu "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/soc.c"
click node_mx6clock "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/clock.c"
click node_mx6ddr "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/ddr.c"
click node_spl "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/imx-common/spl.c"
click node_uboot "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/tree/master/common"
click node_api "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/api/api.c"
click node_storageapi "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/api/api_storage.c"
click node_umscommand "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/cmd_usb_mass_storage.c"
click node_gadget "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/usb/gadget/f_mass_storage.c"
click node_storagecommon "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/usb/gadget/storage_common.c"
click node_umsbackend "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/cmd_usb_mass_storage.c"
click node_socfpga "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/tree/master/arch/arm/cpu/armv7/socfpga"
click node_ddrfsl "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/ddr/fsl/main.c"
click node_usbhoststorage "https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/usb_storage.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mx6cpu,node_mx6clock,node_mx6ddr,node_spl toneBlue
class node_uboot,node_bootimage,node_api,node_storageapi toneAmber
class node_umscommand,node_gadget,node_storagecommon,node_umsbackend toneMint
class node_blockdevice,node_socfpga,node_ddrfsl,node_usbhoststorage toneRose
class node_power,node_operator,node_usbhost toneIndigo
```

## Components

### Platform startup

- [i.MX6 CPU setup](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/soc.c): `arch/arm/cpu/armv7/mx6/soc.c`
- [i.MX6 clocks](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/clock.c): `arch/arm/cpu/armv7/mx6/clock.c`
- [i.MX6 DDR](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/cpu/armv7/mx6/ddr.c): `arch/arm/cpu/armv7/mx6/ddr.c`
- [Early boot](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/arch/arm/imx-common/spl.c): `arch/arm/imx-common/spl.c`

### Boot services

- [U-Boot runtime](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/tree/master/common): `common`
- **Boot image**
- [Application API](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/api/api.c): `api/api.c`
- [Storage enumeration](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/api/api_storage.c): `api/api_storage.c`

### USB mass storage

- [UMS command](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/cmd_usb_mass_storage.c): `common/cmd_usb_mass_storage.c`
- [USB gadget transport](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/usb/gadget/f_mass_storage.c): `drivers/usb/gadget/f_mass_storage.c`
- [SCSI definitions](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/usb/gadget/storage_common.c): `drivers/usb/gadget/storage_common.c`
- [Block callbacks](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/cmd_usb_mass_storage.c): `common/cmd_usb_mass_storage.c`

### Hardware support

- **Block device**
- [SoCFPGA support](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/tree/master/arch/arm/cpu/armv7/socfpga): `arch/arm/cpu/armv7/socfpga`
- [Freescale DDR](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/drivers/ddr/fsl/main.c): `drivers/ddr/fsl/main.c`
- [USB storage driver](https://github.com/robertferanec/imx6tinyrex_uboot_v2014_10/blob/master/common/usb_storage.c): `common/usb_storage.c`

### Other components

- **Board power-on**
- **Operator**
- **USB host**

## Connections

- Board power-on → Early boot: starts
- Early boot → i.MX6 CPU setup: initializes
- Early boot → i.MX6 clocks: initializes
- Early boot → i.MX6 DDR: initializes
- Operator → U-Boot runtime: uses
- U-Boot runtime → Boot image: boots
- U-Boot runtime → Application API: provides
- Application API → Storage enumeration: enumerates
- Operator → UMS command: invokes
- UMS command → Block device: selects
- UMS command → USB gadget transport: initializes
- UMS command → USB host: initializes device mode
- UMS command → USB gadget transport: dispatches
- USB gadget transport → SCSI definitions: uses definitions
- USB gadget transport → Block callbacks: reads and writes
- Block callbacks → Block device: reads and writes
- USB host → USB gadget transport: transfers commands
- USB host → USB storage driver: connects
- SoCFPGA support → Board power-on: configures platform hardware
- Freescale DDR → Block device: supports memory setup
