1 | | {{{#!html |
2 | | <div id="wikipage" class="trac-content"><p> |
3 | | </p><div class="wiki-toc"> |
4 | | <ol> |
5 | | <li> |
6 | | <a href="#Ventanai.MX6SerialDownloader">Ventana i.MX6 Serial Downloader</a> |
7 | | <ol> |
8 | | <li> |
9 | | <a href="#i.MX6SerialDownloader">i.MX6 Serial Downloader</a> |
10 | | <ol> |
11 | | <li> |
12 | | <a href="#imx_usb_loaderInstructions">imx_usb_loader Instructions</a> |
13 | | </li> |
14 | | </ol> |
15 | | </li> |
16 | | </ol> |
17 | | </li> |
18 | | </ol> |
19 | | </div><p> |
20 | | </p> |
21 | | <h1 id="Ventanai.MX6SerialDownloader">Ventana i.MX6 Serial Downloader</h1> |
22 | | <h2 id="i.MX6SerialDownloader">i.MX6 Serial Downloader</h2> |
23 | | <p> |
24 | | The i.MX6 has an internal boot ROM that handles the first boot stage in order to be able to boot from a variety of devices (uSD, NAND, NOR, SPI, SATA, etc). One of the boot devices, referred to as the 'serial downloader' provides an API over USB OTG therefore an application can reside on a host PC that will can control the boot of the i.MX6. During the internal ROM's boot, a watchdog is used such that a corrupt or non-existent boot media will result in using this serial downloader. This may be useful if you are working with a board that has an unprogrammed or misprogrammed |
25 | | </p> |
26 | | <p> |
27 | | <strong>Note that this is not useful when using the 2-stage SPL bootloader. While you can use the serial downloader to boot the SPL, you will not end up with a fully functional bootloader as the SPL will be trying to load u-boot.img from NAND which if not programmed leaves you hanging.</strong> If you are looking for a method to 'unbrick' a board that has been misprogrammed, use <a class="wiki" href="/wiki/jtag_instructions">JTAG programming</a> instead. |
28 | | </p> |
29 | | <p> |
| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Ventana i.MX6 Serial Downloader |
| 4 | The i.MX6 has an internal boot ROM that handles the first boot stage in order to be able to boot from a variety of devices (uSD, NAND, NOR, SPI, SATA, etc). One of the boot devices, referred to as the 'serial downloader' provides an API over USB OTG. Therefore an application can reside on a host PC that will can control the boot of the i.MX6 as long as you can get the i.MX6 to boot in this mode referred to as 'BOOT_MODE0'. During the internal ROM's boot, a watchdog is used such that a corrupt or non-existent boot media will result in using this serial downloader. This may be useful if you are working with a board that has an unprogrammed or misprogrammed FLASH device. |
| 5 | |
| 6 | Note that this is not useful when using the 2-stage SPL bootloader. While you can use the serial downloader to boot the SPL, you will not end up with a fully functional bootloader as the SPL will be trying to load u-boot.img from NAND which if not programmed leaves you hanging. If you are looking for a method to 'unbrick' a board that has been mis-programmed, use JTAG programming instead. |
| 7 | |
56 | | </p> |
57 | | <ol><li>Connect <strong>LINUX PC</strong> Host USB to microB OTG connector on Ventana Board |
58 | | </li><li>Hold down small pushbutton on Ventana Board |
59 | | </li><li>Apply board power then release pushbutton |
60 | | </li><li>Check your Linux PC Command Line and type lsusb - You will see a Freescale device show up in lsusb on desktop PC showing that the Ventana Board is connected to the PC (example shown) |
61 | | <pre class="wiki">$ lsusb |
| 28 | 1. Connect LINUX PC Host USB to microB OTG connector on Ventana Board |
| 29 | 1. Check your Linux PC Command Line and type {{{lsusb}}} - You will see a Freescale device show up in lsusb on desktop PC showing that the Ventana Board is connected to the PC (example shown) |
| 30 | {{{#!bash |
| 31 | $ lsusb |
68 | | </p> |
69 | | <ul><li>Note you may need to run as root if you don't have permissions for the USB device |
70 | | </li></ul><p> |
71 | | Example of proper output: |
72 | | </p> |
73 | | <pre class="wiki">$ imx_usb image.imx |
74 | | No "_" environment variable |
75 | | argc == 2, argv == 0x7fffecc4f048 |
76 | | base == 0x608220:./imx_usb |
77 | | trailing slash == 0x608221:/imx_usb |
78 | | conf_path == ./ |
79 | | config file <./imx_usb.conf> |
80 | | No "_" environment variable |
81 | | argc == 2, argv == 0x7fffecc4f048 |
82 | | base == 0x608220:./imx_usb |
83 | | trailing slash == 0x608221:/imx_usb |
84 | | conf_path == ./ |
85 | | config file <./mx6_usb_work.conf> |
86 | | parse mx6_usb_work.conf |
87 | | 15a2:0061(mx6_qsb) bConfigurationValue =1 |
88 | | Interface 0 claimed |
89 | | report 1, wrote 16 bytes, err=0 |
90 | | report 3, read 4 bytes, err=0 |
91 | | read=56 78 78 56 |
92 | | ../u-boot_gw53xx.imx 0 0 1 0 1 2 |
93 | | main dcd length 310 |
94 | | sub dcd length 30c |
95 | | dcd_ptr=0x177ff42c |
96 | | |
97 | | loading binary file(image.imx) to 177ff400, skip=0, fsize=80c00 type=aa |
98 | | |
99 | | <<<527360, 527360 bytes>>> |
100 | | jumping to 0x177ff400 |
101 | | </pre |
| 34 | * if you fail to see this you are not in serial downloader mode |
| 35 | 1. execute the imx_usb_loader with the argument of the IMX6 bootable image: |
| 36 | {{{#!bash |
| 37 | cd imx_usb_loader ;# must be in the directory with its config files imx_usb image.imx ;# boot image |