Bricked DNS 320L A3

1,361 views
Skip to first unread message

Glaucio Campos

unread,
Apr 13, 2016, 5:47:29 PM4/13/16
to al...@googlegroups.com
Hi, my NAS is bricked by a incomplete firmware upgrade, I have done the steps of an old posts, but no success in re-flash a firmware.
Could you help me?
The file contains the boot log.
After u-boot console, what do I have to do?
I already try to mount a pendrive, but no success.
Coud you help me to revive my DNS-320L?
Thank you.

printenv
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
bootcmd=nand read.e 0xa00000 0x100000 0x300000;nand read.e 0xf00000 0x600000 0x300000;bootm 0xa00000 0xf00000
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
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) $(mvPhoneCo;
bootdelay=1
disaMvPnp=no
ethaddr=00:50:43:00:02:02
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
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
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
enaAutoRecovery=yes
pcieTune=no
ethact=egiga0
gatewayip=192.168.0.1
netmask=255.255.255.0
ipaddr=192.168.0.100
serverip=2.66.66.32
dnsip=192.168.0.1

Environment size: 1314/131068 bytes

HELP
help
?       - alias for 'help'
SatR - sample at reset sub-system, relevent for DB only
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootext2    dev:boot_part1,boot_part2 addr boot_image linux_dev_name
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bubt    - Burn an image on the Boot Nand Flash.
chpart  - change active partition
cmp     - memory compare
cmpm    - Compare Memory
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
date    - get/set/reset date & time
dclk    - Display the MV device CLKs.
dhcp    - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
eeprom  - EEPROM sub-system
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fi      - Find value in the memory.
flinfo  - print FLASH memory information
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
g       - start application at cached address 'addr'(default addr 0x40000)
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
ide     - IDE sub-system
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
ir      - reading and changing MV internal register values.
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - Diasplay address decode windows
md      - memory display
me      - PCI master enable
mm      - memory modify (auto-incrementing)
mmcinit - init mmc card
mp      - map PCI BAR
mtdparts- define flash/nand partitions
mtest   - simple RAM test
mw      - memory write (fill)
nand                   - NAND sub-system
nboot   - boot from NAND device
nbubt   - Burn a boot loader image on the Boot Nand Flash.
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead - Read PCI-E Phy register
pciePhyWrite    - Write PCI-E Phy register
phyRead - Read Phy register
phyWrite        - Write Phy register
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
rcvr    - Satrt recovery process (Distress Beacon with TFTP server)
reset   - Perform RESET of the CPU
resetenv        - Return all environment variable to default.
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
se      - PCI Slave enable
setenv  - set environment variables
sflash  - read, write or erase the external SPI Flash.
sg      - scanning the PHYs status
sp      - Scan PCI bus.
switchRegRead   - Read switch register
switchRegWrite  - Write switch register
Temp    - read chip Tj temp
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version

boot.log

João Cardoso

unread,
Apr 14, 2016, 10:23:39 AM4/14/16
to Alt-F


On Wednesday, 13 April 2016 22:47:29 UTC+1, Glaucio Campos wrote:
Hi, my NAS is bricked by a incomplete firmware upgrade,

You have to supply more info.
What fw was you using? What firmware were you trying to upgrade to?
 
I have done the steps of an old posts,

What post? please post its link and what step you performed and what its outcome was.
 
but no success in re-flash a firmware.
Could you help me?
The file contains the boot log.
 
The log shows that you have a mix of D-Link (the linux kernel) and Alt-F (the rootfs)
U-boot successfully loads both and starts running the linux kernel, but it can't find a D-Link compatible root filesystem and panics.

After u-boot console, what do I have to do?
 
I already try to mount a pendrive, but no success.

You have to tell us what exactly you have done.
What commands you used, what its output was, what the pen filesystem was (FAT?) and what was its contents.
 
Coud you help me to revive my DNS-320L?

Yes. given full enough information.

Glaucio Campos

unread,
Apr 14, 2016, 4:24:02 PM4/14/16
to al...@googlegroups.com
Well,  I tried to get back to DLink's firmware, I was on Alt-F-0.1RC4.1-DNS-320L-rev-A1A2A3.bin... Tried to upgrade to DNS-320L_fw_revA3_1-06b03_all_multi_20150728.
After power failure on upgrade proccess, I tried to do these steps....
http://dns323.kood.org/howto:reflash_from_windows  (I tried to split the uKernel and uRamDisk... but no success, I tried to put the files uKernel and uRamDisk on a ext2 pendrive partition... but I don't know how to mount and what I have to do
)
And
https://habrahabr.ru/post/244921/ (Tried to flash with tftp, no luck)
See the log...

Marvell>> tftp 0x6400000 openwrt-kirkwood-uImage
Using egiga0 device
TFTP from server 2.66.66.32; our IP address is 2.66.66.201
Filename 'openwrt-kirkwood-uImage'.
Load address: 0x6400000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################
done
Bytes transferred = 1577444 (1811e4 hex)
Marvell>> nand erase 0x100000 0x400000

NAND erase: device 0 offset 0x100000, size 0x400000
Erasing at 0x4e0000 -- 100% complete.
OK
Marvell>> nand write.e 0x6400000 0x100000 0x400000

NAND write: device 0 offset 0x100000, size 0x400000
load addr ....  =6400000

Writing data at 0x4ff800 -- 100% complete.
 4194304 bytes written: OK
Marvell>> tftp 0x6400000 openwrt-kirkwood-generic-jffs2-nand-2048-128k.img
Using egiga0 device
TFTP from server 2.66.66.32; our IP address is 2.66.66.201
Filename 'openwrt-kirkwood-generic-jffs2-nand-2048-128k.img'.
Load address: 0x6400000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################
done
Bytes transferred = 2754560 (2a0800 hex)
Marvell>> nand erase 0x500000 0xfb00000

NAND erase: device 0 offset 0x500000, size 0xfb00000
Erasing at 0x7fe0000 --  49% complete.
NAND 128MB 3,3V 8-bit: MTD Erase failure: -22

NAND 128MB 3,3V 8-bit: MTD get bad block failed: -22
ERROR
Marvell>>

https://groups.google.com/forum/#!searchin/alt-f/bricked/alt-f/FPBtrvhMZAU/pyAmIouXbLwJ (cat /proc/mtd doesn't works)
https://groups.google.com/forum/#!searchin/alt-f/bricked/alt-f/kbzK0U4jip0/hgT3aAxrCZMJ
https://groups.google.com/forum/#!searchin/alt-f/bricked/alt-f/qqopGux2Y1A/kzOzZVnElp4J

Thank you...

João Cardoso

unread,
Apr 15, 2016, 10:27:51 AM4/15/16
to Alt-F


On Thursday, 14 April 2016 21:24:02 UTC+1, Glaucio Campos wrote:
Well,  I tried to get back to DLink's firmware, I was on Alt-F-0.1RC4.1-DNS-320L-rev-A1A2A3.bin... Tried to upgrade to DNS-320L_fw_revA3_1-06b03_all_multi_20150728.
After power failure on upgrade proccess,

You have not made any progress after your last post, https://groups.google.com/d/msg/alt-f/BdIM55T7ths/dFNt5xKiAgAJ

And you didn't said if the box was bootable to u-boot after the flash last error, so there was no point continuing.

 

You have a DNS-320L, not a DNS-323, its completely different!
Every box model has a different method, that might even vary with its Hardware rev. (e.g., the 320-rev-A is different from the 320-rev-B)
 
(I tried to split the uKernel and uRamDisk... but no success,

No sucess in splitting the fw file? That is essential.
 
I tried to put the files uKernel and uRamDisk on a ext2

No, you have to put them on a *FAT* formatted pen. U-boot only handles that.
 
pendrive partition... but I don't know how to mount and what I have to do

Read this: https://groups.google.com/d/msg/alt-f/vbDtHa8cjpU/PGM-rpO4GU4J (the 320-rev-B is identical to the 320L-rev-A)

Or, if you can setup a tftpserver, read this: https://groups.google.com/d/msg/alt-f/kbzK0U4jip0/5Qk2bld9DgQJ

You have to understand what you are doing, a mistake can made the box not bootable even to u-boot.
In that case you would have to follow this more complex procedure https://groups.google.com/d/msg/alt-f/uhxqZ0N-H28/XNzot2oKEQAJ 

And remember, each box is different, you have to be careful with details. If you don't understand anything, ask.
I recommend using an Alt-F kernel and rootfs, load them into memory at the standard addresses and execute (bootm) them, instead of directly flashing them; if/when if boots, you can use the webUI to flash what you want.

If you succeed you could post a complete procedure description, or even add a new wiki entry.

Glaucio Campos

unread,
Apr 15, 2016, 12:25:42 PM4/15/16
to al...@googlegroups.com
Hi João.
Well the is still working on U-Boot. I can access the console.
No I didn't have success with the split... Could you send me those files?

Well about the FAT, I had use ext2 because I read on a post. But I can try it later.
I have a tftpserver working.... There's an option called tftpboot, but I don't know how to mount and whose file I have to use for it.
I'll gonna try the post for flash by tftp but.... Could you say what files I have to use?

About that log....

"Bytes transferred = 2754560 (2a0800 hex)
Marvell>> nand erase 0x500000 0xfb00000

NAND erase: device 0 offset 0x500000, size 0xfb00000
Erasing at 0x7fe0000 --  49% complete.
NAND 128MB 3,3V 8-bit: MTD Erase failure: -22"
It fails at 49%... with the tftpserver, but I know the file is not for dns 320L.

Thanks for the help!!

João Cardoso

unread,
Apr 15, 2016, 2:23:25 PM4/15/16
to al...@googlegroups.com


On Friday, 15 April 2016 17:25:42 UTC+1, Glaucio Campos wrote:
Hi João.
Well the is still working on U-Boot. I can access the console.
No I didn't have success with the split...

You should tell us what program you used, how you used it and what error it displayed, a verbatim Copy/Paste. It's the only way to fix it or point what you did wrong.
 
Could you send me those files?
 
Attached the kernel and the initramfs files result of:

# dns323-fw -s Alt-F-0.1RC4.1-DNS-320L-rev-A1A2A3.bin 
product_id=0;
custom_id=8;
model_id=b;
sub_id=1;
NewVersion=1;
signature="DNS320L";

sig_num=6 header=128 Next_offset=0
ko=128          kl=1794536      kr=0    kc=2164977676   next=1794664
io=1794664      il=3055680      ir=0    ic=3844963483   next=4850344
so=4850344      sl=14862336     sr=0    sc=1273201637   next=19712680
do=19712680     dl=0            dr=0    dc=0    next=19712680
filesz=19712680 compsz=19712680

signature is "DNS320L"
kernel saved, checksum is OK.
initramfs saved, checksum is OK.
sqimage saved, checksum is OK.
defaults saved, checksum is OK.


Well about the FAT, I had use ext2 because I read on a post. But I can try it later.
I have a tftpserver working.... There's an option called tftpboot, but I don't know how to mount and whose file I have to use for it.

I posted a link that shows the u-boot commands to use with tftp (and another link with the fatload u-boot command)...

 
I'll gonna try the post for flash by tftp but.... Could you say what files I have to use?

The attached 'kernel' file is what is stored at mtd1, while the 'initramfs' file is for mtd2.
Use the fatload command from the linked post changing only the file name accordingly.

PS: please notice that:
1-the procedures described in the links I posted about will only load and run the system from memory, they will not flash the firmware. You  have to flash it from within the webUI, or at the next reboot the problem will reappear,
2-the firmware for all but the dns-321/323 has three components; the Alt-F webUI should work mostly OK without the third fw component (the sqimage, which contains all non-boot essential packages files)
3-I have not tested the 'fatload' procedure, I only use the 'tftp' one.
kernel
initramfs

Glaucio Campos

unread,
Apr 15, 2016, 3:37:38 PM4/15/16
to Alt-F
Thank you João. I'll gonna test it and post results tonight at home.

Glaucio Campos

unread,
Apr 15, 2016, 9:46:15 PM4/15/16
to Alt-F
Joao. I've done with the files kernel and initram you posted and upload with tftpserver. Now its working!! Thank you!!!
Reply all
Reply to author
Forward
0 new messages