Flash corruption?

chatoooo
 
Posts: 5
Joined: Wed Jan 14, 2015 9:09 pm

Flash corruption?

Wed Jan 14, 2015 9:42 pm

Hi, VoCore is absolutely amazing. We are making our custom dock for some our projects. So I created new tearget in OpenWRT and changed device tree to match new devices on our dock. It compiles successfully, but when compiling was done VoCore stops working. It looks like it knows what I want to do :D. It has been running on my desk for three hours without any problem. But suddenly LED2 flashed and VoCore started to reboot. Since that I cant access it. Green status led is still blinking and when i connect to UARTLite and press Enter to display console it just simply write (in debug 4):
Code: Select all
Failed to executprocd: child_exit(132): pid:496
procd: fork_worker(123): Launched new askconsole action, pid=620
Please press Enter to activate this console.


I can access console in failsafe. It looks more SW problem than HW.

My questions are:
  1. Why was that happened?
  2. How to fix that?

pma61
 
Posts: 12
Joined: Fri Nov 21, 2014 6:19 pm

Re: Flash corruption?

Thu Jan 15, 2015 7:43 am

Hi!
If you have problem with openwrt but you have access to the shell and network, you can use scp to copy the os image in /tmp/ and flash it.
Otherwise you have to connect vocore with the usb-ttl and follow this guide: http://vonger.cn/?topic=connecting-and-flashing-through-uart-u-boot-with-osx

chatoooo
 
Posts: 5
Joined: Wed Jan 14, 2015 9:09 pm

Re: Flash corruption?

Thu Jan 15, 2015 12:12 pm

I tried to flash image over TFTP. TFTP works like charm, but then when I want to copy downloaded image it does nothing. There are no progress 'dots' while copying downloaded image to spi flash.

Code: Select all
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 3932164 (3c0004 hex)
NetBootFileXferSize= 003c0004
VoCore> erase linux

 Erase linux kernel block !!
From 0x50000 length 0x3B0000
raspi_erase: offs:50000 len:3b0000
...........................................................
VoCore> cp.linux 3c0004

 Copy linux image[3932164 byte] to SPI Flash[0x00050000]....
raspi_write: to:50000 len:3c0004
VoCore> reset


U-Boot for VoCore(based on RT5350)Warning: un-recognized chip ID, please update bootloader!
.
Version: May 30 2014 20:52:36

Press 'x' to console...


Booting image at bc050000 .Bad Magic Number,FFFFFFFF

chatoooo
 
Posts: 5
Joined: Wed Jan 14, 2015 9:09 pm

Re: Flash corruption?

Thu Jan 15, 2015 12:57 pm

I finally solve it. It looks it needs image smaller than 3b0000. So I removed some packages, build openwrt and flash was successfull.

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

Re: Flash corruption?

Fri Jan 16, 2015 7:41 am

Looks like this uboot mtd driver support up to 3MB~4MB, that is fixed. But you can install package after the system ready. Or you have to make your own uboot, change some code there.

wangnick2
 
Posts: 6
Joined: Sun Jan 11, 2015 5:19 pm

Re: Flash corruption?

Sun Jan 18, 2015 10:34 am

Dear Qin,

I have the same issue. My stock Vocore u-boot erases only 0x3B0000 amount of flash:
Code: Select all
VoCore> erase linux

 Erase linux kernel block !!
From 0x50000 length 0x3B0000
raspi_erase: offs:50000 len:3b0000
...........................................................


Thereafter, flashing vocore.16m.mjpg.bin of size 3C0004 obviously creates garbage in the 0x3B0000-0x3C0004 area, and can not be booted:
Code: Select all
VoCore> cp.linux 3C0004
current count: 3932164

 Copy linux image[3932164 byte] to SPI Flash[0x00050000]....
raspi_write: to:50000 len:3c0004
VoCore> reset


U-Boot for VoCore(based on RT5350)Warning: un-recognized chip ID, please update bootloader!
..
Version: May 30 2014 20:52:36

Press 'x' to console...


Booting image at bc050000 .Bad Magic Number,FFFFFFFF


Now, I do not understand what you mean with:
Vonger wrote:Looks like this uboot mtd driver support up to 3MB~4MB, that is fixed. But you can install package after the system ready. Or you have to make your own uboot, change some code there.


These are my questions:
  • What exactly do you mean by "Looks like this uboot mtd driver support up to 3MB~4MB, that is fixed"? Can you refer to the u-boot source code changes?
  • How do I tell my u-boot to erase the full linux flash area? I have seen a very few examples scattered over the foum where erase linux will use offs:50000 len:7b0000? Can this be done manually, or by changing some u-boot env variables?
  • In case this is necessary: How do I regenerate the stock "U-Boot for VoCore (based on RT5350) Warning: un-recognized chip ID, please update bootloader! .. Version: May 30 2014 20:52:36" from source code without loosing functionality? And whereto do I flash the new u-boot thereafter?

I understand that flashing u-boot itself is a bit tricky, as any mistake will require me to unsolder the flash chip ... ...

Kind regards,
Sebastian

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

Re: Flash corruption?

Mon Jan 19, 2015 1:39 am

1. about uboot, it is a fixed code, you can get the code at vocore.io/wiki, download area.
2. you can not do that, due to current uboot do not have such function.
3. that issue is caused by the uboot support flash chip W25Q64 but not chip W25Q128, so it report such warning.

My suggestion is to upgrade firmware by command mtd under linux. Linux driver support 16MB flash already. better not to use uboot, that is only for urgent situation.

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: No registered users and 3 guests