New IT forum Follow us on Twitter
21 May 2012, 04:19:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bricked UBoot  (Read 1148 times)
michaeljeger
Newbie
*
Posts: 5


« on: 06 May 2011, 07:24:30 pm »

Hello

For 2 years a had a Tonido Plug but there were some hardware limitations so I wanted the full hardware.

I now have purchased the eSata Version of the Sheeva Plug.

As with my Tonido Plug, I wanted to Install SqueezePlug, since I use the plug mostly as a Music Server.

Now I tried to update UBoot on the NAND first in order to use SqueezePlug (UBS-Stick method)

Not sure what went wrong but after reboot, only the green light turned on on the plug.

The console is blank.

So I assume I have bricked Uboot.

Now how can I reflash the NAND with the correct version of Uboot (and also the latest version).

Do I need the NAND Uboot at all if I always want to boot from a SD Card?

Thanks in advance for any help.

Michael
Logged
Sh_Tophe
Newbie
*
Posts: 9


« Reply #1 on: 06 May 2011, 08:09:30 pm »

I ran into the same trouble and I solved it this way:

First download this http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=5 and read the Readme file that explains how the installer works.

Note that if you are using windows to flash the plug it must be a 32bits Windows, won't work otherwise, I had to install XP as a virtual machine myself to get it to work.

In the uboot/uboot-env folder modifiy the uboot-nand-custom.txt file to look like this: (this will give you a multi-boot plug)

Code:
#### Change ONLY in the following few lines

# Following for installation on SD card. If you want to boot from USB stick change it to /dev/sda1
# or /dev/mtdblock1 if you installed rootfs on the NAND inside the plug
bootargs_root ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs

# NAND flash partitions. If using kernel >= 2.6.30 then replace orion_nand with orion_mtd
mtdpartitions mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)

# The following is an example MAC address. Change it according the MAC on the back side of the plug
ethaddr XX:XX:XX:XX:XX:XX

#### DONT change the following.
# Automated process the sets arcNumer to 2678, reset, runs uImage and initrd from USB stick and set bootcmd to 'real_bootcmd' above
# Bootcmd to be used after all installation is done
# New IT commented out 2009-11-18 real_bootcmd setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000

bootargs_console console=ttyS0,115200
bootcmd run recover1
recover1 setenv mainlineLinux yes; setenv arcNumber 2678; setenv bootcmd run recover2; saveenv; reset
recover2 run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand; bootm 0x00800000 0x01100000
recover3 run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4 usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd


bootargs_root_nand ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_nand setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_root_mmc root=/dev/mmcblk0p2 rootdelay=5
bootcmd_mmc setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
real_bootcmd run bootcmd_mmc; run bootcmd_nand

Make sure you fill in your plug's MAC address in place of the XX:XX:XX:XX:XX:XX

Now download a kernel and modules from here : http://sheeva.with-linux.com/sheeva/2.6.38/
and put them at the root of a USB stick formatted in FAT16 or FAT32 and rename the kernel to be uImage and the modules to be modules.tar.gz.

Now download this : http://www.newit.co.uk/rootfs/rootfs-debian-6.0-squeeze-NewIT-v1.5/ and put it on the USB stick as well and rename it rootfs.tar.gz.

Grab the file initrd from the sheevaplug installer "installer" directory and put it on the USB stick as well.

you should now have on the stick: initrd, modules.tar.gz, rootfs.tar.gz, uImage.

Now run the installer per the instructions given in the README.txt file found in the intaller package root directory. Note that you need to add the type of install you want to perform after the excutable. So if you are using windows and since you want to reflash the nand you must use "runme.exe nand" (without the quotes).

Once Uboot has been reflashed (see correct completion signs in the README.txt) close the executable, plug in the stick onto the plug, reset power on the plug, open a console quickly and interupt the Uboot sequence to get the Uboot prompt then type "run recover1". Wait for the process to complete, the plug will reboot and if all went well you will be presented with the squeeze logging prompt.

I hope this is clear and it actually helps.

 

Logged
michaeljeger
Newbie
*
Posts: 5


« Reply #2 on: 07 May 2011, 09:24:35 am »

Hi Sh_Tophe

I followed your instructions but the NAND flashing process failed.
After taking the plug off power and trying to reboot, only the greed LED is on.
Could it be that something is wrong with my plug?

Find enclosed the log.

Code:
Open On-Chip Debugger 0.2.0 (2009-07-27-16:41) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
2000 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Info : JTAG Tap/device matched
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
0 0 1 0: 00052078
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
successfully erased blocks 5 to 6 on NAND flash device 'NAND 512MiB 3,3V 8-bit'
wrote file uboot-env.bin to NAND flash 0 up to offset 0x000c0000 in 84.047997s
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
0 0 1 0: 00052078
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
Warn : bad block: 3
Error: erase operation didn't pass, status: 0xe1
erase failed
wrote file uboot.bin to NAND flash 0 up to offset 0x00073800 in 303.281006s

Now I am really lost. Is my black SATA plug bricked now?

Help.

Michael
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 07 May 2011, 09:29:21 am »

Code:
Warn : bad block: 3
Error: erase operation didn't pass, status: 0xe1
erase failed

Actually, this is your problem. Here's the notes that I have from James as to how to circumvent this:

Quote
The "segmentation fault in block 2 of the Nand" is caused by a marked bad block
underneath uboot.  The error you found appears when a new uboot is written
without bad block skipping ie using openocd compiled without that functionality.
The way we deal with this is with the procedure below.

It's probably best to modify a copy the runme.sh with the changes below.

1. Download from the link below and extract the file
"u-boot-rd88f6281Sheevaplug", place this in the current directory used during
the xxxxx.php below
 http://plugcomputer.org/index.php/us/resources/downloads?func=startdown&id=41

2. Add this procedure to the "openocd/config/board/sheevaplug.cfg"

proc sheevaplug_uboot_memload { } {
   sheevaplug_init
   load_image u-boot-rd88f6281Sheevaplug
   resume 0x00600000
}

3. Use code similar to this in the xxxxx.php to execute the above procedure.

 
$openocd_cmd= "openocd/openocd";
$openocd_cmd.= " -f openocd/config/board/sheevaplug.cfg";
$openocd_cmd.= " -s openocd/config/";
$openocd_cmd.= " -c init";
$openocd_cmd.= " -c sheevaplug_uboot_memload";
$openocd_cmd.= " -c exit";
echo "outvar" , $out;
unset($rc);
exec($openocd_cmd, $out, $rc);


When you run the .php script the "u-boot-rd88f6281Sheevaplug" will be loaded
into memory on the target plug and run. At this point start a screen/cu/minicom
session to attach to the target plug. Stop the plug at the Marvell prompt.
Now you will need a fat formatted usb stick with your required uboot to be used
on the plug inserted.

At the marvell prompt type:

usb start
fatload usb 0 0x6400000 your-uboot.bin
nand erase 0x0 0xa0000
nand write.e 0x6400000 0x0 0xa0000
reset

Now the plug has the new uboot loaded onto the Nand with the bad block skipped.
Logged
michaeljeger
Newbie
*
Posts: 5


« Reply #4 on: 07 May 2011, 11:47:53 am »

Thanks for your reply.

It surprises me that a new plug has already bad blocks?? Is this a warranty case?

I am lost here.

I only have windows installed and I do not know how I could execute this php under windows.

Or is there a OpenOCD somewhere with bad block skipping that would work for me?

Thanks

Michael
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #5 on: 07 May 2011, 01:31:42 pm »

Bad blocks are normal, so long as there aren't too many of them. A bad block in low memory locations on the Sheevaplug requires additional work, as you are about to discover.

You should be able to execute the linux stuff from a live CD.
Logged
michaeljeger
Newbie
*
Posts: 5


« Reply #6 on: 07 May 2011, 03:27:07 pm »

Yeah!

I got it to work in Windows by the command prompt.

I used the SATA version of uBoot.

Are other uBoot (e.g. 3.4.27) versions also compatible with the black SATA plug?

I really do not need SATA at all, just got this plug because it was in stock.

Thanks a lot for the support.

Michael
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #7 on: 07 May 2011, 06:18:54 pm »

Are other uBoot (e.g. 3.4.27) versions also compatible with the black SATA plug?

It should be OK, but the one we recommend is the official one.

3.4.27 supports ide reset, so it should be OK. However I believe that you would only need U-Boot to support SATA if you want to specify an eSATA device in your boot parms.
Logged
michaeljeger
Newbie
*
Posts: 5


« Reply #8 on: 08 May 2011, 08:18:36 am »

Hello Marcus

Thanks again for you promt replies.

I have now everything up and running booting from SC Card.
Squeezeplug is installed and running just fine.

I am really happy that the plug was not bricked at all.

Cheers, Michael
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #9 on: 08 May 2011, 01:36:05 pm »

Michael -

The problem that you had is potentially quite nasty. Although bad blocks are normal (most Sheevaplugs have about 4, but we've seen them up to around 20), if they are in the wrong place, it spells trouble.

We're pleased the procedure worked and thank you for letting us know that it did.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!