| 1 | [[PageOutline]] |
| 2 | |
| 3 | = i.MX6 boot ROM = |
| 4 | The i.MX6 has a small internal firmware application referred to as the 'boot ROM' that supports booting from a set of devices such as: |
| 5 | * NAND flash |
| 6 | * SPI flash |
| 7 | * SATA |
| 8 | * MMC |
| 9 | |
| 10 | On Gateworks Ventana boards, the boot ROM gets its configuration regarding what device to boot from and details of that device from one-time-programmable (OTP) eFUSE's in the i.MX6 pre-configured at the factory. The fuses are configured depending on the specific product: |
| 11 | * NAND FLASH (most common case) |
| 12 | * SPI FLASH (for boards with SPI FLASH) |
| 13 | * micro-SD (For boards without FLASH) |
| 14 | |
| 15 | |
| 16 | == Booting from Serial Downloader == |
| 17 | The i.MX6 boot ROM supports a serial protocol through USB OTG which will be used if the boot ROM fails to boot off its configured device (via a watchdog). Additionally you can force booting to the serial downloader using the user pushbutton on the board (present on most Ventana models). See [wiki:ventana/serial_downloader here] for more details. |
| 18 | |
| 19 | == Booting from an alternate storage device == |
| 20 | It is possible to boot an OS from a storage device other than the default one dictated by the i.MX6 eFUSE settings in a couple of ways. Note that all of these methods still boot directly to the device dictated by the eFUSE settings but then alter its boot-path at some point afterwards depending on your needs: |
| 21 | * configure U-Boot to boot the OS from the removable storage via bootloader environment scripts: The default U-Boot scripts will load the bootscript, kernel, and device-tree from various locations depending on configuration. By default removable storage will be checked first and used. Therefore if you have placed a bootscript and/or kernel on a USB storage device for example, it will be used. In this fashion the [wiki:ventana/SPL SPL] and bootloader come from the primary boot device (typically NAND flash) but the bootscript, kernel, device-tree, and rootfs are on an alternate storage device. |
| 22 | * use the bootloader 'bmode' command to boot from an alternate boot device. This command writes over the volatile BOOT_CFG shadow registers (which are read from eFUSE on power-up) and does a soft-reset acting like the eFUSE settings were configured for an alternate device. This method would be desirable if you want boot an SPL and bootloader located on and alternate storage device. In essense you are 'bootstraping' from the on-board flash bootloader to the bootloader on the alternate media. Keep in mind that it is typically not a good idea to try to version control your SPL as the SPL is in charge of memory controller configuration and from time to time this gets updated for changes in memory parts on boards in such a way that using an older SPL may make the memory un-reliable. If you need to version control your SPL please keep abreast of all changes in U-Boot made by Gateworks by joining the Board Support Maillist. |
| 23 | |
| 24 | Examples: |
| 25 | * boot to MMC: |
| 26 | {{{#!bash |
| 27 | bmode esdhc3 |
| 28 | }}} |
| 29 | |
| 30 | For more information: |
| 31 | * [wiki:ventana/SPL SPL] |
| 32 | * [wiki:ventana/bootloader#SPL Updating the SPL] |