Welcome! Log In Create A New Profile

Advanced

RN2120v2 bricked

Posted by alxvt 
RN2120v2 bricked
January 31, 2020 08:32PM
Hello Everyone,
i hope someone can help me..
I was playing (yes.. my bad) with my RN2120v2 u_boot and kernel image to see if i could update debian to a more recent version, the ultimate goal was to install Nextcloud on this hardware, and somehow i bricked everything.
It all happened when trying to erase the mtd partitions i typed .chip instead of the one for the partition. (it was late night..)
All i get from serial when i press the power button now is :
BootROM 1.20
Booting from NAND flash
BootROM: Bad header at offset 00000000
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
BootROM: Bad header at offset 00030000
BootROM: Bad header at offset 00040000
BootROM: Bad header at offset 00050000
....
BootROM: Bad header at offset 012A0000
BootROM: Bad header at offset 012B0000
BootROM: Bad header at offset 012C0000
BootROM: Bad header at offset 012D0000

But my problem is not this. I read other topics and found out it is possible to get u_boot transferred over serial and from there i can restore the mtd content (which i don't have..),
so i tried to use kwboot with different images (RN104), which i suspect don't work because targeting a different cpu
I then tried to download from NetGear the source code from:
ReadyNAS OS 6 (RN102/RN104/2120) thinking i can get u_boot from there and recompile it (i did this before for other boards).

But i couldn't find any u_boot in that package! It seems the package only provide sources for the kernel and OS.
Am i missing something here? I also searched for this version over the net and it seems very hard to find.
The u_boot version is this: (from a serial dump before the mess)
BootROM 1.20
Booting from NAND flash

General initialization - Version: 1.0.0
High speed PHY - Version: 2.1.8  (COM-PHY-V22)
Update Device ID PEX0782311AB
Update Device ID PEX1782311AB
Update Device ID PEX2782311AB
Update Device ID PEX3782311AB
Update Device ID PEX4782311AB
Update Device ID PEX5782311AB
Update Device ID PEX6782311AB
Update PEX Device ID 0x78230
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run with PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gd923454 (Sep 08 2015 - 18:59:32) Marvell version: v2011.12 2014_T2.0p1
Netgear version: 09/08/2015 ReadyNAS-2120 v2.0

Board: DB-78460-BP rev 2.0
SoC:   MV78230 B0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU 0
       CPU    @ 1600 [MHz]
       L2     @ 800 [MHz]
       TClock @ 250 [MHz]
       DDR    @ 800 [MHz]
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
DRAM:  2 GiB

Map:   Code:		0x7fedf000:0x7ff9f204
       BSS:		0x7ffefc20
       Stack:		0x7f9deef8
       Heap:		0x7f9df000:0x7fedf000

NAND:  128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0.0(0-0): Root Complex Interface, Detected Link X1, GEN 2.0
PEX 0.1(1-1): Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1.0(2-2): Root Complex Interface, Detected Link X1, GEN 2.0
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Host Mode
Modules Detected:
Net:   egiga0, egiga1 [PRIME]
Power On!


Another problem i have when i try to send u_boot.bin over the serial is that on this machine i have to keep pressing the power button for the entire time (1+ hours..) until the image is downloaded, otherwise the power button lights up the power on led for only 2 seconds. Is this common on other models?

So at the end my question is: is there anybody so kind to point me to where the u_boot for this particular board could be? Or if anybody owns a 2120 would be so kind to dump the mtd partition for u_boot and post it here?

Thanks a lot!
Sandro
Re: RN2120v2 bricked
January 31, 2020 10:02PM
Sandro,

U-Boot 2011.12-gd923454 (Sep 08 2015 - 18:59:32) Marvell version: v2011.12 2014_T2.0p1
Netgear version: 09/08/2015 ReadyNAS-2120 v2.0

Board: DB-78460-BP rev 2.0
SoC:   MV78230 B0
       running 2 CPUs
       Custom configuration

You can try to unbrick it while waiting for somebody to upload mtd0. Build mainline u-boot for this board, and run kwboot with it to see if you can get to the u-boot prompt.

Your is an Armada XP SoC with 2 cores.

My source tree shows:

./u-boot-2019.10/board/Marvell/db-mv784mp-gp

If you need help building or running it, let me know.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: RN2120v2 bricked
February 01, 2020 04:24PM
Bodhi, thanks a lot for helping.

I am recompiling u-boot mainline right now using db-mv784mp-gp_defconfig.

Should i set the boot method to UART in menuconfig? standard is SPI NOR flash

Sandro
Re: RN2120v2 bricked
February 01, 2020 08:06PM
Sandro,

> Should i set the boot method to UART in
> menuconfig? standard is SPI NOR flash

Yes. It should be set

CONFIG_MVEBU_SPL_BOOT_DEVICE_UART=y

And then build u-boot-spl.kwb image to run kwboot with.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: RN2120v2 bricked
February 01, 2020 09:16PM
Bodhi,
i did that but the result is strange (to me at least).

alxvt@XPS15-9530:~/u-boot-v2019.10$ ./tools/kwboot -t /dev/ttyUSB0 -b u-boot-spl.kwb 
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [....................................................+xmodem: Protocol error

The send image progress goes fast until 19%, then it slows down to one dot every 2 seconds.
This with the power button pressed.
If i release the power button i get that Protocol error.

If i wait for the progress counter to get to 100% ( 1:20min ! ) i get nothing back from uart, like it does not boot at all.

It just does not make sense..

|=====|
| AlxVt |
|=====|
Re: RN2120v2 bricked
February 01, 2020 09:59PM
alxvt,

> The send image progress goes fast until 19%, then
> it slows down to one dot every 2 seconds.
> This with the power button pressed.
> If i release the power button i get that Protocol
> error.

That's a peculiar behavior seems to be with this box only.

>
> If i wait for the progress counter to get to 100%
> ( 1:20min ! ) i get nothing back from uart, like
> it does not boot at all.
>
> It just does not make sense..

Sorry, it does not make sense to me, too! I've not come across this Power button behavior before with any other Marvell Armada or Kirkwood boxes.

I think the best approach at this point is to find the mtd0 backup from somebody and try kwboot with it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: RN2120v2 bricked
February 05, 2020 08:05PM
Quick update:
I am still investigating on this and found this from Barebox.org
which talks about the uart booting of this board:
Quote

The mvebu SoCs support booting from UART. For this there is a tool available in barebox called kwboot. Quite some mvebu boards are reset once more when they already started to read the first block of the image to boot which obviously results in a failure to boot this image. If you want to boot such a board, use the parameter -n 15 for kwboot to delay uploading the image and try to hit the right (i.e. second) window harder. (The number might have to be adapted per board. The semantic is that the magic string is sent until the 15th NAK is seen and only then the image is sent.)

This is interesting, however i am recompiling for the RN2120 and it complains about the missing “binary.0” which happens to be the ram initialization code to be extracted from the vendor uboot..
a neverending loop..

but i don’t give up..
i will try the uboot version of kwboot to see if it support the -n option..
Re: RN2120v2 bricked
February 05, 2020 10:37PM
alxvt Wrote:
-------------------------------------------------------
> Quick update:
> I am still investigating on this and found this
> from
> Barebox.org
> which talks about the uart booting of this board:
>
Quote

> The mvebu SoCs support booting from UART. For this
> there is a tool available in barebox called
> kwboot. Quite some mvebu boards are reset once
> more when they already started to read the first
> block of the image to boot which obviously results
> in a failure to boot this image. If you want to
> boot such a board, use the parameter -n 15 for
> kwboot to delay uploading the image and try to hit
> the right (i.e. second) window harder. (The number
> might have to be adapted per board. The semantic
> is that the magic string is sent until the 15th
> NAK is seen and only then the image is sent.)
>
>
> This is interesting, however i am recompiling for
> the RN2120 and it complains about the missing
> “binary.0” which happens to be the ram
> initialization code to be extracted from the
> vendor uboot..
> a neverending loop..
>
> but i don’t give up..
> i will try the uboot version of kwboot to see if
> it support the -n option..

UART booting is the similar for uboot and barebox. Both use kwhoot. The delay option is different in uboot. Also, there is a specific option for your box (Armada XP).

Run kwboot without any parameter to see the usage help.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: