Difference between revisions of "BootStrap"
From ArmadeusWiki
(Re-org) |
|||
Line 1: | Line 1: | ||
Instructions to use the Armadeus U-Boot recovery utility. | Instructions to use the Armadeus U-Boot recovery utility. | ||
− | If you think you bricked your board by flashing a bad bootloader, don't worry: there is a solution to recover it, without a JTAG probe. Indeed i.MX | + | If you think you bricked your board by flashing a bad bootloader, don't worry: there is a solution to recover it, without a JTAG probe. Indeed i.MX processors have an internal "bootstrap" mode that allow them to communicate through RS-232 or USB just after a reset. |
==Introduction== | ==Introduction== | ||
Line 10: | Line 10: | ||
</pre> | </pre> | ||
− | This utility communicates with the i.MX(L/27/28/51) processor while in ''bootstrap mode'' (See i.MX(L/27/28/51) Reference Manual for more informations). | + | This utility communicates with the i.MX(L/27/28/51/6) processor while in ''bootstrap mode'' (See i.MX(L/27/28/51/6) Reference Manual for more informations). |
* To enter the bootstrap mode, you have to put the bootstrap jumper and reset your Armadeus board: <br> | * To enter the bootstrap mode, you have to put the bootstrap jumper and reset your Armadeus board: <br> | ||
Line 18: | Line 18: | ||
|| [[Image:bootstrap_jumper_apf51.jpg|thumb|right|On the [[APF51Dev]]]] | || [[Image:bootstrap_jumper_apf51.jpg|thumb|right|On the [[APF51Dev]]]] | ||
|| [[Image:bootstrap_jumper_apf28dev.jpg|thumb|right|On the [[APF28Dev]]]] | || [[Image:bootstrap_jumper_apf28dev.jpg|thumb|right|On the [[APF28Dev]]]] | ||
+ | || [[Image:bootstrap_jumper_apf6dev.jpg|thumb|right|On the [[APF6Dev]]]] | ||
|---------------- | |---------------- | ||
|} | |} | ||
Line 23: | Line 24: | ||
==Usage== | ==Usage== | ||
* '''Quit all Kermit/Minicom/GTKTerm/Hyperterminal sessions connected to the board through Serial Port.''' | * '''Quit all Kermit/Minicom/GTKTerm/Hyperterminal sessions connected to the board through Serial Port.''' | ||
− | *Go inside the ''software/uboot_recover/'' directory and launch (sudo usage is only required on APF28 | + | *Go inside the ''software/uboot_recover/'' directory and launch (sudo usage is only required on [[APF28]], [[APF51]] and [[APF6]]): |
<pre class="host"> | <pre class="host"> | ||
− | $ sudo python apfXX_recover.py (XX depends on the version of your board (ie: 9328, 27, 28 | + | $ sudo python apfXX_recover.py (XX depends on the version of your board (ie: 9328, 27, 28, 51 or 6)) |
</pre> | </pre> | ||
*The tool will ask you to specify the serial port on which the board is connected. Under Linux please use ''/dev/ttySx'' or ''/dev/ttyUSBx'' and under Window$ use COMx. | *The tool will ask you to specify the serial port on which the board is connected. Under Linux please use ''/dev/ttySx'' or ''/dev/ttyUSBx'' and under Window$ use COMx. | ||
− | *Then the size of the SDRAM has to be indicated. Default value is 16Mo for the [[APF9328]] and 64Mo for the [[APF27]]. Not required on [[APF51]]. | + | *Then the size of the SDRAM has to be indicated. Default value is 16Mo for the [[APF9328]] and 64Mo for the [[APF27]]. Not required on [[APF51]] & [[APF6]]. |
*The tool will then try to synchronize with the i.MX (on APF9328 only). When you see that message, reset your board: | *The tool will then try to synchronize with the i.MX (on APF9328 only). When you see that message, reset your board: | ||
<pre class="host"> | <pre class="host"> | ||
Line 46: | Line 47: | ||
{| border="1" cellpadding="5" cellspacing="0" summary="Recovery final messages" | {| border="1" cellpadding="5" cellspacing="0" summary="Recovery final messages" | ||
|- style="background:#efefef;" | |- style="background:#efefef;" | ||
− | ! '''APF9328''' || '''APF27''' || '''APF51''' || '''APF28''' | + | ! '''APF9328''' || '''APF27''' || '''APF51''' || '''APF28''' || '''APF6''' |
|---------------- | |---------------- | ||
||<pre class="host"> | ||<pre class="host"> | ||
Line 78: | Line 79: | ||
BIOS>uBoot successfully recovered ! | BIOS>uBoot successfully recovered ! | ||
</pre> | </pre> | ||
+ | || | ||
+ | |||
|| | || | ||
Revision as of 11:21, 23 December 2014
Instructions to use the Armadeus U-Boot recovery utility.
If you think you bricked your board by flashing a bad bootloader, don't worry: there is a solution to recover it, without a JTAG probe. Indeed i.MX processors have an internal "bootstrap" mode that allow them to communicate through RS-232 or USB just after a reset.
Introduction
- The uboot_recover tool is a Python piece of code that allows you to automatically install a new U-Boot from scratch or to recover it in case of failure. uboot_recover requires the python and pyserial packages to be installed on your PC:
$ sudo apt-get install python-serial python-usb
This utility communicates with the i.MX(L/27/28/51/6) processor while in bootstrap mode (See i.MX(L/27/28/51/6) Reference Manual for more informations).
- To enter the bootstrap mode, you have to put the bootstrap jumper and reset your Armadeus board:
Usage
- Quit all Kermit/Minicom/GTKTerm/Hyperterminal sessions connected to the board through Serial Port.
- Go inside the software/uboot_recover/ directory and launch (sudo usage is only required on APF28, APF51 and APF6):
$ sudo python apfXX_recover.py (XX depends on the version of your board (ie: 9328, 27, 28, 51 or 6))
- The tool will ask you to specify the serial port on which the board is connected. Under Linux please use /dev/ttySx or /dev/ttyUSBx and under Window$ use COMx.
- Then the size of the SDRAM has to be indicated. Default value is 16Mo for the APF9328 and 64Mo for the APF27. Not required on APF51 & APF6.
- The tool will then try to synchronize with the i.MX (on APF9328 only). When you see that message, reset your board:
Re-synchronizing... Please reset your board in bootstrap mode ! Please reset your board in bootstrap mode ! Please reset your board in bootstrap mode ! Please reset your board in bootstrap mode !
- Then you can specify whether the environment variables (IP, your special scripts...) have to be erased or not. If your board does not start anymore after a first uboot_recover, please respond 'y'.
- The following messages are then displayed:
APF9328 | APF27 | APF51 | APF28 | APF6 |
---|---|---|---|---|
loading file ramprogrammer.bin. Please wait... 284 octets Loading file u-boot.bin. Please wait... 150304 octets loading file flashprogrammer.bin. Please wait... 668 octets Flashing please wait... . uBoot successfully recovered ! |
run flash_uboot device 0 offset 0x0, size 0xa0000 nand_unlock: start: 00000000, length: 655360! NAND flash successfully unlocked NAND erase: device 0 offset 0x0, size 0xa0000 OK NAND write: device 0 offset 0x0, size 0xa0000 655360 bytes written: OK NAND flash successfully locked device 0 offset 0xa0000, size 0x7f60000 nand_unlock: start: 000a0000, length: 133562368! NAND flash successfully unlocked Flashing of uboot succeed BIOS>uBoot successfully recovered ! |
Note: If all went fine, don't forget to remove the bootstrap jumper if you want to restart the board in its normal boot state |