BeagleBoardRecovery

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?=

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. Goal of all ways is to get an U-Boot prompt again to erase the bad NAND content.

MMC recovery
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.:

...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:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0x01 ( AND 128MiB 3,3V 8-bit) NAND bus width 16 instead 8 bit 0 MiB 

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:

...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 (e.g. using U-Boot 1.3.3 commands):

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!

USB recovery
You can use USB boot utility together with U-Boot V2 and then use U-Boot V2's loadb to load U-Boot (V1). Binary: U-boot V2

Note: USB download can only load programs into OMAP3's internal SRAM. This is 64k, so too small for U-Boot (V1). But unfortunately, U-Boot V2 currently lacks NAND support. So we have to use:

USB download -> U-Boot V2 (SRAM) loadb -> U-Boot (V1) (SDRAM) NAND erase

For this, get usbload and U-Boot V2 using above links, start usbload tool at PC and while ... plug in USB OTG (power) cable. At host, this will result in:

> ./omap3_usbload uboot_v2.bin TI OMAP3 USB boot ROM tool, version 0.1 (c) 2008 Martin Mueller  .......................................... found device! download ok >

And at target you will get:

U-Boot 2.0.0-rc5-git (Jun 30 2008 - 20:16:02) Board: Texas Instrument's SDP343x Malloc Space: 0x87bfff10 -> 0x87ffff10 (size 4 MB) running /env/bin/init... not found X-load 343x>

Now, you can use this running U-Boot V2 to download U-Boot (V1) using loadb command:

X-load 343x> devinfo devices: |uart3 |ram0 |filesystem: / |filesystem: /dev drivers: serial_ns16550 ramfs devfs ram X-load 343x> help loadb [OPTIONS] -d device - which device to download - defaults to /dev/mem -o offset - what offset to download - defaults to 0 -b baud  - baudrate at which to download - defaults to console baudrate X-load 343x> loadb -d /dev/ram0
 * 1) Ready for binary (kermit) download to 0x00000000 offset on /dev/ram0 device at 115200 bps...

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

X-load 343x> help go addr [arg ...] - start application at address 'addr' passing 'arg' as arguments X-load 343x> go 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 #
 * 1) Total Size      = 0x00023d64 = 146788 Bytes
 * 1) Starting application at 0x80000000 ...

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!