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 07, 2019 03:49AM
Ok. Then "unfortunately" it is right :(
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 03:57AM
May be you should try the compress air again on this NAND :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:05AM
Ironaxe Wrote:
-------------------------------------------------------
> 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

No it is not equal. That's why I raised the question about the SPI flash. Some 6281 boxes have both NAND and SPI, or either.

However, the 6702 and 6192 are the same and the 6192 also has the same SatR layout for boot device as the 6281.

Bits[14:12] = Boot device.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:12AM
bodhi Wrote:
-------------------------------------------------------
> May be you should try the compress air again on
> this NAND :)

Tried that without luck ^^
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:22AM
I forgot that this is 6702 for a moment :)

However, that SAR register and boot device are identical for 6218 and 6192/6702.

I think we are back to my conclusion: could be that the NAND flash controller failed to read NAND device during bootROM.

Or may be the reset pins were damaged when you replace NAND so it default to SPI?

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



Edited 2 time(s). Last edit at 03/07/2019 04:27AM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:31AM
bodhi Wrote:
-------------------------------------------------------
> Or may be the reset pins were damaged when you
> replace NAND so it default to SPI?

When ive put back in the Original NAND it booted up ( with the freezing ) so i would guess its possibly not that.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:51AM
Im just trying to check my mtd0.dns-320 File against the Data found in the
88F6192 Functional Diagram ( 24.2.4.1Main Header Format )
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:52AM
> When ive put back in the Original NAND it booted
> up ( with the freezing ) so i would guess its
> possibly not that.

Ah. Then the all register settings are correct already.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 04:56AM
Ironaxe Wrote:
-------------------------------------------------------
> Im just trying to check my mtd0.dns-320 File
> against the Data found in the
> 88F6192 Functional Diagram ( 24.2.4.1Main Header
> Format )

That's a another good thing to check! But since you dump that from the good box, that header should be OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 05:01AM
Maybe i should disable ECC to try.

Ok. Not nessessary.

The bootROM tries to boot from four types of NAND flash devices four times (a total of 16 times). 
The first eight trials are performed with ECC calculation and the last eight trials are performed 
skipping ECC correction. 
A NAND flash reset (using the command 0xFF) is performed before each boot trial.

Maybe could it be helpful to get to the Command Line Debug Mode ?

Boot from UART0

As previously indicated, boot from UART0 is not a sample at reset configuration option, but is performed before every type of boot through sensing the Rx side of the UART0 interface on both MPP options.
If the debug pattern (0xDD 0x11 0x22 0x33 0x44 0x55 0x66 0x77) was received, 
the bootROM enters the command line debug mode. 
Otherwise, if the boot sequence (0xBB 0x11 0x22 0x33 0x44 0x55 0x66 0x77) was received, 
the bootROM enters the Boot from UART routine, which starts receiving the boot image using the Xmodem protocol (i.e., it starts receiving chunks of 128 bytes, each with an 8-bit checksum).
The boot image must be a continuous image, which includes a main header 
and an extension header (extended header is mandatory in this case, 
since the DDR must be initialized).The main header, extension header, 
and source image must contain valid checksum values.
According to the boot sequence described above, this boot method: 
1.Executes the registers configuration in the extended header.
2.Downloads the source image to DDR. 
3.Executes it in the DDR.



Edited 3 time(s). Last edit at 03/07/2019 06:27AM by Ironaxe.
Re: UART Boot DNS-320 B1 with broken NAND
March 07, 2019 01:44PM
Ironaxe,

I use the BootROM debug mode all the time on the NAS326. The NAS326 has a quirk that if you connect serial console, it get stuck there waiting for UART. So the debug mode cause BootROM to wait for data, and eventually timeout and boot normally.


Quote
https://forum.doozan.com/read.php?2,32146
A2. Installation

.....

1. Start kwboot on the serial console host

For ARM32 kwboot:
./kwboot -t -B 115200 /dev/ttyUSB0 -d

Ah, another idea. Start the kwboot in debug mode and let it sit there to see if the timeout occur the same way, and perhaps it will spit out something.

Nobody really knows what we can do other a couple commands with BootROM. I am sure Marvell engineers know, but they never disclosed how. I don't recall what those are (been quite a while since I looked).

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



Edited 1 time(s). Last edit at 03/07/2019 01:45PM by bodhi.
Re: UART Boot DNS-320 B1 with broken NAND
March 08, 2019 04:58AM
No timeout after 15 Minutes ^^
Just the input Prompt.

root@debian:/dns-320l# kwboot -t -B 115200 /dev/ttyUSB0 -d
Sending debug message. Please reboot the target.../
[Type Ctrl-\ + c to quit]
>
Re: UART Boot DNS-320 B1 with broken NAND
March 08, 2019 05:24AM
Ironaxe Wrote:
-------------------------------------------------------
> No timeout after 15 Minutes ^^
> Just the input Prompt.
>
>
> root@debian:/dns-320l# kwboot -t -B 115200
> /dev/ttyUSB0 -d
> Sending debug message. Please reboot the
> target.../
> [Type Ctrl-\ + c to quit]
> >
>

I recall trying 2 commands. But it was too long ago, so I forgot what they were. Apparently they were not useful enough for me to put them in my notes :) I guess googling will turn up some commands.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 08, 2019 06:16AM
Schematics would bei nice ^^
Would love to replace the Nand with SPI Flash.
Re: UART Boot DNS-320 B1 with broken NAND
March 08, 2019 07:44PM
Ironaxe,

> Schematics would bei nice ^^
> Would love to replace the Nand with SPI Flash.

I have never seen a schematic for any of these Kirkwood SoCs or boxes. I only go by what's in their Reference Manuals and GPL source. FWIW, I don't have any NDA so not privy to their protected IPs :)

Don't know if it is possible to use SPI flash for this box.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
March 11, 2019 12:51PM
So. Do we have any more options?
Re: UART Boot DNS-320 B1 with broken NAND
March 11, 2019 05:00PM
Ironaxe,

> > May be you should try the compress air again on
> > this NAND :)
>
> Tried that without luck ^^

I think the bootROM did not recognize the NAND chip. But you can search for Marvell BootROM commands to see if you can find anything.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
reostatic
Re: UART Boot DNS-320 B1 with broken NAND
April 03, 2019 01:15AM
Hi, I have the same problem with this nas. I have to frezze nas to work. Is there a solution to this problem?
AmiGaGa
Re: UART Boot DNS-320 B1 with broken NAND
October 28, 2021 06:48PM
Hi,

very pleasant to read your story but it's a bad ending.
Like lot of users, i've got this problem since 2017...

I ever tried to make holes on the bottom of the box.
I also tried to change the cooling system with a bigger one.
Capacitors changed
The only way to boot is to put in on fridge for 15 mins.
Re: UART Boot DNS-320 B1 with broken NAND
October 28, 2021 10:05PM
AmiGaGa,


> The only way to boot is to put in on fridge for 15
> mins.

That's good to know :)

I think if this box NAND problem is that wisespread, I might try to build a DNS-325 u-boot version that strip out all NAND supports to see if the BootROM recognizes that there is no NAND.

Not sure if it will work, though. The old BootROM sometime just blindly try to find NAND.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
October 29, 2021 03:51AM
Unfortunately i never got it to work without a serial Connection to send the Boot File or freezing the Nand.
Even though bodhi was a great Help. Thank you for that btw.
Both my DNS-320 are now not existent anymore :(
Re: UART Boot DNS-320 B1 with broken NAND
May 20, 2023 09:41AM
Hi,

I'm Robert, a fellow DNS320L owner (still). I also have a DNS327l, DNS323 and DNS321 .. all are still working, after so many years.

Don't know if you are still active here after so many years .. but i have some questions, as I'm now in a similar situation.
I have one working DNS320L and 2 non-working ones that have this blue flashing light issue, I soldred the Serialc ables cables on JP1 .. but i don't get any response, even following your steps on kwboot i gets nowhere as it just sits on:

"Please reboot the target" , but it never gets to the next step of actually sending anything. I see the CP210x sending the data (leds) but nothing comes ever back. The UART connection I'm using is JP1 on the DNS320 .. is that the one you used for the kwboot steps, or did you create another connection on the board ?

If not ... any other suggestions ?

Awaiting your reply.
Re: UART Boot DNS-320 B1 with broken NAND
May 20, 2023 03:19PM
Hi Robert,


> I have one working DNS320L and 2 non-working ones
> that have this blue flashing light issue

Can you run kwboot with the working box?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: UART Boot DNS-320 B1 with broken NAND
July 09, 2023 06:02PM
Hi,

At first all my attempts were fruitless, but when looking at a working device (android box), i noticed that my USB to TTL converter was malfunctioning terribly. This lead me to believe that there may be an issue with my UART bridge. So i replaced it with one I ordered for an arduino and look and behold, after a bit of tinkering (with lots of pointers from the posts here) I got both boxes working again :).

One of the issues I had was with a box that had no partions in the NAND anymore .. the command to show them (mtdparts) didn't work, but after flasing seperate partions from a copy of a working box one by one (7 in total) it finally booted.

This one fixed the boot loader, but as i'm not able to interrupt the bootloader in kwboot i decided to continue for all 7.

usb start
ext2load usb 0:1 0x6400000 /mtd0
nand erase 0x0 0x100000
nand write.e 0x6400000 0x0 0x100000

following the partions i had from a working box:

0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000600000 : "uImage"
0x000000600000-0x000000b00000 : "ramdisk"
0x000000b00000-0x000006f00000 : "image"
0x000006f00000-0x000007900000 : "mini firmware"
0x000007900000-0x000007e00000 : "config"
0x000007e00000-0x000008000000 : "my-dlink"

So each file was flashed into nand at the right position.

After this a reset brought the device to life .. however it seemed to have copied the mac-address too.

Is it possible to change the mac-address so it matches to one on the sticker on the bottom? i believe ALT-F reads it from /dev/mtd5 .. so maybe i need to adjust something in ths partition?

Best regards,

Robert
Re: UART Boot DNS-320 B1 with broken NAND
July 09, 2023 11:05PM
Robert,

Congrats!

Quote

This one fixed the boot loader, but as i'm not able to interrupt the bootloader in kwboot i decided to continue for all 7.

usb start
ext2load usb 0:1 0x6400000 /mtd0
nand erase 0x0 0x100000
nand write.e 0x6400000 0x0 0x100000

Now that the boot loader is fixed. Reboot and interrupt serial console at countdown. And

printenv

The MAC address is the env ethaddr.

So get the MAC address xx.xx.xx.xx on the sticker label, and set it:
setenv ethaddr xx.xx.xx.xx.xx

And if that is prevented by this stock u-boot, then you could also try in Debian.

It does look like the envs might be at the config partition (I have not reread previous posts in this thread).
0x000007900000-0x000007e00000 : "config"

Once you booted in to Debian, post the entire serial boot log (with output of printenvs) here.

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

Your Email:


Subject:


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