Welcome! Log In Create A New Profile

Advanced

UART Boot DNS-320 B1 with broken NAND

Posted by Ironaxe 
UART Boot DNS-320 B1 with broken NAND
October 08, 2018 03:41AM
Hi there.
Ive got a Problem with my old D-Link NAS.
The NAND Flash is broken and i hoped that i can Boot it via UART and maybe solder in a new NAND Flash or boot from USB.
The NAS is a DNS-320 rev.B1

with Marvel 88f6702 SoC

I so far tried allot uboot.kwb Files that i found.
Allso followed this Instructions, but without luck.


kwboot either stops with xmodem: bad message
or
after sending the boot image

Hopefully someone can help.
Attachments:
open | download - screenshot.jpg (251.6 KB)
Re: UART Boot DNS-320 B1 with broken NAND
October 08, 2018 03:57AM
Ironaxe,

> The NAS is a DNS-320 rev.B1
> with Marvel 88f6702 SoC

The best u-boot images to try are: NSA310S, and Pogoplug V4.

uboot.2017.07-tld-1.nsa310s.bodhi.tar
uboot.2017.07-tld-1.pogo_v4.bodhi.tar

See the release thread for download link:
https://forum.doozan.com/read.php?3,12381

Please post the entire serial console log of your kwboot run (include the kwboot command).

Note: remember to use option -p with kwboot command.

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



Edited 1 time(s). Last edit at 10/08/2018 03:58AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
October 08, 2018 04:37AM
Hi, thank you for the fast reply.

I now tried both Files without success.

root@debian:/u-boot# ./tools/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
 .........
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


root@debian:/u-boot# ./tools/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310s.mtd0.kwb -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
..........
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


Im using a CP2102 USB to UART Bridge on a Virtual Machine



Edited 1 time(s). Last edit at 10/08/2018 04:38AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
October 08, 2018 06:07AM
Ironaxe Wrote:
-------------------------------------------------------
> Hi, thank you for the fast reply.
>
> I now tried both Files without success.
>
>
> root@debian:/u-boot# ./tools/kwboot -t -B 115200
> /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p
> Sending boot message. Please reboot the
> target...\
> Sending boot image...
>   0 %
> [......................................................................]
>   1 %
> [......................................................................]
>   3 %
> [......................................................................]
>   5 %
> [......................................................................]
>   6 %
> [..............................................................
........]
>  .........
>  94 %
> [......................................................................]
>  95 %
> [......................................................................]
>  97 %
> [......................................................................]
>  99 % [....................................]
> [Type Ctrl-\ + c to quit]
> 
>
>
>
> root@debian:/u-boot# ./tools/kwboot -t -B 115200
> /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.nsa310s.mtd0.kwb -p
> Sending boot message. Please reboot the
> target...-
> Sending boot image...
>   0 %
> [......................................................................]
>   1 %
> [......................................................................]
>   3 %
> [......................................................................]
>   5 %
> [......................................................................]
>   6 %
> [......................................................................]
> ..........
>  94 %
> [......................................................................]
>  95 %
> [......................................................................]
>  97 %
> [......................................................................]
>  99 % [....................................]
> [Type Ctrl-\ + c to quit]
> 
>
>
> Im using a CP2102 USB to UART Bridge on a Virtual
> Machine

Running on a VM could the problem. Normally, at that 99% it is working and will start running. But most probably the box lost the handshake so it does not know it is the end of the image.

If you could, try running kwboot directly from the host system. Or get low cost box such as Pogoplug Mobile or RPi Zero, and run serial console from there.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 01:45AM
Unfortunately this hasnt worked.
I tried it on my actual NAS with Ubuntu Server with exactly the same result.
Maybe i could try with a MAX3232 on a real serial Port.
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 04:29AM
Ironaxe Wrote:

> Maybe i could try with a MAX3232 on a real serial
> Port.

Sorry I don't get that. Was the serial module converter CP2102 connected to a USB port that you can use directly on the Ubuntu server?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 07:12AM
Yep. Thats right.

I first tried with a VM running on my main ( Windows ) PC, and now i tried on my Ubuntu Server NAS ( ITX PC )



Edited 1 time(s). Last edit at 10/09/2018 12:32PM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 03:55PM
I plan to compile a new kwboot binary to get the latest enhancements from recently submitted patches. But I will not be able to get to that task for another week. A new kwboot might help.

By the way, are you sure if your NAND was really bad (observed symptoms of failing NAND), or is there a chance that RAM is bad too?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 04:12PM
The DNS-320 only booted when the NAND was frozen. ( Compressed Air from a Spray Can ) so i guess it was a bad Temperature Sensor or something like that.
Re: UART Boot DNS-320 B1 with broken NAND
October 09, 2018 09:36PM
Just an FYI, if you are running a debian stretch based system installing the u-boot-tools package will install the 2016.11 version of kwboot.

Ray
Re: UART Boot DNS-320 B1 with broken NAND
October 10, 2018 01:32AM
Do i need another Version?
Im not that much of a Linux guy, just trying to fiddle my way through. ^^
Re: UART Boot DNS-320 B1 with broken NAND
October 10, 2018 05:59PM
Ironaxe Wrote:
-------------------------------------------------------
> Do i need another Version?
> Im not that much of a Linux guy, just trying to
> fiddle my way through. ^^

As I said, it might help. Usually, any kwboot version will work with an old Kirkwood box like DNS-320, and most of the forum-supported Kirkwood boxes. Your case is special, I just can't tell if you have hardware (serial port) problem or not. So it does not hurt to try various kwboot to see if there is an improvement that happens to fix this handshaking problem.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 15, 2018 03:13PM
I now tried with a MAX3232 Controller on a Standard Serial Port.
Both, VM and Ubuntu PC with the same results.
New NAND Chip should be here in maybe 2 weeks.

Found this snipped of a Boot Message in an old Text File i still had.

U-Boot 1.1.4 (Apr 19 2012 - 11:21:19) Marvell version: 3.6.0.DNS-320B.01

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

    Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
    SysClock = 400Mhz , TClock = 166Mhz

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

    CPU : Marvell Feroceon (Rev 1)

It is basically this Board with half the RAM.



Edited 1 time(s). Last edit at 10/15/2018 03:38PM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
October 15, 2018 07:08PM
U-Boot 1.1.4 (Apr 19 2012 - 11:21:19) Marvell version: 3.6.0.DNS-320B.01

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

    Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
    SysClock = 400Mhz , TClock = 166Mhz

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

    CPU : Marvell Feroceon (Rev 1)

This box u-boot is a close match for the NSA310S stock u-boot.

U-Boot 1.1.4 (May 28 2013 - 16:07:08) Marvell version: 3.6.0

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

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  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)

So I would say that they have the same BootROM and kwboot with the new NSA310S u-boot image will work. It might not go very far becasue the RAM difference, but the loaded u-boot should start running and show its banner.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 29, 2018 04:01AM
Ok. New NAND is soldered in but nothing seems to work.
Getting the same results as usual.
Installed U-Boot-Tools package is version 2018.05
Re: UART Boot DNS-320 B1 with broken NAND
October 30, 2018 03:59AM
Let me think of something. Will check back to this topic in a few days.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
October 31, 2018 05:05AM
Thx. Take your time.
BTW. Is it possible to dump the Nand to an external USB Drive?
I now got a second unit with exactly the same issue but i can access the stock u-boot over serial.
Maybe i could dump U-Boot from this Device and test it on the other.
Re: UART Boot DNS-320 B1 with broken NAND
November 01, 2018 02:32AM
Ironaxe,

> I now got a second unit with exactly the same
> issue but i can access the stock u-boot over
> serial.

If you can access u-boot in serial then you could try booting new Debian rootfs on USB. Is that your goal? or you just want to fix the bricked box?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
November 01, 2018 11:40AM
Main goal is to get both Units to work again without the need to freeze the NAND.
Either through USB or new NAND.
Re: UART Boot DNS-320 B1 with broken NAND
November 01, 2018 03:41PM
Ironaxe,

> Main goal is to get both Units to work again
> without the need to freeze the NAND.
> Either through USB or new NAND.

Then it is easier to boot with rootfs USB on the unit you have serial console. At least you will have a unit that fully working.

And then you can dump NAND on working unit to rescue the 2nd one. You can also figure out how to load u-boot without NAND. Some BootROM allow loading and booting from USB or HDD (such as the Pogo V3). We never had to do this on Kirkwood boxes yet, but I know from reading Ref Manual, most Kirkwood SoC has this capabilty.

However, if you can kwboot the 2nd unit, then new NAND is not that important, can be figured out once you booted kwboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 02:52AM
BTW. Here is the full Serial Boot output.



 ** MARVELL BOARD: DB-88F6702A-BP LE

U-Boot 1.1.4 (Apr 19 2012 - 11:21:19) Marvell version: 3.6.0.DNS-320B.01

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

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz

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

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
load addr ....  =a00000

 3145728 bytes read: OK

NAND read: device 0 offset 0x600000, size 0x300000
load addr ....  =f00000

 3145728 bytes read: OK
## Booting image at 00a00000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2012-01-17  10:46:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2610908 Bytes =  2.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2012-07-06  11:53:44 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1750186 Bytes =  1.7 MB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux........................................................................................................................................................................ done, booting the kernel.
Linux version 2.6.31.8 (jack@swtest5) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #3 Tue Jan 17 18:46:16 CST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32512
Kernel command line: root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 115468KB available (4924K code, 334K data, 136K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:128
Console: colour dummy device 80x30
Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 128MB
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
PEX1_MEM ....no such
PEX1_IO ....no such
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_5.1.3_patch29)-- DB-88F6702A-BP  Soc: 88F6702 A1 LE

 Detected Tclk 166666667 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c403e740
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
mvPexLocalBusNumSet: ERR. Invalid PEX interface 1
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 1708K
RTC has been updated!!!
rtc mv_rtc: rtc core: registered kw-rtc as rtc0
RTC registered
cpufreq: Init kirkwood cpufreq driver
XOR registered 4 channels
XOR 2nd invalidate WA enabled
cesadev_init(c000ed5c)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.12)
msgmni has been set to 229
alg: No test for cipher_null (cipher_null-generic)
alg: No test for ecb(cipher_null) (ecb-cipher_null)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
alg: No test for hmac(digest_null) (hmac(digest_null-generic))
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler anticipatory registered (default)
Initializing ths8200_init
Initializing dove_adi9889_init
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
brd: module loaded
loop: module loaded
Integrated Sata device found
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o 2 Giga ports supported
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload (TSO) supported
  o Large Receive offload (LRO) supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Network Fast Processing (Routing) supported - (Disabled)
  o Driver ERROR statistics enabled
  o Proc tool API enabled
  o SKB Reuse supported - (Disabled)
  o SKB Recycle supported - (Disabled)
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
     o register under mv88fx_eth platform
     o egiga0, ifindex = 2, GbE port = 0

Warning: Giga 1 is Powered Off

mvFpRuleDb (c4569000): 1024 entries, 4096 bytes
Counter=0, opIdx=6, overhead=16
Counter=1, opIdx=2, overhead=0
Counter=2, opIdx=1, overhead=18
Counter=3, opIdx=2, overhead=0
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1013 at 0x000007ea0000
Using static partition definition
Creating 7 MTD partitions on "nand_mtd":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000600000 : "uImage"
0x000000600000-0x000000b00000 : "ramdisk"
0x000000b00000-0x000006f00000 : "image"
0x000006f00000-0x000007900000 : "rescue firmware"
0x000007900000-0x000007e00000 : "config"
0x000007e00000-0x000008000000 : "my-dlink"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc mv_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: gzip image found at block 0
EXT4-fs (ram0): no journal
EXT4-fs (ram0): delayed allocation enabled
EXT4-fs: mballoc enabled
EXT4-fs (ram0): mounted filesystem without journal
VFS: Mounted root (ext4 filesystem) on device 1:0.
Freeing init memory: 136K
init started: BusyBox v1.11.2 (2012-06-28 16:57:05 CST)
starting pid 538, tty '': '/etc/rc.sh'
** Mounting /etc/fstab
umount: proc: not mounted
umount: proc: not mounted
umount: /usr/local/modules: not mounted
sh: can't open /usr/sbin/pre_usb.sh
insmod: applet not found
umount: /usr/local/tmp/image.cfs: not found
umount: /usr/local/tmp: not mounted
first good block is 0
image len = 25034752 , image checksum = 8b73f1e3
dump image checksum=8b73f1e3
rmmod: applet not found
ln: /lib/./libnss_dns-2.8.so: File exists
ln: /lib/./libnss_dns.so.2: File exists
ln: /usr/sbin/./system_init: File exists
mknod: /dev/REG: File exists
hardware init
GbE port 0: TxEnable WA - Enabled, deep=1, tx_en_bk=1

mtd check v1.01.05292012
/usr/local/config free size is 4734976
** copy config files
cp: cannot stat '/usr/local/config/user.log.old': No such file or directory
usbcore: registered new interface driver usblp
** set loopback interface
old ver:20120712
new ver:20120712
first good block is 0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB sizegiga0: mac address changed
e 64
Dumping data starting at 0x00000000 and ending at 0x00000800...
mac1 = AC:F1:DF:12:DF:9A
lan0:ifconfig egiga0 hw ether AC:F1:DF:12:DF:9A
egiga0: link down
egiga0: started
DNS-320B function
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ADDRCONF(NETDEV_UP): egiga0: link is not ready
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
egiga0: link up, full duplex, speed 1 Gbps
ADDRCONF(NETDEV_CHANGE): egiga0: link becomes ready
ip6tnl0: Disabled Privacy Extensions
IPv4 over IPv4 tunneling driver
tunl0: Disabled Privacy Extensions
net.ipv6.conf.default.accept_dad = 2
net.ipv6.conf.egiga0.accept_dad = 2
net.ipv6.conf.default.dad_transmits = 1
net.ipv6.conf.egiga0.dad_transmits = 1
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.accept_redirects = 1
*** execute rc.init.sh
awk: /var/run/udhcpc0.pid: No such file or directory
udhcpc (v1.11.2) started
Sending discover...
Sending select for 192.168.1.110...
Lease of 192.168.1.110 obtained, lease time 268435455
sh: you need to specify whom to kill
crond[1313]: crond (busybox 1.11.2) started, log level 8

deleting routers
route: SIOCDELRT: No such process
call load_module network
ip: RTNETLINK answers: Operation not supported
ip: RTNETLINK answers: Operation not supported
crond[1349]: crond (busybox 1.11.2) started, log level 8

*** get Time from rtc and set it into system ****
rtc: RTC time = 2018/11/7 Wed 9:27:34
Wed Nov  7 09:27:34 UTC 2018
*** set Time Zone ****
Wed Nov  7 10:27:34 CET 2018
*** Do not adjust RTC time ***

Module IPC SERVER Version:(1.00.20090706)

ads=0
created mail daemon thread 0
ifconfig: egiga1: error fetching interface information: Device not found
Command: wget -T5 -t3 -q http://cfaj.freeshell.org/ipaddr.cgi -O /tmp/exip.0
system daemon v1.03.0529212
chk_io v1.02.20120118
cp: cannot stat '/usr/local/config/ups_slave.dat': No such file or directory

mfg_start version 1.00(2012-07-12)

Wed Nov  7 10:27:48 2018


Please press Enter to activate this console. 2018-11-07 10:27:48: (../../src/log.c.166) server started
LED_POWER_ON

starting pid 1580, tty '/dev/ttyS0': '/bin/login'
Password of admin:


BusyBox v1.11.2 (2012-06-28 16:57:05 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#

I made a full NAND Dump ( using a NAND Flasher and Clip ) it looks ok but i cant kwboot this Unit too. :(
I can upload the Dump somewhere if you like ( 132 MB )
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 03:29AM
Ironaxe,

Creating 7 MTD partitions on "nand_mtd":
0x000000000000-0x000000100000 : "u-boot"

That's your mtd0. You only need to dump this with nanddump.

# this nanddump command produces the 1MB file mtd0.dns-320 in the current directory
nanddump --noecc --omitoob -f mtd0.dns-320 /dev/mtd0

If nanddump is not available in stock OS, then download the binary in this tarball (nanddump binary in this tarball works in stock 2.6.xx kernel)


Quote
https://forum.doozan.com/read.php?3,12381

A. Flashing Instruction:


Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.
.

Here I've attached the latest ARM kwboot that I recently built with 2018.11 source in this post. Use this if you have an ARM box (it will not work in Ubuntu x86 machine). If you don't have an ARM box that you can run ARM kwboot from, I'll have to build one for you (let me know and I'll build that when I can).

-bodhi
===========================
Forum Wiki
bodhi's corner
Attachments:
open | download - kwboot (18.4 KB)
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 12:31PM
Would a Pi Zero Work?
I got one incomming in the next few days.
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 02:07PM
I used pi 0 to kwboot dreamplug clone (appneta m22) and it worked very well.
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 04:59PM
Ironaxe Wrote:
-------------------------------------------------------
> Would a Pi Zero Work?
> I got one incomming in the next few days.


Yes, as David said. This is an ARM kwboot so it will run on rPi.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 08:29PM
If he uses raspbian , he can just install the u-boot-tools package. kwboot is in the package.
Re: UART Boot DNS-320 B1 with broken NAND
November 07, 2018 08:38PM
daviddyer Wrote:
-------------------------------------------------------
> If he uses raspbian , he can just install the
> u-boot-tools package. kwboot is in the package.

kwboot is available in all Debian and derivative distributions.

But it does not apply in this case. The kwboot binary I’ve uploaded is different. Look back a few posts.

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



Edited 1 time(s). Last edit at 11/07/2018 08:39PM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
November 22, 2018 04:33AM
Finally it worked ^^

Dumped the NAND U-Boot Partition.
And kwboot worked. ( just tried your new one )

Boot Log "New" Unit:

root@raspberrypi:/media/storage# ./kwboot -t -B 115200 /dev/ttyAMA0 -b mtd0.dns-320 -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  ..........
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [......................................................................]
 99 % [..]
[Type Ctrl-\ + c to quit]


 ** MARVELL BOARD: DB-88F6702A-BP LE

U-Boot 1.1.4 (Apr 19 2012 - 11:21:19) Marvell version: 3.6.0.DNS-320B.01

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

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz

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

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
load addr ....  =a00000

 3145728 bytes read: OK

NAND read: device 0 offset 0x600000, size 0x300000
load addr ....  =f00000

 3145728 bytes read: OK
## Booting image at 00a00000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2012-01-17  10:46:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2610908 Bytes =  2.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2012-07-06  11:53:44 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1750186 Bytes =  1.7 MB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux.............................................................                                               ................................................................................                                               ........................... done, booting the kernel.
Linux version 2.6.31.8 (jack@swtest5) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) )                                                #3 Tue Jan 17 18:46:16 CST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32512
Kernel command line: root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 115468KB available (4924K code, 334K data, 136K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:128
Console: colour dummy device 80x30
Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 128MB
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
PEX1_MEM ....no such
PEX1_IO ....no such
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_5.1.3_patch29)-- DB-88F6702A-BP                                                 Soc: 88F6702 A1 LE

 Detected Tclk 166666667 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c403e740
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
mvPexLocalBusNumSet: ERR. Invalid PEX interface 1
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 1708K
RTC has been updated!!!
rtc mv_rtc: rtc core: registered kw-rtc as rtc0
RTC registered
cpufreq: Init kirkwood cpufreq driver
XOR registered 4 channels
XOR 2nd invalidate WA enabled
cesadev_init(c000ed5c)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.12)
msgmni has been set to 229
alg: No test for cipher_null (cipher_null-generic)
alg: No test for ecb(cipher_null) (ecb-cipher_null)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
alg: No test for hmac(digest_null) (hmac(digest_null-generic))
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler anticipatory registered (default)
Initializing ths8200_init
Initializing dove_adi9889_init
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
brd: module loaded
loop: module loaded
Integrated Sata device found
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o 2 Giga ports supported
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload (TSO) supported
  o Large Receive offload (LRO) supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Network Fast Processing (Routing) supported - (Disabled)
  o Driver ERROR statistics enabled
  o Proc tool API enabled
  o SKB Reuse supported - (Disabled)
  o SKB Recycle supported - (Disabled)
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
     o register under mv88fx_eth platform
     o egiga0, ifindex = 2, GbE port = 0

Warning: Giga 1 is Powered Off

mvFpRuleDb (c4569000): 1024 entries, 4096 bytes
Counter=0, opIdx=6, overhead=16
Counter=1, opIdx=2, overhead=0
Counter=2, opIdx=1, overhead=18
Counter=3, opIdx=2, overhead=0
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1013 at 0x000007ea0000
Using static partition definition
Creating 7 MTD partitions on "nand_mtd":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000600000 : "uImage"
0x000000600000-0x000000b00000 : "ramdisk"
0x000000b00000-0x000006f00000 : "image"
0x000006f00000-0x000007900000 : "rescue firmware"
0x000007900000-0x000007e00000 : "config"
0x000007e00000-0x000008000000 : "my-dlink"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc mv_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: gzip image found at block 0
EXT4-fs (ram0): no journal
EXT4-fs (ram0): delayed allocation enabled
EXT4-fs: mballoc enabled
EXT4-fs (ram0): mounted filesystem without journal
VFS: Mounted root (ext4 filesystem) on device 1:0.
Freeing init memory: 136K
init started: BusyBox v1.11.2 (2012-06-28 16:57:05 CST)
starting pid 538, tty '': '/etc/rc.sh'
** Mounting /etc/fstab
umount: proc: not mounted
umount: proc: not mounted
umount: /usr/local/modules: not mounted
sh: can't open /usr/sbin/pre_usb.sh
insmod: applet not found
umount: /usr/local/tmp/image.cfs: not found
umount: /usr/local/tmp: not mounted
first good block is 0
image len = 25034752 , image checksum = 8b73f1e3
dump image checksum=8b73f1e3
rmmod: applet not found
Empty flash at 0x00003948 ends at 0x00004000
ln: /lib/./libnss_dns-2.8.so: File exists
ln: /lib/./libnss_dns.so.2: File exists
ln: /usr/sbin/./system_init: File exists
mknod: /dev/REG: File exists
hardware init
GbE port 0: TxEnable WA - Enabled, deep=1, tx_en_bk=1

mtd check v1.01.05292012
/usr/local/config free size is 4771840
** copy config files
cp: cannot stat '/usr/local/config/user.log.old': No such file or directory
usbcore: registered new interface driver usblp
** set loopback interface
old ver:20120712
new ver:20120712
first good block is 0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB sizegiga0: mac address changed
e 64
Dumping data starting at 0x00000000 and ending at 0x00000800...
mac1 = AC:F1:DF:12:DF:9A
lan0:ifconfig egiga0 hw ether AC:F1:DF:12:DF:9A
egiga0: link down
egiga0: started
DNS-320B function
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ADDRCONF(NETDEV_UP): egiga0: link is not ready
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
ip6tnl0: Disabled Privacy Extensions
IPv4 over IPv4 tunneling driver
tunl0: Disabled Privacy Extensions
egiga0: link up, full duplex, speed 1 Gbps
ADDRCONF(NETDEV_CHANGE): egiga0: link becomes ready
net.ipv6.conf.default.accept_dad = 2
net.ipv6.conf.egiga0.accept_dad = 2
net.ipv6.conf.default.dad_transmits = 1
net.ipv6.conf.egiga0.dad_transmits = 1
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.accept_redirects = 1
*** execute rc.init.sh
awk: /var/run/udhcpc0.pid: No such file or directory
udhcpc (v1.11.2) started
Sending discover...
Sending select for 192.168.1.110...
Lease of 192.168.1.110 obtained, lease time 268435455
sh: you need to specify whom to kill
crond[1313]: crond (busybox 1.11.2) started, log level 8

deleting routers
route: SIOCDELRT: No such process
call load_module network
ip: RTNETLINK answers: Operation not supported
ip: RTNETLINK answers: Operation not supported
crond[1349]: crond (busybox 1.11.2) started, log level 8

*** get Time from rtc and set it into system ****
rtc: RTC time = 2018/11/22 Thu 10:55:41
Thu Nov 22 10:55:41 UTC 2018
*** set Time Zone ****
Thu Nov 22 10:55:41 GMT 2018
*** Do not adjust RTC time ***

Module IPC SERVER Version:(1.00.20090706)

ads=0
created mail daemon thread 0
ifconfig: egiga1: error fetching interface information: Device not found
Command: wget -T5 -t3 -q http://cfaj.freeshell.org/ipaddr.cgi -O /tmp/exip.0
system daemon v1.03.0529212
chk_io v1.02.20120118
cp: cannot stat '/usr/local/config/ups_slave.dat': No such file or directory

mfg_start version 1.00(2012-07-12)

Thu Nov 22 10:55:55 2018


Please press Enter to activate this console. 2018-11-22 10:55:54: (../../src/log.c.166) server started
LED_POWER_ON

starting pid 1580, tty '/dev/ttyS0': '/bin/login'
Password of admin:


BusyBox v1.11.2 (2012-06-28 16:57:05 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#

Boot Log "Broken" Unit:

root@raspberrypi:/media/storage# ./kwboot -t -B 115200 /dev/ttyAMA0 -b mtd0.dns-320 -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  .........
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [......................................................................]
 99 % [..]
[Type Ctrl-\ + c to quit]


 ** MARVELL BOARD: DB-88F6702A-BP LE

U-Boot 1.1.4 (Apr 19 2012 - 11:21:19) Marvell version: 3.6.0.DNS-320B.01

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

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:No NAND device found!!!
0 MB



Edited 1 time(s). Last edit at 11/24/2018 03:51PM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
November 22, 2018 04:42AM
Ironaxe,

> Finally it worked ^^

Excellent!

>
> Dumped the NAND U-Boot Partition.
> And kwboot worked. ( just tried your new one )

That is cool :) well worth the effort.

> Boot Log "Broken" Unit:
> NAND:No NAND device found!!!

Quote

Ok. New NAND is soldered in but nothing seems to work.

Now you know your NAND mod was not working.

If you can get to the u-boot countdown on the broken box, then you are in good shape. Can you?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Boot DNS-320 B1 with broken NAND
November 22, 2018 10:40AM
Nope. Cant get to the Marvell prompt.

Maybe i can fix the NAND Problem in a few days.
Ripped two Pads from the Board :/
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: