FIX: Was Bricked! changed supercap, u-boot, OS & fit serial

Post Reply
fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 11:05 am

mail send with the uImage of u-boot
You can load it using for example tftpboot
At the mainline u-boot prompt use the command

Code: Select all

tftpboot 0x1000000 uImage-u-boot-2big2-1

(of course you need to have a tftp server running on your network with the file in the tftp upload directory)
after it has been successfully uploaded give the command

Code: Select all

bootm
or

Code: Select all

bootm 0x1000000
and see what happens

ps it will have no effect on u-boot in flash, the new u-boot is just loaded in RAM and runs from RAM so no danger to brick you nas.

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 11:54 am

mainline u-boot does not look for magic packets......

i could also load uImage from usb...

Code: Select all

usb reset
fatload 0:1 <address> uImage
bootm <address>
that will be easier than loading over tftp

i also found this document....
http://blackfin.uclinux.org/doku.php?id ... :compiling

it says I can load the bin file directly to memory for testing
I will give that a try now :)

EDIT: well that was not working....
well I was able to load to memory
i used the go command, it said it was starting, but i had no way to interact and test it

I do like the idea of the uImage for testing.....

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 7:43 pm

the go command will not work as the file contains a header and execution of the is not started at the address where it is loaded. It starts at an address inside the real image, all this is specified in the header

Just must use the bootm command of u-boot

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 8:01 pm

sorry I didn't write sooner, I was not feeling good and went to bed...

thank you for the uImage, unfortunatly it also does not appear to work

Code: Select all

2big2> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   kernel
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    459216 Bytes = 448.5 KiB
   Load Address: 00900000
   Entry Point:  00907000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

resetting ...
�

U-Boot 2015.01-dirty (Feb 06 2015 - 10:15:06) 2Big v2
I can load the image but when I run it it just resets and load the u-boot i have in SPI (2015.01-dirty)
i have also tried 0x800000 & 0x900000 to load the image, with the same result posted above.....

I have also tried the prolific adapter, with the same result as the FTDI running kwboot...
xmodem: Protocol Error

I think I am going to need to burn the flash file to SPI if I want to test it.....

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 8:32 pm

what about the uart method ?

The reason for the reset could be that the running u-boot is overwritten. If that happens you get these kind of problems.
The new u-boot copies itself to address 0x600000.

To check what is present at that location you could enter in mainline uboot the command

Code: Select all

md.b 0x600000 0x200
This will show content of memory in binary format on that location and the next 200 Bytes.

If the mainline u-boot is running on that location we need to recompile u-boot with another setting to let it load on a different place

I would wait with writing it to flash until we are sure that it will run.
If we know the address of the flash memory we also can have a look at the header of the mainline u-boot stored there to see if we use the right dram regs in the header. of course we can alos do that by looking to the mainline image file.

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 8:47 pm

I checked the u-boot-net2big_v2-2011.12-00260-ga24d58e.kwb file, I assume you have put that in flash
Indeed it loads at 0x600000

I also checked the rest of the header and compared that with our lacie u-boot image for flash and it has the same dram reg values. So if the image loads we should be ok.

header mainline u-boot kwb (the header ends and the real image starts at address 0x200, the dram regs start at 0x40)

Code: Select all

00000000h: 5A 00 00 00 EC 9F 03 00 00 00 00 00 00 02 00 00 ; Z...ìŸ..........
00000010h: 00 00 60 00 00 00 60 00 00 00 00 00 00 00 01 AB ; ..`...`........«
00000020h: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; @...............
00000030h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000040h: E0 00 D1 FF 9B 1B 1B 1B 00 14 D0 FF 30 0C 00 43 ; à.Ñÿ›.....Ðÿ0..C
00000050h: 04 14 D0 FF 00 30 74 38 08 14 D0 FF 51 54 12 22 ; ..Ðÿ.0t8..ÐÿQT."
00000060h: 0C 14 D0 FF 32 0A 00 00 10 14 D0 FF CC CC 00 00 ; ..Ðÿ2.....ÐÿÌÌ..
00000070h: 14 14 D0 FF 00 00 00 00 18 14 D0 FF 00 00 00 00 ; ..Ðÿ......Ðÿ....
00000080h: 1C 14 D0 FF 62 06 00 00 20 14 D0 FF 44 00 00 00 ; ..Ðÿb... .ÐÿD...
00000090h: 24 14 D0 FF 7F F1 00 00 28 14 D0 FF 30 66 09 00 ; $.Ðÿñ..(.Ðÿ0f..
000000a0h: 7C 14 D0 FF 63 96 00 00 00 15 D0 FF 00 00 00 00 ; |.Ðÿc–....Ðÿ....
000000b0h: 04 15 D0 FF F1 FF FF 0F 0C 15 D0 FF 00 00 00 00 ; ..Ðÿñÿÿ...Ðÿ....
000000c0h: 14 15 D0 FF 00 00 00 00 1C 15 D0 FF 00 00 00 00 ; ..Ðÿ......Ðÿ....
000000d0h: 94 14 D0 FF 00 00 01 00 98 14 D0 FF 00 00 00 00 ; ”.Ðÿ....˜.Ðÿ....
000000e0h: 9C 14 D0 FF 0F E4 00 00 80 14 D0 FF 01 00 00 00 ; œ.Ðÿ.ä..€.Ðÿ....
000000f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000100h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000110h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000120h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000130h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000140h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000150h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000160h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000170h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000180h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000190h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001a0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001b0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001c0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001d0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001e0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F ; ................
00000200h: 13 00 00 EA 14 F0 9F E5 14 F0 9F E5 14 F0 9F E5 ; ...ê.ðŸå.ðŸå.ðŸå

header lacie u-boot (the header ends and the real image starts at address 0x200, the dram regs start at 0x40))

Code: Select all

00000000h: 5A 00 00 00 D4 01 07 00 00 00 00 00 00 02 00 00 ; Z...Ô...........
00000010h: 00 00 00 06 00 00 07 06 00 00 00 00 00 00 01 4C ; ...............L
00000020h: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; @...............
00000030h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000040h: E0 00 D1 FF 9B 1B 1B 1B 00 14 D0 FF 30 0C 00 43 ; à.Ñÿ›.....Ðÿ0..C
00000050h: 04 14 D0 FF 00 30 74 38 08 14 D0 FF 51 54 12 22 ; ..Ðÿ.0t8..ÐÿQT."
00000060h: 0C 14 D0 FF 32 0A 00 00 10 14 D0 FF CC CC 00 00 ; ..Ðÿ2.....ÐÿÌÌ..
00000070h: 14 14 D0 FF 00 00 00 00 18 14 D0 FF 00 00 00 00 ; ..Ðÿ......Ðÿ....
00000080h: 1C 14 D0 FF 62 06 00 00 20 14 D0 FF 44 00 00 00 ; ..Ðÿb... .ÐÿD...
00000090h: 24 14 D0 FF 7F F1 00 00 28 14 D0 FF 30 66 09 00 ; $.Ðÿñ..(.Ðÿ0f..
000000a0h: 7C 14 D0 FF 63 96 00 00 04 15 D0 FF F1 FF FF 0F ; |.Ðÿc–....Ðÿñÿÿ.
000000b0h: 08 15 D0 FF 00 00 00 00 0C 15 D0 FF 00 00 00 00 ; ..Ðÿ......Ðÿ....
000000c0h: 14 15 D0 FF 00 00 00 00 1C 15 D0 FF 00 00 00 00 ; ..Ðÿ......Ðÿ....
000000d0h: 94 14 D0 FF 00 00 01 00 98 14 D0 FF 00 00 00 00 ; ”.Ðÿ....˜.Ðÿ....
000000e0h: 9C 14 D0 FF 0F E4 00 00 80 14 D0 FF 01 00 00 00 ; œ.Ðÿ.ä..€.Ðÿ....
000000f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000100h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000110h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000120h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000130h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000140h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000150h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000160h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000170h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000180h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000190h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001a0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001b0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001c0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001d0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001e0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
000001f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 ; ................
00000200h: 12 00 00 EA 14 F0 9F E5 14 F0 9F E5 14 F0 9F E5 ; ...ê.ðŸå.ðŸå.ðŸå

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 9:24 pm

i did have the one you mentioned, but I have since recompiled from the latest source, v2015.01
the new one has support for GPIO so all the lights and fan work the one 2011.12 was built before the GPIO patch

I can put the flash image in that you made for me, if it does fail then there are a few things I can do

1) maybe kwboot will work...
2) I can remove the SPI chip and put back v2015.01-dirty

so I think I should just do it.

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 9:27 pm

mmm.. after more carefully looking to the numbers it seems the lacie u-boot loads at 0x6000000 and not 0x600000

That should not be a problem as the 2big2 has sufficient memory. The problem is that I made an uImage with wrong entry point
Entry Point: 00907000
this should be 00970000

I have sent you be e-mail an update uImage

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 9:29 pm

great, i will test that now

EDIT: well that one does not reboot....

but it just hangs on starting kernel...

Code: Select all

2big2> fatload usb 0:1 0x1000000 uImage-u-boot2
reading uImage-u-boot2
459280 bytes read in 56 ms (7.8 MiB/s)
2big2> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   kernel
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    459216 Bytes = 448.5 KiB
   Load Address: 00900000
   Entry Point:  00970000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...



fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 9:41 pm

do you have serial port connected or are you using net console ?

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 9:50 pm

both serial and netconsole

I have noticed you get more information with a serial connection

netconsole does not even tell me the kernel is starting...

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 9:58 pm

Serial and net console output cannot be used together, you have either net console output or serial. of course you can switch between them but not have output on both at same time (AFAIK)

Anyhow the lacie u-boot doesn't automatic switch to net console, when it start it outputs to the serial port, what is the output on the serial when loading the uImage ? you should see a banner with the word u-boot then dram info, then it should proceed

---edit something like this (example nwsp2)

Code: Select all

          _           ____ _ 
          | |    __ _ / ___(_) ___
          | |   / _` | |   | |/ _ \
          | |___ (_| | |___| |  __/
          |_____\__,_|\____|_|\___|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: ASTON_NS LE 
Hold rear button - long :  FAIL


U-Boot 1.1.4 (Sep 23 2009 - 10:38:35) Marvell version: 3.4.16  LaCie 1.2.8 256MB

U-Boot code: 00600000 -> 006701D0  BSS: -> 006BDE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz 

DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
<snip>

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 10:05 pm

I have both working at the same time ...

not sure how or why but i can input on one and see what I type in the other....

this is the start up on the serial

Code: Select all

U-Boot 2015.01-dirty (Feb 06 2015 - 10:15:06) 2Big v2

SoC:   Kirkwood 88F6281_A1
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
SF: Detected MX25L4005 with page size 256 Bytes, erase size 64 KiB, total 512 KiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
Hit any key to stop autoboot:  0 
2big2> 
and this is the start up on netconsole

Code: Select all

egiga0

2big2> 

fvdw
Posts: 777
Joined: Wed Mar 18, 2009 11:13 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by fvdw » Sun Feb 15, 2015 10:16 pm

maybe mainline has a way of sending and accepting input via both. When I switch on lacie u-boot to netconsole then serial port gets silent. This is because netconsole works via redirecting stdin and stdout form serial to network interface.
In the output you posted it seems to set in out and er to "nc" (netconsole).

Bottom line is that this lacie u-boot version doesn't seem to run. I will compile it for nwsp2 and see if it runs on that, at least we will know if this source code can produce a working u-boot.
If not, then I can compile one based on 1.3.9 version, that one runs on a nwsp2 as I have it currently on my nwsp2 to enable GPT support.

micromend
Posts: 70
Joined: Thu Jan 15, 2015 9:49 pm

Re: FIX: Was Bricked! changed supercap, u-boot, OS & fit se

Post by micromend » Sun Feb 15, 2015 10:21 pm

thank you again for all your effort.....

I have reset my environment to serial and edited the post above, the I/O still works on both interfaces :)

perhaps it is because i am using netconsole instead of clunc

Post Reply