Welcome! Log In Create A New Profile

Advanced

DLink DNS-325 u-boot image

Posted by wwwalex 
DLink DNS-325 u-boot image
July 21, 2016 05:02PM
Hi,

Stupidly bricked my DNS-325 :(
Could you please share mtd0 image with original u-boot from any Dlink DNS-325? (mine is RevA1)

E.g. by running this: nanddump -f /tmp/mtd0-dump.bin /dev/mtd0
Than grab off /tmp/mtd0-dump.bin file from the device.

Thank you in advance!

P.S.
Tried pulling out and compiling u-boot but it always hangs "Uncompressing Linux....... done"
Nothing happens afterwards.
Restored original environment but still no luck ((
Tried DNS-320 u-boot but it worked only via UART booting (kwboot). When it's flashed, device doesn't boot at all.
Re: DLink DNS-325 u-boot image
July 21, 2016 10:04PM
wwwalex,

Do you want to boot stock, or go all the way to Linux 4.6 with u-boot-2016.05?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: DLink DNS-325 u-boot image
July 22, 2016 10:29AM
bodji,

thank you for replying.
For now, I want to boot stock firmware and therefore need stock u-boot image.

I tried latest u-boot from ftp://ftp.denx.de/pub/u-boot/ but stock kernel hangs right after un-compressing.
When I doing UART booting of DNS320 u-boot image, same kernel continues booting fine.
Re: DLink DNS-325 u-boot image
July 22, 2016 01:04PM
wwwalex,

> When I doing UART booting of DNS320 u-boot image,
> same kernel continues booting fine.

Have you tried UART booting the DNS325 u-boot? it is very strange that you can kwboot the DNS320 but not the DNS325.

If the DNS320 works when kwboot but when flashed does not boot, then it might have been the case of the wrong image format (i.e. only .kwb should be flashed to NAND).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: DLink DNS-325 u-boot image
July 23, 2016 06:01AM
I don't have any DNS-325 image to try, hence I'm asking for a help.
Browsing internet, I found DNS-320 mtd0 image made by nanddump (it's attached here)
When I'm booting this file with kwboot it works. But when I'm flashing it (tftpboot and then 'nand write ...') device doesn't start at all.
Thanks.
Attachments:
open | download - mtd0-dump.bin.gz (188.1 KB)
Re: DLink DNS-325 u-boot image
July 23, 2016 07:11AM
A fairly current u-boot for both DNS-320 and DNS-325 can be built from lentinj github. You'll want to check out the dns320_v4 branch.

Ray
Re: DLink DNS-325 u-boot image
July 23, 2016 02:28PM
wwwalex,

> I don't have any DNS-325 image to try,

I see. I will build one for you. Last time I looked the DNS325 is already mainline.

I've also sent a msg to DavideDG asking if he has the stock mtd0 for this.


Update:

Nope, davidedg does not have it.

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



Edited 2 time(s). Last edit at 07/23/2016 02:47PM by bodhi.
Re: DLink DNS-325 u-boot image
July 23, 2016 03:50PM
This is a test version for DNS325. It should be only used for UART booting (don't flash to NAND).

kwboot  -t -B 115200 /dev/ttyUSB0 -b uboot.2016.05-tld-0.1.dns325.mtd0.kwb   -p

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - uboot.2016.05-tld-0.1.dns325.mtd0.kwb (512 KB)
Re: DLink DNS-325 u-boot image
July 23, 2016 09:38PM
Searching the u-boot mailing list you can see that patches were sent for merging dns320 support into the mainline a few years ago, but they were never applied.

Ray
Re: DLink DNS-325 u-boot image
July 24, 2016 01:39PM
Just tried booting "uboot.2016.05-tld-0.1.dns325.mtd0.kwb"

Unfortunately, result is same.. original kernel doesn't boot with it.
Alternative kernel (Alt-F free firmware project) boots up as normal.


This is booting process with the original kernel and ramdisk:

## Booting kernel from Legacy Image at 00a00000 ...
Image Name: Linux-2.6.31.8
Created: 2012-06-26 3:38:43 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2565784 Bytes = 2.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
Image Name: Ramdisk
Created: 2012-11-22 2:04:38 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 1759853 Bytes = 1.7 MiB
Load Address: 00e00000
Entry Point: 00e00000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux.................................................................................................................................................................... done, booting the kernel.
Re: DLink DNS-325 u-boot image
July 24, 2016 02:12PM
wwwalex,

So UART booting works? that's all I am after. I don't expect it to work with stock kernel.

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



Edited 1 time(s). Last edit at 07/24/2016 02:12PM by bodhi.
Re: DLink DNS-325 u-boot image
July 24, 2016 02:14PM
Could you post the serial log. Interrupt it and do

printenv
help

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: DLink DNS-325 u-boot image
July 24, 2016 04:32PM
What could be a cause of issues with stock kernel image?

printenv and help output is in attachment.
Attachments:
open | download - uboot_log.txt (9.7 KB)
Re: DLink DNS-325 u-boot image
July 24, 2016 05:54PM
> What could be a cause of issues with stock kernel
> image?
>

There is really no issue. It's just that stock kernel can not be booted with new u-boot without some more works. Since you don't have mtd0 to restore stock u-boot, I can't help you with booting stock.

I just want to see that we are on the right track with the new u-boot. And your serial log indicated that, yes, we are! So now I can say that we can have new u-boot and that will most likely boot the latest kernel with no problem.

So if your intention is to run the box with the latest u-boot and kernel

Then your next step are:

1. Create a USB rootfs using the tarball Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the kernel/rootfs thread
2. Boot with UART using uboot.2016.05-tld-0.1.dns325.mtd0.kwb
3. Set the u-boot envs to boot with USB
4. Boot into Debian

After you have successfully ran the above test, I will look closely at the new u-boot, mtdparts,... and build the official released version of DNS325 u-boot, and write instruction to facilitate booting the kernel 4.4+. To align the new u-boot with all other Kirkwood boxes, mtdparts will need to change a little (but will leave stock OS untouched in case you want to go back to stock).

OTOH, if your intention is to run the box with stock only

Find stock mtd0 and restore it. Don't upgrade u-boot.

-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: