Recovery via serial

Hi beagleboarders,

Unfortunately, I seem to have loaded a version of u-boot onto NAND
that doesn't work.

After compiling my own u-boot with the intent of testing the usbtty
functionality, I downloaded the image to the beagleboard using ukermit
(as provided in the omap-u-boot-utils pacakge). I wrote this image to
nand over the original u-boot image, and rebooted the beagle. It came
back up but serial over USB wasn't working - rs232 serial was working.

I figured I'd re-image the original u-boot image back onto the nand.

I downloaded the *u-boot_revc_v2.bin* file from the downloads page at
http://code.google.com/p/beagleboard/downloads/list which I assumed
was the same as the original u-boot that came on my beagle. I
downloaded this to the beagleboard using ukermit and wrote it to nand,
in the same way that I did above.

Now all I get is:

  Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)
  Loading u-boot.bin from nand

It hangs there. OK, I am now going to try one of the recovery options
described at http://elinux.org/BeagleBoardRecovery#UART_recovery

I downloaded the package which includes x-load.bin, u-boot.bin,
pserial and ukermit and the script.

the pserial command works after rebooting the beagleboard and getting
the ASIC ID, but then nothing. If I watch the serial in minicom, I get

  ?.Ѭ?ˁf???nX?5

The ukermit command does nothing after this stage.

The USB recovery tool does not work on Ubuntu 8.10 or the latest arch
distribution. It waits at the usb_bulk_read call and eventually times
out after the 1000ms timeout value.

I also tried a procedure that I found on Nishanth's blog as found here
http://nishanthmenon.blogspot.com/2008/12/towards-creating-beagleboard-nand.html

But this doesn't work either.

I'm running Ubuntu 8.10, and have a revision C2 board.

If anyone can help me unbrick my board, I would be most appreciative.

Regards,
Etienne Le Sueur

Could you try this zip here: [1] and see the instructions [2].
Regards,
Nishanth Menon
Ref:
[1] http://beagleboard.googlegroups.com/web/beagle_recover.tar.bz2
[2] http://groups.google.com/group/beagleboard/browse_thread/thread/d97b2152fe7185dd/932f618adf67d035?lnk=gst&q=recover_beagle.sh#932f618adf67d035

By the way, did you run with sudo? and Do you have libusb installed
(sudo apt-get install libusb0) -> i have a beta ubuntu 9.04 amdx64 at
home, and last I tried it had worked.. but anyways, worst case,
git clone git://github.com/nmenon/omap-u-boot-utils.git
make
you can replace the pusb, ukermit, ucmd etc from your own build into
if you have basic libraries installed, it should work.. see [1] and
[2] for more info on how to build.

Regards,
Nishanth Menon
Ref:
[1]: http://github.com/nmenon/omap-u-boot-utils/tree/master
[2]: http://code.google.com/p/omap-u-boot-utils/

Thanks Nishanth,

I got it working with the beagle_recover.tar.bz2 package.

I had minicom open on /dev/ttyS0 while I was trying, and ukermit died
at 100 bytes - took me a while to figure that one out :slight_smile:

Question... Why can pusb only download into SRAM?

Has anyone tried loading a linux kernel over usb from within u-boot?

Thanks,
Etienne Le Sueur

elesueur said the following on 04/22/2009 11:20 PM:

I got it working with the beagle_recover.tar.bz2 package.

I had minicom open on /dev/ttyS0 while I was trying, and ukermit died
at 100 bytes - took me a while to figure that one out :slight_smile:

glad to hear that.. mebbe i need to check with lsof command prior to
opening the serial port.. hmmm might be a good thing to add.. :).

Question... Why can pusb only download into SRAM?

oh, that is because of ROM Code support in OMAP -> essentially - OMAP3
ROMCode by default will download to SRAM allowing for images to setup
the board specific configuration for further operation (SDRAM timings
etc to be configured depending on what you have per board).. do read the
TRM chapter initialization for more details..

Regards,
Nishanth Menon

I have updated a new rev http://groups.google.com/group/beagleboard/web/beagle_recover.tar.bz2
this has the latest changes along with todays' build of u-boot and x-
loader..
Regards,
Nishanth Menon

Folks,

I guess this is rather a basic question and hence didn’t want to spam up the group. Hope you wouldn’t mind.

I have bricked my beagle board and have been trying the recovery procedures mentioned in the wiki http://elinux.org/BeagleBoardRecovery. The MLO_restore procedure didn’t work - i have followed the steps to the letter but my beagle fails to boot off MMC.

I was trying to flash the NAND with the USB procedure you mentioned in this thread. And my question is in this regard

When I connect the beagle to the USB on the PC using the OTG USB cable, I don’t see any ttyUSB0 getting listed. Is my connection right? If it is, how do I get beagle to be recognized as a ttyUSB0 on my PC? What am I missing here?

Radha Krishna Srimanthula said the following on 04/23/2009 10:53 PM:

When I connect the beagle to the USB on the PC using the OTG USB
cable, I don't see any ttyUSB0 getting listed. Is my connection right?
If it is, how do I get beagle to be recognized as a ttyUSB0 on my PC?
What am I missing here?

since you are asking in the context of recovery, you need a serial port
cable (to connect beagle to PC), a USB otg cable(to power and connect
beagle to PC) and a beagle board for this recovery to function.
ttyUSB0 as mentioned in the mailchain is a usb2serial converted
connected to your PC to which you'd connect a beagleboard. Hope it helps..

Regards,
Nishanth Menon

Thanks Nishanth,

I had realized that - when I connect the USB OTG to the beagle, it starts downloading stuff onto the Beagle and comes up with this warning as shown below:

rks@rks-desktop:~/Beagle/BeagleRecovery/beagle_recover$ sudo ./recover_beagle.sh /dev/ttyS0
NOTE:
When you see the message “Waiting for USB device…”, Connect USB Cable to the board with the switch S1 pressed
Keep S1 pressed for 1 second at least after connecting usb cable.
Waiting for USB device vendorID=0x451and productID=0xD009:
Dev #11: Texas Instruments - OMAP3430

  • Serial Number: N/A
    Downloading file: 100.000% completed(38960/38960 bytes)
    ./target_files/u-boot-v2.bin downloaded successfully to target
    lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/rks/.gvfs
    Output information may be incomplete.

The script is stuck here - is there anything I need to do here?

Radha Krishna Srimanthula said the following on 04/23/2009 11:18 PM:

rks@rks-desktop:~/Beagle/BeagleRecovery/beagle_recover$ sudo
./recover_beagle.sh /dev/ttyS0
NOTE:
When you see the message "Waiting for USB device..", Connect USB Cable
to the board with the switch S1 pressed
Keep S1 pressed for 1 second at least after connecting usb cable.
Waiting for USB device vendorID=0x451and productID=0xD009:
Dev #11: Texas Instruments - OMAP3430
  - Serial Number: N/A
Downloading file: 100.000% completed(38960/38960 bytes)
./target_files/u-boot-v2.bin downloaded successfully to target
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system
/home/rks/.gvfs
      Output information may be incomplete.

The script is stuck here - is there anything I need to do here?

Some usual check lists:
a) Do you have all the special cables required for serial port?
b) Did the board ever work previously with the same setup?
c) You may want to read through [1] and see if mtest worked for you..

Ref:
1:
http://groups.google.com/group/beagleboard/browse_thread/thread/c44268ad1361a7f9/c65b92d70d6b2c65?lnk=gst&q=recover_beagle.sh#

Thanks for the help Nishanth, I was able to unbrick it. However, am stuck with another problem now - it doesn’t boot into MMC yet. Will post a different thread on the problem…

Nishanth,

I will need your help yet again. My beagle is bricked yet again. When I run recover_beagle.sh, the script is stuck here:

rks@rks-desktop:~/Beagle/Angstrom/BeagleBoardRecovery/beagle_recover$ sudo ./recover_beagle.sh /dev/ttyS0
NOTE:
When you see the message “Waiting for USB device…”, Connect USB Cable to the board with the switch S1 pressed
Keep S1 pressed for 1 second at least after connecting usb cable.
Waiting for USB device vendorID=0x451and productID=0xD009:
Dev #16: Texas Instruments - OMAP3430

  • Serial Number: N/A
    Downloading file: 100.000% completed(38960/38960 bytes)
    ./target_files/u-boot-v2.bin downloaded successfully to target
    lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/rks/.gvfs
    Output information may be incomplete.

The warning - can I ignore it? Do I hit a ^C here??

About my board - its a rev B6, and it has been working before.

Please let me know.

Op 26 apr 2009, om 05:42 heeft Radha Krishna Srimanthula het volgende geschreven:

Nishanth,

I will need your help yet again. My beagle is bricked yet again.

It's not bricked, if it was bricked you'd need jtag or hardware exchanges to revive it.

regards,

Koen