Welcome! Log In Create A New Profile

Advanced

revive a bricked NSA320

Posted by shivahoj 
revive a bricked NSA320
November 26, 2015 04:58PM
Hello,
i have two NSA-320's, one is perfectly working(with latest u-boot and debian), the other one gives me headaches.
It is the one i wrote about in this thread:http://forum.doozan.com/read.php?2,24478,24478#msg-24478.
Now I managed to get serial access, but the thing stays dead otherwise.
I cannot ping the devices' IP, and it does no dhcp requeston itself. But when i issue "dhcp" at the serial prompt, it requests and gets an IP, but after that still doesnt respond to pings.

this is what i see on the serial port:
   |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: RD-88F6281A LE 

U-Boot 1.1.4 (Mar 23 2011 - 16:09:39) Marvell version: 3.4.19

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0

Soc: 88F6281 A1 (DDR2)
CPU running @ 0Mhz L2 running @ 0Mhz
SysClock = 0Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM CS[1] base 0x10000000   size 256MB 
DRAM Total size 512MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
//---  stateButtonBit = 3, recovery ---//
Kernel address is 0x4640000.

Streaming disabled 
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  2 ... 0 
NSA320>> printenv

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
eth1addr=00:19:CB:00:51:82
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=DD01
PRODUCT_NAME=NSA-320
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
ethaddr=B0:B2:DC:C9:A9:13
console=100000
=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
CASset=min
ethprime=egiga1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
MALLOC_len=3
serverip=10.9.1.200
ipaddr=10.9.1.209
netconsloe=on
netconsole=on
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=100000
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no

Environment size: 2095/131068 bytes

When i type "boot" , it boots a linux kernel(so it says), but there is no further output on the serial console.
NSA320>> dhcp

egiga1 no link
BOOTP broadcast 1
DHCP client bound to address 10.9.1.209
NSA320>> boot


NAND read: device 0 offset 0x4640000, size 0xa00000


Reading data from 0x4640000 --   0% complete.
(stuff omitted)
Reading data from 0x4ff3000 --  97% complete.
Reading data from 0x500c800 --  98% complete.
Reading data from 0x5026000 --  99% complete.
Reading data from 0x503f800 -- 100% complete.
 10485760 bytes read: OK
## Booting image at 02000000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2014-04-15   1:34:47 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5730280 Bytes =  5.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................................................................................................................................................................................................................. done, booting the kernel.
There is no more output after that.
I tried to setup a netconsole( nc-klu 6666 on my mac), but there is no response, and no linux booting, as far as i can tell. The very same netconsole works perfectly on my other NSA320.
I tried to "setenv stdout=nc" , "setenv ncip=10.9.1.200"and then "saveenv", to no avail.
Even trying to change minor things like "setenv bootdelay=10" just makes the whole bootdelay variable disappear...

Any ideas how to go from here?

2 Pieces NSA320 , u-boot 2016.05, debian 4.12.1, Several Mac and Linux boxes connected.
More into soldering than programming. Location:Hildesheim, Germany
Re: revive a bricked NSA320
November 26, 2015 05:29PM
shivahoj,

This is very good news, it is no longer a brick once you can see this in serial console.

1. I don't think stock u-boot supports netconsole. So wait until you can install new u-boot to set it up.

2. Ping problem: what is your router IP address? your ipaddr and serverip need to conform to that LAN. Use setenv in serial console to set these, but don't save.

serverip=10.9.1.200
ipaddr=10.9.1.209
If your router is 192.168.0.1, then (xxx is the netconsole server PC, yyy is the NSA320)
setenv serverip '192.168.0.xxx'
setenv ipaddr '192.168.0.yyy'

3. It is easier now to see if you can boot with UART. So download the latest NSA320 u-boot and boot with kwboot, before installing new u-boot.

With that said, if you don't want to install new u-boot, you can also boot the Debian rootfs 3.16 with stock u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 11/26/2015 05:35PM by bodhi.
Re: revive a bricked NSA320
November 27, 2015 04:51AM
Yes, at least the thing isnt totally mute and deaf anymore...
for clarfication of the above:
10.9.1.209 is the adress of the nas, as it is laid out on the dhcp servers /etc/dhcp3/dhcpd.conf.
10.9.1.200 is the adress of my mac, that is waiting with an open netconsole.
10.9.1.1 is the dhcp server (another linux box in our net). Its /var/log/messages shows the successful dhcp handshake with the NSA320, so its accessible.
So it SHOULD work. Only thing is maybe as You guessed that netconsole isnt working in stock uboot.

For the serial kwboot issue:
Unfortunately all my linux machines have 32bit processors, rather old. so i cannot use kwboot on them, because its compiled for 64bit processors.
The only machine with 64bit is a vmware installed ubuntu inside my recent(-ish) 2011 Macbook pro, kwboot is working perfectly with my working NSA320, but not with the bricked one. This one never got past the "Sending boot message. Please reboot the target...\" message, no matter what i tried.
[joke]
Everyone tinkering with stuff should always have one similar extra device at hand, where the goal to be achieved has already been reached. This makes cross-checking a lot easier...
[/joke]
Maybe i can somehow include the stdin, stdout and stderr variables to the boot arguments line, so to have access to the booted linux kernel?
When i come home from work , i will try to boot the device from an USB stick, as You suggested.
Thanks a lot so far, i will keep You informed.

Just for Info, for others that may struggle with bricked devices, after at least 50-60 attempts to boot, the serial console suddenly worked, without an apparent reason.

Stay patient and do not dump a bricked device too early!!



Edited 4 time(s). Last edit at 11/27/2015 05:07AM by shivahoj.
Re: revive a bricked NSA320
November 27, 2015 06:12AM
shivahoj Wrote:
-------------------------------------------------------
> Yes, at least the thing isnt totally mute and deaf
> anymore...
> for clarfication of the above:
> 10.9.1.209 is the adress of the nas, as it is laid
> out on the dhcp servers /etc/dhcp3/dhcpd.conf.
> 10.9.1.200 is the adress of my mac, that is
> waiting with an open netconsole.
> 10.9.1.1 is the dhcp server (another linux box in
> our net). Its /var/log/messages shows the
> successful dhcp handshake with the NSA320, so its
> accessible.
> So it SHOULD work. Only thing is maybe as
> You guessed that netconsole isnt working in stock
> uboot.
>

Netconsole will not work with stock u-boot. But pinging the router should work. However, the NSA320 has a known problem with network PHY. So if you were able to boot into stock, then it will work after reboot. Similarly, if you can boot into my rootfs (which must be upgraded to kernel 4.2 first), then after that network will work OK.

> For the serial kwboot issue:
> Unfortunately all my linux machines have 32bit
> processors, rather old. so i cannot use kwboot on
> them, because its compiled for 64bit processors.
> The only machine with 64bit is a vmware installed
> ubuntu inside my recent(-ish) 2011 Macbook pro,
> kwboot is working perfectly with my working
> NSA320, but not with the bricked one. This one
> never got past the "Sending boot message. Please
> reboot the target...\" message, no matter what i
> tried.

It's much easier to use your working NSA320 to run the kwboot console. Connect serial wires to the bad one's serial port. And use my ARM kwboot from the u-boot thread:

Quote

To download ARM kwboot binary for UART booting at Dropbox:
kwboot
md5:
0efd011bdb244436e432a8de33e639a1

> When i come home from work , i will try to boot
> the device from an USB stick, as You suggested.
> Thanks a lot so far, i will keep You informed.
>

You will solve the network problem with the new kernel 4.2. So you need to upgrade the kernel to 4.2 in the new 3.18.5 rootfs.

However, to make it work perfectly, you will also need to install the new u-boot. That's why I insisted to try kwboot, because it is almost unbrickable if you get UART booting using kwboot to work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: