Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsa310 #2

Closed
marlemion opened this issue Apr 13, 2015 · 11 comments
Closed

nsa310 #2

marlemion opened this issue Apr 13, 2015 · 11 comments
Assignees

Comments

@marlemion
Copy link

Hi, I will have a NSA310 around until end of April. I'd like to have a working u-boot with netconsole working so that I could watch the server boot/shutdown from within the network.

As far as I understood, support for the NSA310 has not been provided yet due to lack of devices. So I would like to offer my help developing a NSA31 u-boot. As the NSA310 is not far away fro the NSA320, it should not be such a big deal (at least I hope so).

What did I do so far? I have downloaded the latest NSA320 u-boot from your dropbox and uploaded it to the NSA310 using kwboot. It got transferred and the devie rebooted, but it got stuck saying the name of SOC.

So I pulled the lates git sources, copied nsa320.h to nsa310.h, did so for any other files under 'board', exchanged any NSA320 strings to NSA310, did make nsa310_config and make. The make process produced severa u-boot.* files, but none of them could be transferred to the device using kwboot, it failed saying invalid image.

So, currently I am stuck. If I were able to get an uart image from the sources, I would possibly start poking around. However, right now I need some help to get further.

@julianxhokaxhiu
Copy link

If the uboot.kwb is a regular image built for flashing NAND, then append the -p flag and it will attempt to patch the header of the transmitted image, on-the-fly. The uboot.kwb file will not be altered.
-- http://forum.doozan.com/read.php?3,7852,7852

Since the images you get from make are REGULAR NAND images, are you using the -p flag?

@marlemion
Copy link
Author

I got it partially working. If you are interested, you can follow my progress here:

http://forum.doozan.com/read.php?3,12381,21223#msg-21223

@bobafetthotmail
Copy link

There is a u-boot for NSA310 here http://openrouter.info/forum/viewtopic.php?f=19&t=2808

@mibodhi
Copy link
Owner

mibodhi commented May 14, 2015

Thanks bobafetthotmail! I will take a look, if possible will see if I can get the patch from there.

@marlemion
Copy link
Author

Yeah, thanks for pointing this out. However, if I interprete the postings right, it has the same drawbacks as I already discovered in my investigations: the pci-e network card is not initalized. See the output of the u-boot booting a little bit further down in the thread:

SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out

@bobafetthotmail
Copy link

well, that uboot is good enough for most users.
The ethernet in his Uboot does not work while in uboot, but is initialized by linux kernel later (because it reinitializes everything anyway).
So there is no netconsole, but after booting everything works fine (as linux kernel takes over).
From the broken english of Google translate I clearly read that they are chatting about the bad performance of the ethernet with linux driver in kernel 3.6.9, so yeah, ethernet definitely works after boot regardless of uboot's failures.
A NAS without ethernet is useless, they would be mocking him if the ethernet wasn't running after boot.

Tangential: Another guy in the same thread also posts a tutorial to hardware mod the 310 (soldering skills and smd components required) to overclock it to 1500 mhz.

Back to the issue at hand: the Realtek r8169 driver for that chip is problematic for everyone since 2006 or so, I wouldn't expect anything less from it.

Some of them need a firmware blob to work. You have that inside uboot? You loaded it? You actually need it? https://packages.debian.org/wheezy/firmware-realtek

There is also a uboot patch that (among other things) claims to fix something of that driver (more about bad things happening when running at Gbit), and happens after the date in the uboot you have here
this is the message http://lists.denx.de/pipermail/u-boot/2014-December/199018.html

@mibodhi
Copy link
Owner

mibodhi commented May 22, 2015

@bobafetthotmail,

So the NSA310 use RTL8169 card? do you have a serial boot log or dmesg that you can pastebin? I would like to see where Linux bring up the card. I don't have the NSA310 so it is difficult to troubleshoot, but with an existing patch I could take a look.

@bobafetthotmail
Copy link

I don't have it. When I see a used one for cheep on Ebay I'm probably getting one to give my 325V2 a playmate.

I did some preliminary homework to see if it was a good idea (see below).

There is thread here where you can see old linux kernel sources in his github http://forum.nas-central.org/viewtopic.php?f=249&t=5145
he says *RTL8169 ethernet drivers also in the github

The hardware with pics is this http://masu.6f.sk/index.php?title=Nsa310_pcb

But from the DTBs here http://lukas.zapletalovi.com/2013/12/linux-313-on-zyxel-nsa-310.html
it seems there are two different boards.
Maybe they changed ethernet chip? Would explain why there are differences in reports.

Arch forums people compiling kernel for NSA310. http://archlinuxarm.org/forum/viewtopic.php?f=27&t=3708&start=90
On page after the one linked (apart from a bunch of networking posts about the need to set a mac address manually because the realtek chip cannot do it on its own) there is this pastebin of full boot where the ethernet controller is recognized http://pastebin.com/2kNYYqpg
as RTL8168d/8111d
(yes I know you posted on that thread too)

@mibodhi
Copy link
Owner

mibodhi commented May 23, 2015

Ah. I see the conflicting reports about 2 different versions. In case you have not noticed, the kernel I usually release at Jeff Doozan does supports the NSA310 (2 versions):
http://forum.doozan.com/read.php?2,12096

I did not advertise it because I did not get any good report about whether the NSA310 is working with my Debian kernel build.

I've looked at both NSA310 DTS files in the buildd, and neither has the RTL8169 driver specified in there! that's why I was not sure what it looks like.

In any case, I could build it for other people to test if there is interest. Since we know UART is working, I don't have to worry about they will brick the box :)

@mibodhi
Copy link
Owner

mibodhi commented Aug 20, 2015

Please see here for the new NSA310 u-boot:
http://forum.doozan.com/read.php?3,23407

@mibodhi
Copy link
Owner

mibodhi commented Aug 20, 2015

This issue is closed.

@mibodhi mibodhi self-assigned this Aug 20, 2015
@mibodhi mibodhi closed this as completed Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants