Not starting after flashing the bin

l4chsalter
 
Posts: 7
Joined: Tue Jan 27, 2015 7:21 pm
Location: Hamburg, Germany

Not starting after flashing the bin

Sat Apr 11, 2015 8:53 pm

Hi guys,

i tried to install a new openwrt via u-boot. I followed the instructions from MarkusZ from here: http://vonger.cn/?topic=connecting-and-flashing-through-uart-u-boot-with-osx.

The flashing went well but after i restarted the vocore i get:

Code: Select all
Booting image at bc050000 .Bad Magic Number,00000014


I tried with several images from http://vonger.cn/upload but all with the same result.

Anyone of you guys have a hint for me or experienced something similar?

Many thanks in advance

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

Re: Not starting after flashing the bin

Sun Apr 12, 2015 4:07 pm

Looks like you choose wrong image file.
That error means something wrong with your image or your flash.

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

Re: Not starting after flashing the bin

Mon Apr 13, 2015 7:33 am


l4chsalter
 
Posts: 7
Joined: Tue Jan 27, 2015 7:21 pm
Location: Hamburg, Germany

Re: Not starting after flashing the bin

Tue Apr 14, 2015 8:25 pm

Hi guys,

thank you Vonger and Noblepepper for your answers. I tried reflashing with http://vonger.cn/upload/vocore16.bin. I also tried:

  • vocore.v1.0.bin
  • vocore.16m.noluci.bin
  • vocore.16m.microsd.bin
  • vocore.bin

All with no luck. For the http://vonger.cn/upload/vocore16.bin i get simillar error as before:
Code: Select all
U-Boot for VoCore(based on RT5350)Warning: un-recognized chip ID, please update bootloader!
raspi_wait_ready: read_sr fail: ff
Version: May 30 2014 20:52:36
Press 'x' to console...
Booting image at bc050000 raspi_wait_ready: read_sr fail: ff
Bad Magic Number,00000000


Vonger you mentioned there is also a possibility of corrupt flash. How can i check if the flash is damaged? Is it possible to check it from within u-boot? Is the seconde line from the above output indicating a problem? I think I did not saw it last time i played with the vocore.

This is the output i get from: "md linux" after flashing with http://vonger.cn/upload/vocore16.bin:
Code: Select all
00000000: ffffffff 00000001 00000000 00000000    ................
00000010: 00000200 00000000 00000000 00000000    ................
00000020: 00000000 00000000 00000000 00000000    ................
00000030: 00000000 02000112 40000000 5350148f    ...........@..PS
00000040: 00000001 060a0100 00000200 00014000    .............@..
00000050: 00430209 80000101 00040950 ffff0700    ..C.....P.......
00000060: 050700ff 02000281 01050700 00020002    ................
00000070: 02820507 07000200 00020205 05070002    ................
00000080: 02000283 03050700 00020002 02840507    ................
00000090: 07000200 00020405 05070002 02000205    ................
000000a0: 06050700 00020002 00020002 03050405    ................
000000b0: bc002679 bc002445 bc002435 bc002551    y&..E$..5$..Q%..
000000c0: bc002435 bc0024f5 bc00294d bc002435    5$...$..M)..5$..
000000d0: bc002701 bc0024f9 bc0026f1 bc0025ed    .'...$...&...%..
000000e0: bc002435 0000014d 00000000 00000000    5$..M...........
000000f0: 00000000 00000000 00000000 00000000    ................

Does this help?

Thank you for your time.

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

Re: Not starting after flashing the bin

Thu Apr 16, 2015 12:01 pm

It looks like you have found it, here is my output from uboot at startup:
Code: Select all
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 .
   Image Name:   MIPS OpenWrt Linux-3.14.18
   Created:      2015-04-13  18:41:34 UTC
 


and the output from md linux is:
Code: Select all
00000000: 00000000 00000001 00000000 00000000    ................
00000010: 00000200 00000000 00000000 00000000    ................
00000020: 00000000 00000000 00000000 00000000    ................
00000030: 00000000 02000112 40000000 5350148f    ...........@..PS
00000040: 00000001 060a0100 00000200 00014000    .............@..
<snip>


My guess is that for some reason the flash chip is not responding quickly enough at the beginning of a read operation.

Can you change the first byte with mm? (entering a hex number changes, just pressing enter exits the command)

Code: Select all
VoCore> ? mm
mm [.b, .w, .l] address
    - memory modify, auto increment address

VoCore> md linux
00000000: 00000000 00000001 00000000 00000000    ................
00000010: 00000200 00000000 00000000 00000000    ................
00000020: 00000000 00000000 00000000 00000000    ................
00000030: 00000000 02000112 40000000 5350148f    ...........@..PS
00000040: 00000001 060a0100 00000200 00014000    .............@..
<snip>
VoCore> mm linux
00000000: 00000000 ? ffffffff
00000004: 00000001 ?
VoCore> md linux
00000000: ffffffff 00000001 00000000 00000000    ................
00000010: 00000200 00000000 00000000 00000000    ................
00000020: 00000000 00000000 00000000 00000000    ................
00000030: 00000000 02000112 40000000 5350148f    ...........@..PS
00000040: 00000001 060a0100 00000200 00014000    .............@..
<snip>
VoCore> mm linux
00000000: ffffffff ? 00000000
00000004: 00000001 ?
VoCore> md linux
00000000: 00000000 00000001 00000000 00000000    ................
00000010: 00000200 00000000 00000000 00000000    ................
00000020: 00000000 00000000 00000000 00000000    ................
00000030: 00000000 02000112 40000000 5350148f    ...........@..PS
00000040: 00000001 060a0100 00000200 00014000    .............@..
<snip>
VoCore>

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

Re: Not starting after flashing the bin

Thu Apr 16, 2015 2:52 pm

You can skip the last part about mm, it isn't persistent through a reboot. Uboot must be working with a copy of flash in ram.

Endat
 
Posts: 44
Joined: Mon Feb 02, 2015 6:29 pm

Re: Not starting after flashing the bin

Sat Apr 25, 2015 1:06 am

I have the same issue with the VoCore+Dock.. It wasn't working as a wireless router so I used the vocore.v1.0.bin image to reflash it.. now ssh doesn't work, luci doesn't work... can't connect to it through wifi so I have to figure out how to use a physical connection,.. i2c, uart, uart2, or whatever.. it sounds like so much of a hassle.

Which image is good for the vocore+dock? i want the sd to work, because it didn't out of the box. But I also want to use it as a router.

Also, how much time will this take? A few minutes, hours, a day? If it takes a whole day to reflash this thing, I'd rather just throw it in the bin and forget about it.

l4chsalter
 
Posts: 7
Joined: Tue Jan 27, 2015 7:21 pm
Location: Hamburg, Germany

Re: Not starting after flashing the bin

Wed Jul 15, 2015 8:25 pm

Hi guys,

thank you for your help so far! The problems and work held me from working on my VoCore problems.... But now i have time again, I hope you guys too :)

Anyway I read the wiki from Noblepepper about accessing the flash directly http://noblepepper.com/vocorewiki/doku.php?id=wiki:writing_the_flash_directly and I had a test clip and a raspberry around. So I fired up flashrom and dumped the entire flash to a file... and now what? I uploaded that file if that helps: http://ul.to/7947v6mi

There is data from 00000000 to 000196f0 and from 001e0000 to 003c4f80. The later one is probably the openwrt system?

I am a bit stuck as i didn't find more information on how the content of the flash should look like. Maybe you can point me to where i can look for information on how it has to look and how to flash a working openwrt?

Many thanks in advance and every tip is appreciated as I know very little about this topic

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

Re: Not starting after flashing the bin

Thu Jul 16, 2015 4:44 pm

Please check openwrt source code: VOCORE.dts
There is a spi section, have one m25p64 driver, and the flash section is defined there.
If your bootloader still work, you can upload your firmware by tftp or kermit.
But if not...that will be hard, you have to reflash the flash. That requests a spi burner or another vocore(connect to spi cs1) to fix it.

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

Re: Not starting after flashing the bin

Fri Jul 17, 2015 2:54 pm

I don't understand why you want to write using flashrom, I compared your file with the stock uboot.img from Vonger's site and they are the same. Your uboot should be working and it is much faster and easier than using flashrom. In any case below are some details on what I did when I messed up my uboot.

The most important thing is to NOT alter the radio calibration data which is kept in the factory partition. This is unique to each and every VoCore and you need it for the wifi to work.

I use a flashrom layout file when writing with flashrom, to write only the uboot partition I use this command:
Code: Select all
flashrom -p serprog:dev=/dev/ttyACM1:115200 -c W25Q128.V --layout flashromlayout --image uboot -VVw mtdbackups/uboot.padded -o flashlog

man flashrom will explain the details of the options but one bit is the file you give flashrom (mine is called mtdbackups/uboot.padded) has to be the same size as the full flash even if you are only writing one section. The contents of the other sections don't matter since they aren't written if you use a layout.

I don't recommend it but, IF you have a GOOD backup of the factory partition you could pad the uboot.img file with enough zeroes to make it the correct size, write the entire flash with flashrom, use uboot to load a working openwrt image and then use mtd in openwrt to put the factory partition back. You can also assemble the pieces if you figure out the gyrations needed and write the entire flash with it, I think I used a combination of cat and dd to put one together but this is complicated and frustrating to get right.

The my flashromlayout file looks like this:
Code: Select all
0x000000000000:0x00002FFFF uboot
0x000000030000:0x00003FFFF uboot-env
0x000000040000:0x00004FFFF factory
0x000000050000:0x000FFFFFF firmware

The section of VOCORE.dts Vonger is refering to looks like this, it is the same information in a different syntax:
Code: Select all
partition@0 {
               label = "uboot";
               reg = <0x0 0x30000>;
               read-only;
            };

            partition@30000 {
               label = "uboot-env";
               reg = <0x30000 0x10000>;
            };

            factory: partition@40000 {
               label = "factory";
               reg = <0x40000 0x10000>;
               read-only;
            };

            partition@50000 {
               label = "firmware";
               reg = <0x50000 0xfb0000>;
            };

Next
Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: No registered users and 38 guests