Dealing with a bricked VoCore2

Eyal
 
Posts: 13
Joined: Wed Dec 28, 2016 7:42 am

Dealing with a bricked VoCore2

Thu Dec 29, 2016 7:36 am

I managed to brick it and am now recovering[*]. Sending ultimate.16m.img over serial is about 40 minutes... Probably a good idea to indicate, in the doco at http://vocore.io/v2.html, that this is going to take a long time. I will switch to using tftp.

More importantly, I could not see the u-boot prompt. I could only start kermit after the VoCore2 was connected, at which time I saw only some garbage. The solution was to take the vocore out of the dock, connect it to the pc (USB cable), start a terminal (kermit preferred) and then reset the vocore with a short touch of GND and reset pins. I can then see the full boot process and can select '0' and proceed from there.

Q) As a matter of preparation, while reading the same doco, in the following section, can you please explain what is meant by flash loader? Is it one of those USBASP devices?

[*] The kermit send failed after 40 minutes with
Abort: image size larger than 16449536!
I sent the wrong file, now sending 20161224.bin. This one is OK.

cheers

Eyal
 
Posts: 13
Joined: Wed Dec 28, 2016 7:42 am

Re: Dealing with a bricked VoCore2

Sun Jan 01, 2017 1:31 am

Ping, and a Happy New Year.

Can I have an answer to my earlier question:

Q) As a matter of preparation, while reading the doco at http://vocore.io/v2.html
Fix Bricked VoCore2 (uboot dead)
1. You must have another VoCore/VoCore2 or one flash loader and six wires.

can you please explain what is meant by flash loader? Is it one of those USBASP devices?

Regards

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Dealing with a bricked VoCore2

Sun Jan 01, 2017 8:40 pm

A flash loader writes to the flash chip directly. Two ways to do it - connect to the spi signals on the board or unsolder the flash chip and put it in a socket on the flash loader. Either is very likely to give you a dead piece of PCB. The vocore pinout spacing makes it very easy to short things together and unsoldering/resoldering the chip without expensive equipment takes extreme skill. Just the fact that you need to ask means you don't want to try this. I have put a flash loader together with an Arduino (a USBASP is really just another type of Arduino) before and it works but this is very slow writing the system image takes a few hours. I used a breakout board to get to the spi signals safely.

It is almost impossible to kill uboot (unless you use a flash loader), if you can get to a command prompt at all, just type reboot and you'll get the u-boot menu. Vonger did something with his GD32 USB/UART that doesn't let you see the uboot menu on power on so the method you used is probably the best way to get to the menu if you can't get to a command prompt.

If you want to use Ethernet, there is a recovery web page in u-boot, plug your VoCore2 directly into your computer with a Ethernet cable, set up the network config on your computer for static addressing with an IP of 192.168.1.2. From the u-boot menu use option 8, then point a web browser at 192.168.1.123

I think the easiest for you is to put an image on a USB drive and name it root_uImage plug it into the USB connector and use option 5 on the uboot menu. The file has to be on the first partition of the flash drive and it has to be formatted vfat. Most (all?) USB drives smaller than 32G have one partition and it is formatted vfat so just use a cheap one and you'll be ok.

To repeat my self without all the fluff you need:
1. USB drive with first partition formatted vfat
2. The image must be on the first partition and must be named root_uImage
3. Use option 5 from the uboot menu

The process will look like this:

Code: Select all
[  217.740000] reboot: Restarting system
******************************
Software System Reset Occurred
******************************
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:Jun 25 2016  Time:22:54:33
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
RESET MT7628 PHY!!!!!!
Please choose the operation:
   0: Load system code then write to Flash via SERIAL.
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   5: Load system code then write to Flash via USB Storage.
   7: Load Boot Loader code then write to Flash via Serial.
   8: Start Web Server to load system code.
   9: Load Boot Loader code then write to Flash via TFTP.
gpio trigger enabled
GPIO 46 used to trigger webpage
Hold button for between 3 seconds and 6 seconds
   then release to trigger webpage to load image
Hold button for between 6 seconds and 9 seconds
   then release to trigger loading image from USBSTORAGE
GPIO 46 is low
23
You chose 5

 0


5: System Load Linux then write to Flash via USB Storage.
(Re)start USB...
USB0:   *********ehci_hcd_init**********
Mediatek/Ralink USB EHCI host init hccr b01c0000 and hcor b01c0010 hc_length 16
 6. u2phydcr0(0xb0120860)=0x00aaaa02
 FM_OUT value: u4FmOut = 0(0x00000000)
 FM_OUT value: u4FmOut = 130(0x00000082)
 FM detection done! loop = 1
 SR calibration value u1SrCalVal = 6


Register 1111 NbrPorts 1
USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
reading root_uImage
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
<more lines with dots>
...........................................................................................................................................................................................................................................................................................................................................................................................
.

16449536 bytes read
...........................................................................................................................................................................................................................................................
...........................................................................................................................................................................................................................................................
Done!
     ******************************
Software System Reset Occurred
******************************
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes

Eyal
 
Posts: 13
Joined: Wed Dec 28, 2016 7:42 am

Re: Dealing with a bricked VoCore2

Wed Jan 04, 2017 1:56 pm

Thanks, this is clear. This time it was not bricked, just was not showing the boot menu, and I got around that problem.
If I ever need to do a bare metal recovery I should be able to write to the spi bus, but I am not looking forward to this.

cheers

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Dealing with a bricked VoCore2

Wed Jan 04, 2017 3:38 pm

In case I ever need to do bare metal recovery I always make a backup like this,

This guide was written for the original VoCore so the mtd sizes and addresses are different. Since we copy them by using the mtd names it doesn't matter.

The critical ones are u-boot and factory. When I really bork things and need to use a flash writer I restore u-boot to get access then use u-boot to write a system image and if needed write factory from within OpenWrt. The reason is u-boot is small so it is much faster to flash.
Last edited by noblepepper on Sat Apr 22, 2017 9:37 am, edited 1 time in total.

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: Dealing with a bricked VoCore2

Fri Jan 06, 2017 4:53 am

noblepepper wrote:In case I ever need to do bare metal recovery I always make a backup like this,

This guide was written for the original VoCore so the mtd sizes and addresses are different. Since we copy them by using the mtd names it doesn't matter.

The critical ones are u-boot and factory. When I really bork things and need to use a flash writer I restore u-boot to get access then use u-boot to write a system image and if needed write factory from within OpenWrt. The reason is u-boot is small so it is much faster to flash.


Another way, just cp /dev/mtd0~6 /tmp/
mtd0~mtd6 is the same order from 'cat /proc/mtd' :)
Use this way you will no need to know mtd size anymore, it will use the size in the dts which you used to compile it.

Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: No registered users and 37 guests