Welcome! Log In Create A New Profile

Advanced

Zyxel NSA310 u-boot-2014.07-tld-4 for testing

Posted by bodhi 
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 22, 2015 06:29PM
@pengu,

Please try UART booting the test u-boot image attached above:
uboot.2014.07-tld-4-test-1.nsa310.mtd0.kwb

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



Edited 1 time(s). Last edit at 08/22/2015 06:29PM by bodhi.
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 23, 2015 02:41AM
I'll do so but there is another interesting thing:

as seen in a previous post, on ZyXEL OS the "r8168" driver is used.
there, you get 40 MB/s read and 45 MB/s write.
this driver is still used on debian wheezy (kernel 3.2.0)

on newer kernels wie have the "r8169 with this driver you only get
22 MB/s read and 35 MB/s write
with some network tuning, the following is possible:
26 MB/s read 38 MB/s write

should this change with the new U-Boot? let's see

the first chang I see is the following:

after setting ipaddr and serverip I cannot ping like on stock u-boot but with another error message:

NSA310> ping 192.168.1.112
No ethernet found.
ping failed; host 192.168.1.112 is not alive
NSA310>

read/write are the same as before ..
fhirst, this looks different but this was load related



Edited 6 time(s). Last edit at 09/01/2015 11:21AM by pengu.
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 23, 2015 03:04PM
pengu,

>
> NSA310> ping 192.168.1.112
> No ethernet found.
> ping failed; host 192.168.1.112 is not alive
> NSA310> 
>

Is this the output from the test u-boot UART booting?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 23, 2015 03:21PM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> >
> > NSA310> ping 192.168.1.112
> > No ethernet found.
> > ping failed; host 192.168.1.112 is not alive
> > NSA310> 
> >
>
> Is this the output from the test u-boot UART
> booting?

yes it is
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 23, 2015 06:56PM
pengu,

> yes it is

And there was no debug output? if there was, pls post the log from the beginning.

Does ethernet works in stock u-boot? i.e. can you ping the router in stock 310 u-boot serial console?

As I thought, this could be troublesome :) PCI, in general, is not well supported inmainline U-Boot. I'm running out of time, so I might have to release this without Ethernet and revisit this issue in the future.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 24, 2015 01:44AM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> > yes it is
>
> And there was no debug output? if there was, pls
> post the log from the beginning.

./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.07-tld-4-test-1.nsa310.mtd0.kwb -p  
Sending boot message. Please reboot the target.../
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
...
...

  94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2014.07-tld-4-test-1 (Aug 22 2015 - 03:37:57)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Error occured, error code = 64
No such device: egiga0
Hit any key to stop autoboot:  0 
NSA310>
it's useless but I've done it


NSA310> setenv ipaddr 192.168.1.200
NSA310> setenv serverip 192.168.1.112
NSA310> ping 192.168.1.112
No ethernet found.
ping failed; host 192.168.1.112 is not alive
NSA310>

> Does ethernet works in stock u-boot? i.e. can you
> ping the router in stock 310 u-boot serial
> console?

no, ethernet doesn't work in stick U-Boot, it tries to initiate the PHY but this timed out, because
stock U-Boot only supports the marvell not the realtek lan chip
so you can't ping anything.
the other thing is, U-Boot tries to intiate two LAN interfaces .. why? there are only one
earler I tried to switch between it but it always tries to use "egiga0"


         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: RD-88F6281A LE 

U-Boot 1.1.4 (Jun  8 2011 - 18:48:37) Marvell version: 3.4.19

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

Soc: 88F6281 A1 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM 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)
Kernel address is 0x4640000.

Streaming disabled 
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  0 
NSA310>> 

NSA310>> 
NSA310>> setenv ipaddr 192.168.1.200
NSA310>> setenv serverip 192.168.1.112
NSA310>>

let's ping both .. the "server" and the router:


ping 192.168.1.1
egiga1 no link
Using egiga0 device
ping failed; host 192.168.1.1 is not alive

NSA310>> ping 192.168.1.112
Using egiga0 device
ping failed; host 192.168.1.112 is not alive
NSA310>>

> As I thought, this could be troublesome :) PCI, in
> general, is not well supported inmainline U-Boot.
> I'm running out of time, so I might have to
> release this without Ethernet and revisit this
> issue in the future.



Edited 2 time(s). Last edit at 08/24/2015 01:54AM by pengu.
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 24, 2015 02:40AM
pengu,

> Net: No ethernet found.
> Error occured, error code = 64
> No such device: egiga0

OK, it means that the RT8169 initialization was never called.

> no, ethernet doesn't work in stick U-Boot, it
> tries to initiate the PHY but this timed out,
> because
> stock U-Boot only supports the marvell not the
> realtek lan chip

Yes, I thought so, just want to confirm.

> the other thing is, U-Boot tries to intiate two
> LAN interfaces .. why? there are only one
> earler I tried to switch between it but it always
> tries to use "egiga0"
>
> Net: egiga0, egiga1 [PRIME]

IIRC, there are actually 2 ethernets in the SoC. Usually egiga0 is the only one used (has pins out). So stock u-boot might have tried to initialize both.

PS.

I have some more ideas, but will have to wait till next weekend.

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



Edited 1 time(s). Last edit at 08/24/2015 02:48AM by bodhi.
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 24, 2015 03:37AM
you can tell us about that perhaps we can confirm this till next weekend ;-)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
August 24, 2015 03:47AM
pengu Wrote:
-------------------------------------------------------
> you can tell us about that perhaps we can confirm
> this till next weekend ;-)

I meant ideas related the code to initialize the 8169. It is technical:

Kirkwood GBE code is deeply woven into its whole design structure, and we can't easily take out this part and add RT8169. So my thought is we might try to not initialize egiga0 altogether, and only initialize the Kirkwood PCIe which is connected to the RT8169. I'm not sure if it will work, either, but worth a try.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
November 07, 2015 02:45AM
Hey guys,

I was wondering, if there will be any future development regarding the NSA310. I will have some time and access to my device during Christmas, so I might be able to test.

I found this:

https://github.com/niamster/uboot-marvell-openrd-ultimate/blob/master/ReleaseNotes.txt

The relevant patch is here:

https://github.com/niamster/uboot-marvell-openrd-ultimate/commit/0f693cf4b198001a1f36406be8b4d1c913c4c7f3

However, I do not remember whether the original uboot provided proper network access. AFAIR the network came up, but netconsole wasn't working. That's where I stopped investigating and stuck to the original u-boot with the non-dt kernel.

Maybe there is something interesting in the code. It seems to GPL licensed (must be after using u-boot at all).

Thanks and a nice weekend! :)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
November 07, 2015 04:13AM
marlemion,

> https://github.com/niamster/uboot-marvell-openrd-u
> ltimate/blob/master/ReleaseNotes.txt

This did not really improve on what we already have.

> I was wondering, if there will be any future
> development regarding the NSA310.

Currently, the only thing that is not working is Ethernet, as you already knew.

Personally, I will not spend more time on this. The benefit is just not worth the time to pursue the solution, it does not seem there is a lot of users for this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
November 07, 2015 08:15AM
Hey bodhi,

fair enough, this is understandable. I was hoping for netconsole uboot, but I certainly can live without it. Would you consider the posted NSA310 uboot as stable? In that case I would migrate from stock uboot to be able to boot DT-kernels.

Thanks for your awesome work!
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
November 07, 2015 02:52PM
marlemion,

Yes, I think it is stable. pengu did a lot of testing for this in this thread.

The thing to consider is in Debian, the network performance could be improved with different driver r8168 (loaded as module). pengu tried another driver and it seems to be more stable and a little bit faster (see previous posts inthis thread). In the next kernel release, I will set the current r8169 driver as module, so it can be unloaded. Currently, in kernel 4.2 I have it compiled into the kernel. If there is more interest in the kernel, I could spend time to intgerate the r8168 module (it has to be compiled separately currently).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 13, 2016 03:43PM
Hey,

so this is the first time I try this firmware on my nsa310. I was able to boot the old kirkwood-dt kernel without any problem. When starting the fdt kernel, though, it always boots as a nsa325 instead of a nsa310. I am using arch linux. arcNumber=4022. What else am I missing? Where can I set the dts file in arch or uboot?
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 13, 2016 04:56PM
marlemion,

If you boot Arch Linux with separate DTB, check the following:

- Make sure the DTB was not embbeded into uImage. Could be you still have the nsa325 embedded in there.

- The DTB location on Arch rootfs is different: /boot/dtbs. So this u-boot env must be changed
dtb_file=/boot/dtbs/kirkwood-nsa310.dtb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 14, 2016 12:37AM
Hm, I do not have any dtb environment:

U-Boot 2014.07-tld-4-test-1 (Aug 22 2015 - 03:37:57)
ZyXEL NSA310 1-Bay Power Media Server


SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
Error occured, error code = 64
No such device: egiga0
Hit any key to stop autoboot: 0
NSA310> printenv
arcNumber=4022
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; usb stop; run bootcmd_sata; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=b6:d0:5e:0f:a1:17
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
rootdelay=10
rootfstype=ext2
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 14, 2016 12:50AM
marlemion,

> U-Boot 2014.07-tld-4-test-1 (Aug 22 2015 -
> 03:37:57)
> ZyXEL NSA310 1-Bay Power Media Server

> *** Warning - bad CRC, using default environment

You have not installed new u-boot 2015.10 and it's new default envs image.

Your u-boot envs is from the default internal envs. Worse yet, it is a test u-boot version, too :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 14, 2016 03:33AM
Ah, ok. That explains it quite well. ;) I got the one from this thread. I assume, this one is the right one:

http://bitly.com/1Sat557

(taken from your link below your message)

Thanks!
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 14, 2016 03:41PM
Same with this one:

U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:19:43 -0800)
ZyXEL NSA310 1-Bay Power Media Server


SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND: 128 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA310> printenv
arcNumber=4022
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; usb stop; run bootcmd_sata; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=b6:d0:5e:0f:a1:17
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
rootdelay=10
rootfstype=ext2
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1

Environment size: 2086/131068 bytes



EDIT: Ok I understood I have to eplace the environment...



Edited 1 time(s). Last edit at 04/14/2016 03:56PM by marlemion.
Re: Zyxel NSA310 u-boot-2014.07-tld-4 for testing
April 18, 2016 05:19AM
marlemion,

Also I should mention, there are 3 versions of the NSA310 DTB now! Look for these DTBs from my latest kernel release linux-4.5.0-kirkwood-tld-1 tarball in http://forum.doozan.com/read.php?2,12096

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