This page is how to recover ("unbrick") a broken [[BeagleBoard]]. It should help you if you messed your boot configuration and BeagleBoard doesn't boot any more the normal way ("bricked").

This page is how to recover ("unbrick") a broken [[BeagleBoard]]. It should help you if you messed your boot configuration and BeagleBoard doesn't boot any more the normal way ("bricked").

+

+

=Symptoms=

+

+

Normally, if you boot from MMC, you will get something like

+

+

...40T...

+

+

in terminal program connected to UART (115200 8N1). This is output from OMAP3's bootrom while scanning the UART for boot source before trying to boot from MMC card. If you don't get this, but want to boot from MMC, most probably bootrom doesn't reach the MMC boot stage any more. If you played with NAND before getting this, most probably NAND contains some broken content.

=What has happened?=

=What has happened?=

Line 11:

Line 19:

in this order. Depending on the boot medium (e.g. [[BeagleBoard#MMC.2FSD_boot|MMC]]) this might fail if something bad is in NAND flash which confuses OMAP3 bootrom thus stopping it to reach MMC boot stage.

in this order. Depending on the boot medium (e.g. [[BeagleBoard#MMC.2FSD_boot|MMC]]) this might fail if something bad is in NAND flash which confuses OMAP3 bootrom thus stopping it to reach MMC boot stage.

This might happen if you e.g. mess your NAND, e.g. something went wrong with [[BeagleBoardNAND|NAND boot]].

+

+

=What to do now?=

+

+

First, we have to press [[BeagleBoard#User_button|user button]] at power up to switch boot order to

+

+

USB -> UART -> MMC -> NAND

+

+

to have option to boot from other sources than broken NAND (which is first if user button is not pressed).

+

+

Then, there are three options to boot from:

+

+

* MMC

+

* USB

+

* UART

+

+

Below, MMC and USB recovery will be done in detail. The goal is to get a [[BeagleBoard#U-Boot|U-Boot]] prompt and then to erase the non-booting NAND.

+

+

==MMC recovery==

+

+

For the most up to date instruction to restore any BeagleBoard version SD card to the factory image see the [http://circuitco.com/support/index.php?title=Circuitco_Support_Wiki CircuitCo Wiki].

+

+

The procedure to put your board into the "factory fresh state" used on all boards being made now is at http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation. The original recovery method is described below.

+

+

MMC recovery ''should'' be straight forward. Press [[BeagleBoard#User_button|user button]] at power up and according to above boot order MMC boot is before NAND. With this, we should be able to boot as we did without pressing the user button before bricking the board. ''But'':

+

+

There are some [http://groups.google.com/group/beagleboard/msg/73e65f2d58abb19a broken MLO] (x-loader) out there which fail to boot if something wrong is in NAND. E.g.:

This seems to happen with both MLO's from [http://code.google.com/p/beagleboard/wiki/BeagleSourceCode Beagle source code page] (381MHz and 500MHz one) independent of U-Boot version.

+

+

Thus, you have to use a special (?) MLO for recovery to get a U-Boot prompt. Replacing MLO used above on MMC/SD card with this [http://beagleboard.googlecode.com/files/MLO_revc_v3 recovery MLO] we get a U-Boot prompt while pressing the user button at power up:

+

+

...40T.........

+

+

Texas Instruments X-Loader 1.41

+

Starting on with MMC

+

Reading boot sector

+

+

150832 Bytes Read from MMC

+

Starting OS Bootloader from MMC...

+

+

U-Boot 1.3.3 (Jun 20 2008 - 17:06:22)

+

+

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz

+

OMAP3 Beagle Board + LPDDR/NAND

+

RAM Configuration:

+

Bank #0: 80000000 128 MB

+

Bank #1: 88000000 0 kB

+

NAND: 256 MiB

+

In: serial

+

Out: serial

+

Err: serial

+

Hit any key to stop autoboot: 0

+

OMAP3 beagleboard.org #

+

+

U-Boot version doesn't seem to matter. Then you can erase NAND start:

+

+

OMAP3 beagleboard.org # nand unlock

+

device 0 whole chip

+

nand_unlock: start: 00000000, length: 268435456!

+

NAND flash successfully unlocked

+

OMAP3 beagleboard.org # nand erase 0 80000

+

+

NAND erase: device 0 offset 0x0, size 0x80000

+

Erasing at 0x60000 -- 100% complete.

+

OK

+

OMAP3 beagleboard.org #

+

+

If you now re-power your board '''without''' pressing the user button it should work as before. Happily unbricked!

+

+

Next, you can also restore the NAND flash by [http://www.hackerbliss.org/2011/06/how-to-prepare-sd-card-for-flashing.html preparing an SDCard image] that automatically flashes all software components correctly.

+

+

==MMC recovery Troubleshooting==

+

+

Some have encountered problems with trying to boot from MMC, but it wasn't booting from MMC because of a bad formating and/or copy of the MLO. This example demonstrates booting from NAND even if the user button (40T) has been pressed.

+

...40T...

+

+

Texas Instruments X-Loader 1.41

+

Starting OS Bootloader...

+

+

Instead, the correct and expected result with user button pressed is booting from MMC and this should be printed:

+

...40T...

+

+

Texas Instruments X-Loader 1.41

+

'''Starting on with MMC'''

+

Reading boot sector

+

+

150832 Bytes Read from MMC

+

Starting OS Bootloader from MMC...

+

+

If ''MMC'' is not displayed, this means that the MLO (x-loader for the MMC) has not been properly copied or the partition has not been done properly. Or simply that there is something wrong with what is on the MMC.

then after formating the '''FIRST STEP TO DO AFTER FORMATING IS TO COPY MLO'''. Which one? MLO_restore from [http://code.google.com/p/beagleboard/downloads/list Downloads list] the one previously discuss in MCC recovery section.

+

+

For u-boot we suggest to use u-boot.bin_autoflash from [http://code.google.com/p/beagleboard/downloads/list Downloads list].

See [http://elinux.org/BeagleBoard#USB_boot USB_Boot ] for a patch to x-loader to boot all the way to Linux via USB.

+

+

You can use [http://elinux.org/BeagleBoard#USB_boot USB boot utility] together with [http://git.denx.de/?p=u-boot/u-boot-v2.git;a=summary U-Boot '''V2'''] and then use U-Boot V2's loadb to load U-Boot (V1).

Now, send U-Boot (V1) binary (i.e. u-boot.bin) using kermit download of you terminal program. When this is finished:

+

+

## Total Size = 0x00023d64 = 146788 Bytes

+

+

X-load 343x> help go

+

addr [arg ...]

+

- start application at address 'addr'

+

passing 'arg' as arguments

+

+

X-load 343x> go 0x80000000

+

## Starting application at 0x80000000 ...

+

+

U-Boot 1.3.3 (Jul 6 2008 - 10:33:59)

+

+

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz

+

OMAP3 Beagle Board + LPDDR/NAND

+

RAM Configuration:

+

Bank #0: 80000000 128 MB

+

Bank #1: 88000000 0 kB

+

NAND: 256 MiB

+

In: serial

+

Out: serial

+

Err: serial

+

OMAP3 beagleboard.org #

+

+

Now, you have your U-Boot (V1) prompt. This can be used now to erase (broken) parts in NAND:

+

+

OMAP3 beagleboard.org # nand unlock

+

device 0 whole chip

+

nand_unlock: start: 00000000, length: 268435456!

+

NAND flash successfully unlocked

+

OMAP3 beagleboard.org # nand erase 0 80000

+

+

NAND erase: device 0 offset 0x0, size 0x80000

+

Erasing at 0x60000 -- 100% complete.

+

OK

+

OMAP3 beagleboard.org #

+

+

If you now re-power your board '''without''' pressing the user board it should work as before. Happily unbricked!

+

+

==UART recovery==

+

+

Note: you can download a tarball with all the tools needed [http://beagleboard.googlegroups.com/web/boot_omap3_serial.tar.bz2?gda=6HzuMUsAAAAOo3Rw1hXq3I565vW1BV_xbp3m6Kvh2_kke7Dqp180gYQjVWmPCuUNylInZEWUgK-lzxq9cExplKT6xVxNIvSaBkXa90K8pT5MNmkW1w_4BQ here].

+

+

1 - Generate an x-loader with serial support

+

mkdir serial_boot

+

cd serial_boot

+

git clone http://git.omapzoom.org/repo/u-boot.git

+

git clone http://git.omapzoom.org/repo/x-loader.git

+

cd x-loader

+

make distclean

+

make omap3430labradordownload_config

+

make

+

cd ..

+

+

now you've got an ~13k x-load.bin in the x-loader directory.

+

+

2 - Generate Nishant Menon's tools

+

git clone http://github.com/nmenon/omap-u-boot-utils.git

+

cd omap-u-boot-utils

+

make distclean

+

make

+

+

now you've got two tools: pserial and ukermit

+

+

3 - Pick up the U-Boot you'd like to put in SDRAM

+

+

You can either use the one generated by OE, or you can quickly generate a new one:

+

cd ..

+

git clone http://git.denx.de/u-boot.git u-boot-denx

+

cd u-boot-denx

+

make distclean

+

make omap3_beagle_config

+

make

+

cd ..

+

+

now you've got an ~160k u-boot.bin in the u-boot-denx directory.

+

+

4 - Prepare the boot

+

cd omap-u-boot-utils

+

cp ../x-loader/x-load.bin .

+

cp ../u-boot-denx/u-boot.bin .

+

+

5 - Boot (use the right tty for your setup of course)

+

+

Power off the board.

+

+

Run pserial to put the x-loader in the internal SRAM:

+

./pserial -p /dev/ttyS0 -f x-load.bin

+

+

If you already have an x-loader in NAND, you must push the User Button

+

so that the NAND boot is tried after the UART boot, then power-on the

+

board.

+

+

If you don't have one, simply power-on the board.

+

+

You see:

+

Waiting For Device ASIC ID: Press Ctrl+C to stop

+

ASIC ID Detected.

+

Sending 2ndFile:

+

Downloading file: 100.000% completed(12700/12700 bytes)

+

File download completed.

+

+

Then run ukermit, to transmit the u-boot to the x-loader and then the

+

x-loader puts it in SDRAM:

+

./ukermit -p /dev/ttyS0 -f u-boot.bin

+

+

You see:

+

Downloading file: 100.000% completed(162656/162656 bytes)

+

File Download completed

+

+

And then you have an U-Boot prompt like this:

+

## Start Addr = 0x80008000

+

Starting OS Bootloader from UART ...

+

+

U-Boot 2009.03-rc2-00013-gefb4734 (C3A4r 18 2009 - 10:55:33)

+

+

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz

+

OMAP3 Beagle board + LPDDR/NAND

+

DRAM: 128 MB

+

NAND: 256 MiB

+

In: serial

+

Out: serial

+

Err: serial

+

Board revision Ax/Bx

+

Die ID #047a00030000000004013f780601000c

+

Hit any key to stop autoboot: 0

+

+

Now you can erase the flash and restore U-Boot as explained in the previous section.

Latest revision as of 09:31, 15 November 2011

This page is how to recover ("unbrick") a broken BeagleBoard. It should help you if you messed your boot configuration and BeagleBoard doesn't boot any more the normal way ("bricked").

Contents

Symptoms

Normally, if you boot from MMC, you will get something like

...40T...

in terminal program connected to UART (115200 8N1). This is output from OMAP3's bootrom while scanning the UART for boot source before trying to boot from MMC card. If you don't get this, but want to boot from MMC, most probably bootrom doesn't reach the MMC boot stage any more. If you played with NAND before getting this, most probably NAND contains some broken content.

What has happened?

Depending on user button OMAP3 on BeagleBoard uses different boot order. Normal order if user button isn't pressed at power up is boot from

NAND -> USB -> UART -> MMC

in this order. Depending on the boot medium (e.g. MMC) this might fail if something bad is in NAND flash which confuses OMAP3 bootrom thus stopping it to reach MMC boot stage.

This might happen if you e.g. mess your NAND, e.g. something went wrong with NAND boot.

What to do now?

First, we have to press user button at power up to switch boot order to

USB -> UART -> MMC -> NAND

to have option to boot from other sources than broken NAND (which is first if user button is not pressed).

Then, there are three options to boot from:

MMC

USB

UART

Below, MMC and USB recovery will be done in detail. The goal is to get a U-Boot prompt and then to erase the non-booting NAND.

MMC recovery

For the most up to date instruction to restore any BeagleBoard version SD card to the factory image see the CircuitCo Wiki.

MMC recovery should be straight forward. Press user button at power up and according to above boot order MMC boot is before NAND. With this, we should be able to boot as we did without pressing the user button before bricking the board. But:

There are some broken MLO (x-loader) out there which fail to boot if something wrong is in NAND. E.g.:

This seems to happen with both MLO's from Beagle source code page (381MHz and 500MHz one) independent of U-Boot version.

Thus, you have to use a special (?) MLO for recovery to get a U-Boot prompt. Replacing MLO used above on MMC/SD card with this recovery MLO we get a U-Boot prompt while pressing the user button at power up:

If you now re-power your board without pressing the user button it should work as before. Happily unbricked!

Next, you can also restore the NAND flash by preparing an SDCard image that automatically flashes all software components correctly.

MMC recovery Troubleshooting

Some have encountered problems with trying to boot from MMC, but it wasn't booting from MMC because of a bad formating and/or copy of the MLO. This example demonstrates booting from NAND even if the user button (40T) has been pressed.

...40T...
Texas Instruments X-Loader 1.41
Starting OS Bootloader...

Instead, the correct and expected result with user button pressed is booting from MMC and this should be printed:

If MMC is not displayed, this means that the MLO (x-loader for the MMC) has not been properly copied or the partition has not been done properly. Or simply that there is something wrong with what is on the MMC.

The first thing to do is to follow step by step the
Linux Boot Disk Format Procedure
then after formating the FIRST STEP TO DO AFTER FORMATING IS TO COPY MLO. Which one? MLO_restore from Downloads list the one previously discuss in MCC recovery section.

For u-boot we suggest to use u-boot.bin_autoflash from Downloads list.