Welcome! Log In Create A New Profile

Advanced

Debian on DNS-320L (B1)

Posted by Ironaxe 
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 03:36AM
Hi.

Done that:

root@debian:/dns-320l/uboot# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0.dns-320-short -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  .....
 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 
Marvell>> 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
ipaddr=2.66.66.201
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
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) $(mvPhoneConfig); bootm 0x2000000;
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

Environment size: 1272/131068 bytes
Marvell>> setenv ethaddr AC:F1:DF:12:DF:9A
Marvell>> setenv ipaddr 192.168.1.110
Marvell>> setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial'
Marvell>> setenv bootcmd_usb 'usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd'
Marvell>> setenv bootcmd 'setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>>

Waited a few seconds.
Unpluged Power.
Next kwboot.

root@debian:/dns-320l/uboot# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0.dns-320-short -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  ...
 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 
Marvell>> printenv
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
baudrate=115200
loads_echo=0
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
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
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
ethact=egiga0
ethaddr=AC:F1:DF:12:DF:9A
ipaddr=192.168.1.110
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
bootcmd_usb=usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1474/131068 bytes
Marvell>>

Looks good.
But in theory the envs should have been like this allready at first boot.
Dead Battery maybe ?

Edit:
Ok. Battery seems to be for RTC only.



Edited 1 time(s). Last edit at 03/05/2019 03:39AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 03:57AM
Ironaxe,

> Done that:

Cool!

You can tell I already forgotten what progress we've made! too many things on the brain cells :))

OK. Please remind me :) if we have tried to flash the mtd0.dns-320-short to mtd0 in serial console during kwboot? if we have not, I think we should do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 04:02AM
OK I saw the previous post:

https://forum.doozan.com/read.php?3,69499,74079#msg-74079

But it looks like we should try again.

setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)'
mtdparts
fatload usb 0:1 0x800000 /mtd0.dns-320
nand erase 0x0 0x100000
nand write 0x800000 0x0 0x100000
The above was not quite right.

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



Edited 2 time(s). Last edit at 03/05/2019 04:07AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 04:11AM
Should be like this:
setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'
mtdparts
fatload usb 0:1 0x800000 /mtd0.dns-320-short
nand erase 0x0 0x100000
nand write 0x800000 0x0 0x100000

If the size of mtd0.dns-320-short is exactly 1MB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 04:44AM
We tried to flash mtd0.dns-320 which is 1MB ( 1.048.576 Bytes )
So far im just using the mtd0.dns-320-short for a faster kwboot ^^
Size is just 475,2 kB ( 475.216 Bytes )

> You can tell I already forgotten what progress we've made! too many things on the brain cells :))

I hear ya on this one ^^

Edit:

Post from Page 3 ^^

https://forum.doozan.com/read.php?3,69499,74029#msg-74029

Edit2:

When i flash the Nand, the Envs get resetted to defaults.



Edited 2 time(s). Last edit at 03/05/2019 05:11AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 05:29AM
Stock env was wrong. This is the corerct version

setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'


So
setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'
mtdparts
fatload usb 0:1 0x800000 /mtd0.dns-320
nand erase 0x0 0x100000
nand write 0x800000 0x0 0x100000

Quote

When i flash the Nand, the Envs get resetted to defaults.

That's expected.

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



Edited 1 time(s). Last edit at 03/05/2019 05:30AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 06:01AM
Still no luck with booting uboot on its own.
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 06:33AM
Ironaxe Wrote:
-------------------------------------------------------
> Still no luck with booting uboot on its own.

Does this box has SPI flash?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 06:57AM
Unfortuantely no :(
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 04:48PM
The behavior is like the BootROM does not know there is a NAND device in the system. Or it is set in hardware register (SARs) to look only to other device such as SPI for u-boot image.

When we kwboot the image, the BootROM detect something coming from UART (it always looks at UART first), handshakes with kwboot, and then only receive image data from UART.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 04:53PM
Strange thing is why does it work with the original NAND ( despite the fact that the Chip needs freezing to Boot )
But not with the new one of exactly the same Type/Name/size? When flashing obviously seems to work?
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 05:14PM
The box runs differently when uboot is from kwboot and when from NAND.

The BootROM does not care if there is a NAND device, if it is executing UART uboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 05, 2019 07:28PM
Ironaxe,

Do this test to confirm.

kwboot, interrupt serial console, and chain load the uboot in NAND:

nand read.e 0x0 0x100000 0x800000
go 0x800200

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 03:32AM
Seems to crash while reading.

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 
Marvell>> nand read.e 0x0 0x100000 0x800000

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

Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 03:54AM
Make sure you have these important NAND-related envs set like previously, before reading

setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'

Better yet, do

mtdparts
And then try the chain load.

Please post the log with printenv.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 03:56AM
Ooops, that nand read has the wrong argument :) let me write it again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 04:01AM
Should be

Quote

Syntax: nand read.e mem addr size

setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'
nand read.e  0x800000 0x0 0x100000
go 0x800200

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



Edited 1 time(s). Last edit at 03/06/2019 04:02AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 04:34AM
Gives me an Error :(

Marvell>> printenv
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
baudrate=115200
loads_echo=0
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
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
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
ethact=egiga0
mtdids=nand0=nand_mtd
mtdparts=mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)
partition=nand0,0
mtddevnum=0
mtddevname=uboot
filesize=100000
ethaddr=AC:F1:DF:12:DF:9A
ipaddr=192.168.1.110
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
bootcmd_usb=usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1629/131068 bytes
Marvell>> mtdparts

device nand0 <nand_mtd>, # parts = 2
 #: name			size		offset		mask_flags
 0: uboot               0x00100000	0x00000000	0
 1: root                0x07f00000	0x00100000	0

active partition: nand0,0 - (uboot) 0x00100000 @ 0x00000000

defaults:
mtdids  : <NULL>
mtdparts: <NULL>
Marvell>> nand read.e  0x800000 0x0 0x100000

NAND read: device 0 offset 0x0, size 0x100000
load addr ....  =800000

reading NAND page at offset 0xa0000 failed
 1048576 bytes read: ERROR
Marvell>> 

Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 05:02AM
So that gave you 5 blocks.

:) Hackish solution:

You could shorten the backup mtd to 512K (4 blocks). And flash only 4 blocks. Very good chance that this old u-boot is less than 512K.

fatload usb 0:1 0x800000 /mtd0.dns-320-short-512
nand erase 0x0 0x100000
nand write 0x800000 0x0 0x80000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 05:12AM
Try this first (before shortenning the file).


setenv mtdids 'nand0=nand_mtd'
setenv mtdparts 'mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)'
nand read.e  0x800000 0x0 0x80000
go 0x800200

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



Edited 1 time(s). Last edit at 03/06/2019 05:13AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 05:29AM
That worked.
In Fact the mtd0.dns-320-short im using for kwboot is only 472k the rest of the original 1M file is filled with 00.

 ** 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 
Marvell>> printenv  
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
baudrate=115200
loads_echo=0
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
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
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
ethact=egiga0
mtdids=nand0=nand_mtd
mtdparts=mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)
partition=nand0,0
mtddevnum=0
mtddevname=uboot
filesize=100000
ethaddr=AC:F1:DF:12:DF:9A
ipaddr=192.168.1.110
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
bootcmd_usb=usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1629/131068 bytes
Marvell>> nand read.e 0x800000 0x0 0x80000 

NAND read: device 0 offset 0x0, size 0x80000
load addr ....  =800000

 524288 bytes read: OK
Marvell>> go 0x800200
## Starting application at 0x00800200 ...


 ** 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 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.........................................................................................................................................................................

3832764 bytes read
....
.........................................................................................................................................................................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................

7702201 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2018-12-03   8:43:13 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3832700 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2018-12-02  14:09:34 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7702137 Bytes =  7.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: D-Link DNS-320L
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 108980K/131072K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 22092K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000008] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.007915] Switching to timer-based delay loop, resolution 6ns
[    0.014387] Console: colour dummy device 80x30
[    0.018968] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.029584] pid_max: default: 32768 minimum: 301
[    0.034478] Security Framework initialized
[    0.038821] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.045498] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053566] CPU: Testing write buffer coherency: ok
[    0.059602] Setting up static identity map for 0x100000 - 0x100058
[    0.066118] mvebu-soc-id: MVEBU SoC ID=0x6702, Rev=0x3
[    0.074966] devtmpfs: initialized
[    0.083101] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.093065] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.099694] prandom: seed boundary self test passed
[    0.109153] prandom: 100 self tests passed
[    0.113319] pinctrl core: initialized pinctrl subsystem
[    0.119874] NET: Registered protocol family 16
[    0.124871] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.133576] cpuidle: using governor ladder
[    0.137812] cpuidle: using governor menu
[    0.142334] Feroceon L2: Enabling L2
[    0.146012] Feroceon L2: Cache support initialised.
[    0.151376] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.167490] No ATAGs?
[    0.177966] vgaarb: loaded
[    0.183438] SCSI subsystem initialized
[    0.187782] usbcore: registered new interface driver usbfs
[    0.193459] usbcore: registered new interface driver hub
[    0.198947] usbcore: registered new device driver usb
[    0.205294] clocksource: Switched to clocksource orion_clocksource
[    0.314474] VFS: Disk quotas dquot_6.6.0
[    0.318618] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.337276] NET: Registered protocol family 2
[    0.342514] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.349598] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.356040] TCP: Hash tables configured (established 1024 bind 1024)
[    0.362534] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.368463] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.374968] NET: Registered protocol family 1
[    0.379869] RPC: Registered named UNIX socket transport module.
[    0.385925] RPC: Registered udp transport module.
[    0.390694] RPC: Registered tcp transport module.
[    0.395499] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.402249] Unpacking initramfs...
[    1.192389] Freeing initrd memory: 7524K
[    1.196659] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.204315] audit: initializing netlink subsys (disabled)
[    1.210339] Initialise system trusted keyrings
[    1.214893] Key type blacklist registered
[    1.219047] audit: type=2000 audit(1.194:1): state=initialized audit_enabled=0 res=1
[    1.227056] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.233617] zbud: loaded
[    1.237360] NFS: Registering the id_resolver key type
[    1.242492] Key type id_resolver registered
[    1.246798] Key type id_legacy registered
[    1.250889] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.257677] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.264300] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.271639] fuse init (API version 7.26)
[    1.276053] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.282862] orangefs_init: module version upstream loaded
[    1.288355] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.565302] random: fast init done
[    8.310327] Key type asymmetric registered
[    8.314501] Asymmetric key parser 'x509' registered
[    8.319775] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    8.327364] io scheduler noop registered
[    8.331356] io scheduler deadline registered
[    8.335825] io scheduler cfq registered (default)
[    8.342021] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    8.351472] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.416177] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    8.424038] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.486178] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    8.494269] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.502125] console [ttyS0] disabled
[    8.505900] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 10416666) is a 16550A
[    8.514943] console [ttyS0] enabled
[    8.514943] console [ttyS0] enabled
[    8.522017] bootconsole [earlycon0] disabled
[    8.522017] bootconsole [earlycon0] disabled
[    8.531354] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 26, base_baud = 10416666) is a 16550A
[    8.549870] loop: module loaded
[    8.553598] sata_mv f1080000.sata: slots 32 ports 2
[    8.561519] scsi host0: sata_mv
[    8.565126] scsi host1: sata_mv
[    8.568569] ata1: SATA max UDMA/133 irq 33
[    8.572648] ata2: SATA max UDMA/133 irq 33
[    8.577983] nand: Could not find valid ONFI parameter page; aborting
[    8.584320] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    8.590724] nand: Hynix NAND 128MiB 3,3V 8-bit
[    8.595148] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.602710] Scanning device for bad blocks
[    8.721238] 1 cmdlinepart partitions found on MTD device orion_nand
[    8.727497] Creating 1 MTD partitions on "orion_nand":
[    8.732613] 0x000000000000-0x000000100000 : "u-boot"
[    8.740225] libphy: Fixed MDIO Bus: probed
[    8.745200] libphy: orion_mdio_bus: probed
[    8.754744] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.856603] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address ac:f1:df:12:df:9a
[    8.865469] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.872023] ehci-pci: EHCI PCI platform driver
[    8.876542] ehci-orion: EHCI orion driver
[    8.880787] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.886337] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.894236] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.910330] ata1: SATA link down (SStatus 0 SControl F300)
[    8.925324] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.931675] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    8.938487] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.945705] usb usb1: Product: EHCI Host Controller
[    8.950564] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    8.957254] usb usb1: SerialNumber: f1050000.ehci
[    8.962764] hub 1-0:1.0: USB hub found
[    8.966621] hub 1-0:1.0: 1 port detected
[    8.971283] usbcore: registered new interface driver usb-storage
[    8.977726] mousedev: PS/2 mouse device common for all mice
[    9.266889] ata2: SATA link down (SStatus 0 SControl F300)
[    9.325329] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.516246] usb 1-1: New USB device found, idVendor=21c4, idProduct=8005
[    9.522935] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.530078] usb 1-1: Product: USB Flash Disk
[    9.534333] usb 1-1: Manufacturer: General
[    9.538432] usb 1-1: SerialNumber: 0475660000006AA4
[    9.544237] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.550698] scsi host2: usb-storage 1-1:1.0
[   10.015327] rtc-mv f1010300.rtc: internal RTC not ticking
[   10.020887] i2c /dev entries driver
[   10.026099] hidraw: raw HID events driver (C) Jiri Kosina
[   10.031890] drop_monitor: Initializing network drop monitor service
[   10.038421] NET: Registered protocol family 17
[   10.042938] Key type dns_resolver registered
[   10.048094] registered taskstats version 1
[   10.052178] Loading compiled-in X.509 certificates
[   10.057041] zswap: loaded using pool lzo/zbud
[   10.072140] Key type big_key registered
[   10.086370] Key type encrypted registered
[   10.091769] hctosys: unable to open rtc device (rtc0)
[   10.100329] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[   10.527990] usbcore: registered new interface driver uas
[   10.581606] scsi 2:0:0:0: Direct-Access     General  USB Flash Disk   1.00 PQ: 0 ANSI: 4
[   10.600324] sd 2:0:0:0: [sda] 15702112 512-byte logical blocks: (8.04 GB/7.49 GiB)
[   10.613432] sd 2:0:0:0: [sda] Write Protect is off
[   10.623303] sd 2:0:0:0: [sda] No Caching mode page found
[   10.633986] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   10.653535]  sda: sda1
[   10.662045] sd 2:0:0:0: [sda] Attached SCSI removable disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext2 (1) -- /dev/sda1] fsck.ext2 -a -C0 /dev/sda1 
rootfs: clean, 14606/491520 files, 181347/1962496 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[   24.156693] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ ok                                             done.
[....] Waiting for /dev to be fully populated...[   24.569912] marvell-cesa f1030000.crypto: CESA device successfully registered
[   24.600027] orion_wdt: Initial timeout 25 sec
[   24.615661] sd 2:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Activating swap:[   25.718040] random: crng init done
.
[ ok ] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs[ ok hat location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables...done.
[ ok ] Initializing random number generator...done.
[   31.612112] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/ac:f1:df:12:df:9a
Sending on   LPF/eth0/ac:f1:df:12:df:9a
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.110 on eth0 to 255.255.255.255 port 67
[   37.289550] NET: Registered protocol family 10
[   37.297103] Segment Routing with IPv6
DHCPREQUEST of 192.168.1.110 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.110 from 192.168.1.1
bound to 192.168.1.110 -- renewal in 1073741823 seconds.
done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1288 (syslogd)
. ok 
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1287 (klogd)
. ok 
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 debian ttyS0

debian login: 

Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 05:54AM
Cool!

Wooh. That was quite a chase to get NAND working :))

Apparently your new NAND chip has some problem on that 6th block.

So now I guess you should flash 4 blocks, and fill the rest with ff or 0.

And if that does not allow booting from NAND, change mtdparts to:

mtdparts=mtdparts=nand_mtd:0x80000@0(uboot),0x7f00000@0x100000(root)

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



Edited 2 time(s). Last edit at 03/06/2019 06:00AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 06:36AM
 ** 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 
Marvell>> printenv 
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
baudrate=115200
loads_echo=0
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
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
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
ethact=egiga0
mtdids=nand0=nand_mtd
mtdparts=mtdparts=nand_mtd:0x100000@0(uboot),0x7f00000@0x100000(root)
ethaddr=AC:F1:DF:12:DF:9A
ipaddr=192.168.1.110
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
bootcmd_usb=usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1566/131068 bytes
Marvell>> setenv mtdparts 'mtdparts=nand_mtd:0x80000@0(uboot)ro,0x7f00000@0x100000(root)'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> printenv
bootargs=root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
baudrate=115200
loads_echo=0
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
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
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
ethact=egiga0
ethaddr=AC:F1:DF:12:DF:9A
ipaddr=192.168.1.110
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot) earlyprintk=serial
bootcmd_usb=usb start ; ext2load usb 0:1 0x00800000 /boot/uImage ; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs ${bootargs_usb} ; run bootcmd_usb ; bootm 0x00800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
mtdids=nand0=nand_mtd
mtdparts=nand_mtd:0x80000@0(uboot)ro,0x7f00000@0x100000(root)

Environment size: 1574/131068 bytes
Marvell>> mtdparts

device nand0 <nand_mtd>, # parts = 2
 #: name			size		offset		mask_flags
 0: uboot               0x00080000	0x00000000	1
 1: root                0x07f00000	0x00100000	0

active partition: nand0,0 - (uboot) 0x00080000 @ 0x00000000

defaults:
mtdids  : <NULL>
mtdparts: <NULL>

Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
Marvell>> ext2load usb 0:1 0x800000 /backup/mtd0.dns-320-short-512
....
......
..................
....
......
......
..
.

524288 bytes read
Marvell>> nand erase 0x0 0x80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
Marvell>> nand write 0x800000 0x0 0x80000

NAND write: device 0 offset 0x0, size 0x80000
load addr ....  =800000
 524288 bytes written: OK
Marvell>> reset

And still nothing :((



Edited 1 time(s). Last edit at 03/06/2019 06:45AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 04:37PM
So we know that

- First 4 blocks of NAND is working fine storing the uboot image from another good DNS-320 B1 box.
- We execute that image and it runs normally. During running, we can see NAND mtds and access mtd0.

The question is back to whether the BootROM recognized the NAND device.

Unfortunately BootROM is closed source, we don't know exactly where it went wrong. This is the reason when people trying to kwboot different boxes and have to guess the timing for the handshakes. A lot of works went into making kwboot smarter to get it boot smoothly.

I recall there is a bunch of SATR registers from reading the 6281 ref manual. IIRC one of them can be used to set the boot device.

And this uboot has a SatR command. I think it might allow us to control the registers, but please try
SatR
SatR list bootsrc

Theory:
Perhaps when you replaced the NAND chip, the boot source value got wiped out and set back to default.

UPDATE:

I think it was reset to SPI as boot source.

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



Edited 3 time(s). Last edit at 03/06/2019 07:27PM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 06, 2019 08:17PM
Dump the SatR register:

md 0xF1010030

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 02:25AM
Marvell>> SatR      
Usage:
SatR - sample at reset sub-system, relevent for DB only

Marvell>> SatR list bootsrc
Usage:
SatR - sample at reset sub-system, relevent for DB only

Marvell>> md 0xF1010030
f1010030: 00e2d26e 00000001 00000001 00000000    n...............
f1010040: 00000000 00000000 00000000 00000000    ................
f1010050: 003b9f43 00000000 00000000 00000000    C.;.............
f1010060: 00000000 00000000 00000000 00000000    ................
f1010070: 00000000 00000000 00000000 00000068    ............h...
f1010080: 00000000 ab803005 07281e53 00000010    .....0..S.(.....
f1010090: 12121212 12121212 12121112 11121112    ................
f10100a0: 00001212 00000000 00000000 00000000    ................
f10100b0: 00000000 00000000 00121212 00000005    ................
f10100c0: 00000000 03950000 00000000 00000000    ................
f10100d0: 6f001000 00000000 00000080 ffff0000    ...o............
f10100e0: 1b1b1b1b 071b1b1b 00000000 00000000    ................
f10100f0: 00000000 00000000 00000000 00000000    ................
f1010100: 81000000 180fffff 00000000 00000000    ................
f1010110: 99000000 b90dcf30 00000000 00000000    ....0...........
f1010120: 00000000 00000000 00000000 00000000    ................
Marvell>>

As addition i tried this:

Marvell>> SatR write default

S@R write: Write S@R first device val ff fail

Marvell>> SatR read default

S@R read: Read S@R val 0
Marvell>>



Edited 1 time(s). Last edit at 03/07/2019 02:38AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 03:04AM
OK let's decipher that.

The default internal pull up is 0x4.

Quote
Reference Manual for 88F6281
Bits[14:12] = Boot device

Boot Device values

0x0 = Reserved

0x1 = Reserved

0x2 = Boot from SPI flash (SPI_CSn on MPP[7])
0x3 = Reserved

0x4 = Boot from SPI flash (SPI_CSn on MPP[0])
0x5 = Boot from NAND flash

0x6 = Boot from SATA

0x7 = Boot from the PCI Express port

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



Edited 2 time(s). Last edit at 03/07/2019 03:46AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 03:09AM
00e2d26e = 0b111000101 101001001101110

Bit 0 is right most.

That's 101 = 5.

Was I correct?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 03:29AM
Thats a little too high for me ^^
But 101 = 5 is right *lol*

But does the 6182 equals the 6702 ?
According to the "so called" Datasheet it aint got SPI but the LaCie Cloud Box has SPI Flash with this CPU



Edited 1 time(s). Last edit at 03/07/2019 03:42AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 03:44AM
Ironaxe Wrote:
-------------------------------------------------------
> Thats a little too high for me ^^

:))

> But 101 = 5 is right *lol*

00e2d26e is the content of the location f1010030

Marvell>> md 0xF1010030
f1010030: 00e2d26e 00000001 00000001 00000000    n...............
f1010040: 00000000 00000000 00000000 00000000    ................

That hex value 0x00e2d26e translated into binary is
1110   0010  1101   0010    0110   1110

Bit 0 is right-most.

1110   0010                   1101                    0010    0110   1110
                           bit 15-12 are here

So the value tells us that in that SatR register, the boot device = 0x5 = NAND.

So the conclusion must be that the NAND flash controller did not find the NAND device, or could not read from that.

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



Edited 1 time(s). Last edit at 03/07/2019 03:55AM by bodhi.
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: