Welcome! Log In Create A New Profile

Advanced

Debian on NSA325 V1/V2

Posted by Buttzy10169 
nsa325v2 debian usb stick isn't recognized
July 25, 2015 07:12AM
got a nsa325v2, enabled telnet, changed the U-Boot env to boot debian (same as on NSA310/310s/320s), connected the stick to an usb 2.0 port (on the back) and rebooted

the status of the LEDs indicates that ZyXEL OS was booting up
looks like bootcmd_usb isn't executed.

http://pastebin.com/34W98cgu <- fw_printenv output


[Edit]

connectet serial console
and same thing as described here :-(

http://forum.doozan.com/read.php?2,22847

USB:   scanning bus for devices... 2 USB Device(s) found                                                                                                                          
Waiting for storage device(s) to settle before scanning...                                                                                                                        
0 Storage Device(s) found

the behavior of the LEDs is different from the NSA320s so I thought that this is different.
At U-Boot stage, the LEDs were off
after loading the kernel, all LEDs went on
when booting linux, the sys LED is blinking

@bodhi:
I've tried to UART boot with your U-Boot (uboot.2013.10-tld-1-test.nsa325.uart.kwb)
but no success

Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  3 % [......................................................................]
  5 % [....+xmodem: Protocol error
changed the usb ttl cable but no luck



Edited 4 time(s). Last edit at 07/25/2015 11:48AM by pengu.
Re: nsa325v2 debian usb stick isn't recognized
July 25, 2015 03:00PM
pengu,

+xmodem: Protocol error

Usually this is the synxtax error in the command. Try with -p option, and without -p option. See which one it will take.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
July 25, 2015 03:32PM
thanks bodhi

with without -p .. same result ;-(


bodhi Wrote:
-------------------------------------------------------
> pengu,
>
>
> +xmodem: Protocol error
>
>
> Usually this is the synxtax error in the command.
> Try with -p option, and without -p option. See
> which one it will take.
Re: nsa325v2 debian usb stick isn't recognized
July 25, 2015 07:35PM
pengu,

> with without -p .. same result ;-(
>
> > +xmodem: Protocol error

Was the box reset by the watchdog at this point, or was it reset only at a moment later (30 second minus a few seconds)?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
July 25, 2015 08:48PM
I think after 5 .. sometimes after 10 seconds
no matter which usb port or hub /extension cable / usb to ttl cable I use

sometimes the power on isn't recognized and kwboot still waits for power on
Re: nsa325v2 debian usb stick isn't recognized
July 25, 2015 08:55PM
pengu Wrote:
-------------------------------------------------------
> I think after 5 .. sometimes after 10 seconds
> no matter which usb port or hub /extension cable /
> usb to ttl cable I use
>
> sometimes the power on isn't recognized and kwboot
> still waits for power on

The watchdog starts right away after you press the power button. So did you wait until the power light came back on before executting kwboot? if you start kwboot first it won't work. Sorry I forgot to mention this (thought you knew).

Sequence:

- Type kwboot command but don't execute it.
- Press power button and wait until it resets once.
- Press return to execute kwboot within 1,2 seconds.

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



Edited 2 time(s). Last edit at 07/25/2015 08:58PM by bodhi.
Re: nsa325v2 debian usb stick isn't recognized
July 26, 2015 04:28AM
the power LED .. first I thought that there is something wrong .. only the power LED lights up ... one of the green LEDs lights up a little bit .. and no serial output after a fiew seconds the power LED goes off and on again .. then U-Boot is up .. you meen this?
sometimes this happens twice not only once

let's try ;-)
Re: nsa325v2 debian usb stick isn't recognized
July 26, 2015 05:22AM
pengu Wrote:
-------------------------------------------------------
> the power LED .. first I thought that there is
> something wrong .. only the power LED lights up
> ... one of the green LEDs lights up a little bit
> .. and no serial output after a fiew seconds the
> power LED goes off and on again .. then U-Boot is
> up .. you meen this?
> sometimes this happens twice not only once
>
> let's try ;-)

Yes. That's what I meant :) the Power LED goes off because the watchdog barks and causes the reset, and then the system starts again (when the Power LED lights up again). So you want to execute kwboot within 1,2 seconds after the Power LED light goes off. This is to make sure the box bootROM has time to finish loading the image completely. When the u-boot starts, it will kill the watchdog right away. Once you get to the u-boot countdown, you're home free! the watchdog would have been killed at that time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
July 26, 2015 05:50AM
exactly

after the blue LED goes off for the first time I start kwboot ..
after a while, the LED goes off and on again and than the image is loading .. but not completely as I think

./kwboot -t -B 115200 /dev/ttyUSB0 -b /data/uboot.2013.10-tld-1-test.nsa325.uart.kwbSending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  8 % [......................................................................]
 11 % [......................................................................]
 14 % [......................................................................]
 17 % [......................................................................]
 20 % [......................................................................]
 23 % [......................................................................]
 26 % [......................................................................]
 29 % [......................................................................]
 32 % [......................................................................]
 35 % [......................................................................]
 38 % [......................................................................]
 41 % [............................................+.........................]
 44 % [......................................................................]
 47 % [......................................................................]
 50 % [......................................................................]
 53 % [......................................................................]
 56 % [......................................................................]
 59 % [......................................................................]
 62 % [......................................................................]
 65 % [......................................................................]
 68 % [......................................................................]
 71 % [......................................................................]
 74 % [......................................................................]
 77 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 85 % [......................................................................]
 88 % [......................................................................]
 91 % [......................................................................]
 94 % [......................................................................]
 97 % [......................................................]
[Type Ctrl-\ + c to quit]


yeah .. success!!!

[Type Ctrl-\ + c to quit]


U-Boot 2013.10-tld-1-uart (Aug 15 2014 - 02:26:46)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_??
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0 [PRIME]
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0

at this time its loading right after the first "bark"

usb start seems to work

NSA325> usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scannin
g usb for storage devices... 1 Storage Device(s) found
NSA325>

NSA325> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller 
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB2.0 Hub 
    |
    +-3  Mass Storage (480 Mb/s, 500mA)
         General USB Flash Disk 130503000000398
       
NSA325>

now debian is booting fine and I can play with your newest U-Boot and flash it

(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
reading /uImage
3096734 bytes read in 135 ms (21.9 MiB/s)
reading /uInitrd
7128652 bytes read in 286 ms (23.8 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.1.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3096670 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.1.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7128588 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.1.0-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #2 PREEMPT Sun Jun 28 01:12:41 PDT 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: ZyXEL NSA325
...
...
Debian GNU/Linux 8 debianNSA325v2 ttyS0

debianNSA325v2 login:



Edited 4 time(s). Last edit at 07/27/2015 04:37AM by pengu.
Re: NSA 325 V2 Debian Is Possible!
August 01, 2015 08:50PM
Re: Buzzer ?
August 04, 2015 08:46PM
Hi pbg4,

>     thermal@10078 {
>             compatible =
> "marvell,kirkwood-thermal";
>             reg = <0x10078 0x4>;
>             status = "okay";
>     };

I've briefly gave it a shot and it does not seem to work. I've recompiled a new kernel with modified config and DTS using this latest DTS patch:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/147699.html

The kirkwood thermal class was created. But the temperature value was always default.

/sys/class/hwmon/hwmon0 -> ../../devices/virtual/hwmon/hwmon0
sensors -u
kirkwood_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 49.174

The i2c part of 2013-February patch seems to be wrong, so I guess that I'll need to take a look again when I have time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
August 06, 2015 04:16AM
With stock Uboot you need to enable usb power first, or it won't find usb drives.

add "mw.l f1010100 0020c000" to your usb bootcmd, this will power up USB.

(it writes a command directly into the GPIO ram registers to enable USB power)

Also you can use my automated install script, you can figure out how to have it install a standard Debian instead of my package with OMV included.
http://forum.doozan.com/read.php?2,22432

pengu Wrote:
-------------------------------------------------------
> got a nsa325v2, enabled telnet, changed the U-Boot
> env to boot debian (same as on NSA310/310s/320s),
> connected the stick to an usb 2.0 port (on the
> back) and rebooted
>
> the status of the LEDs indicates that ZyXEL OS was
> booting up
> looks like bootcmd_usb isn't executed.
>
> http://pastebin.com/34W98cgu <- fw_printenv
> output
>
>
> [Edit]
>
> connectet serial console
> and same thing as described here :-(
>
> http://forum.doozan.com/read.php?2,22847
>
>
> USB:   scanning bus for devices... 2 USB Device(s)
> found                                             
>                                                   
>                          
> Waiting for storage device(s) to settle before
> scanning...                                       
>                                                   
>                              
> 0 Storage Device(s) found   
>
>
> the behavior of the LEDs is different from the
> NSA320s so I thought that this is different.
> At U-Boot stage, the LEDs were off
> after loading the kernel, all LEDs went on
> when booting linux, the sys LED is blinking
>
> @bodhi:
> I've tried to UART boot with your U-Boot
> (uboot.2013.10-tld-1-test.nsa325.uart.kwb)
> but no success
>
>
> Sending boot message. Please reboot the
> target...-
> Sending boot image...
>   0 %
> [.................................................
> .....................]
>   3 %
> [.................................................
> .....................]
>   5 % [....+xmodem: Protocol error
>
> changed the usb ttl cable but no luck
Re: nsa325v2 debian usb stick isn't recognized
August 06, 2015 04:48AM
bobafetthotmail,

I've released a new u-boot for NSA325. It solved all little problems that have been nagging us.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
August 06, 2015 07:38AM
@bobafetthotmail
thanks .. this seems solved now for my NSA325v2 as you can see, but perhaps it helps to recognize the USB mass storage on NSA320s.

but there is another problem, wich rises now:

Is there something wrong with the USB 3.0 port?

when connecting different usb sticks when running debian, the rootfs will go away after a while, only reboot helps ;-(
Re: nsa325v2 debian usb stick isn't recognized
August 06, 2015 03:08PM
pengu,

> but there is another problem, wich rises now:
>
> Is there something wrong with the USB 3.0 port?
>
> when connecting different usb sticks when running
> debian, the rootfs will go away after a while,
> only reboot helps ;-(

Did you look at the sys log for clues when this happened? I'd not be too surpirsed to see certain USB 3.0 drive cause some kernel panic. The xhci driver does have quirks exceptions for quite a few brands of USB 3.0 sticks. Yours could be one that it does not handle well.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: nsa325v2 debian usb stick isn't recognized
August 07, 2015 12:57AM
>
> Did you look at the sys log for clues when this
> happened?

The only thing I've seen is that the (usb 2 rootfs) stick is gone and so it isn't possible anymore to read from the filesystem.
I've connected only usb 2 sticks to the usb3 port and they were still there.
it seems that only the usb2.0 back ports were effected


> The xhci driver does have quirks exceptions for quite a few
> brands of USB 3.0 sticks. Yours could be one that
> it does not handle well.

I hoped that this one (NEC renesas) is still the best one but I think I am wrong (on ARM Kirkwood devices)
Re: nsa325v2 debian usb stick isn't recognized
August 07, 2015 01:01AM
pengu Wrote:
-------------------------------------------------------
> >
> > Did you look at the sys log for clues when this
> > happened?
>
> The only thing I've seen is that the (usb 2
> rootfs) stick is gone and so it isn't possible
> anymore to read from the filesystem.

You can take this stick to another box and look at it there.

And remember to turn system logging back to disk if you're logging to RAM (my basic rootfs logs to RAM).

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



Edited 1 time(s). Last edit at 08/07/2015 01:03AM by bodhi.
Re: nsa325v2 debian usb stick isn't recognized
August 07, 2015 09:41AM
bodhi Wrote:
-------------------------------------------------------
> bobafetthotmail,
>
> I've released a
> new
> u-boot for NSA325
. It solved all little
> problems that have been nagging us.

That's nice. But you know I like things my way soooo.... :D

...could that be done with GPIO register modification too like the watchdog (sigh)? What GPIO number is that?
I'd rather do that without flashing a u-boot with my scripts.
Re: nsa325v2 debian usb stick isn't recognized
August 07, 2015 02:39PM
bobafetthotmail,

> ...could that be done with GPIO register
> modification too like the watchdog (sigh)? What
> GPIO number is that?

What are you trying to do? (there are multiple subjects in this thread!)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 08, 2015 06:30AM
Everything you said has been fixed in the new uboot. :)

My script recognizes the NAS so I can add specific envs for nsa 310, 320 and 325 in the right NAS.
Re: NSA 325 V2 Debian Is Possible!
August 08, 2015 03:19PM
bobafetthotmail Wrote:
-------------------------------------------------------
> Everything you said has been fixed in the new
> uboot. :)
>
> My script recognizes the NAS so I can add specific
> envs for nsa 310, 320 and 325 in the right NAS.

I'm going to release new Debian kernel that will fix the network link problems for the 310s, 320s, 320, and 325. So there will be no need to use GPIO work around. It will work without new u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 09, 2015 02:52PM
Very nice, thanks!
Re: NSA 325 V2 Debian Is Possible!
August 10, 2015 10:49AM
Hi everybody,

has someone an idea why USB3 performance is so poor?
When i try to copy files (large) from the HDD to an USB3-HDD the speed is about 1,5mb/s.
Via LAN i reach up to 35mb (smb)

Any idea how to check this?
Re: NSA 325 V2 Debian Is Possible!
August 12, 2015 06:32AM
addy75 Wrote:
-------------------------------------------------------
> Hi everybody,
>
> has someone an idea why USB3 performance is so
> poor?

Addy,

I just tried (kernel 4.1.4 and debian8) from HDD-internal to HDD-usb (2.5" usb2) and speed is ~35MB/sec, vicecersa is ~30MB/sec.

Did you try with another device, maybe a USB2-only one? Is target filesystem ext4 or ?
Also, if you hdparm it? (change sdc with what you need)
hdparm -tT /dev/sdc

/dev/sdc:
 Timing cached reads:   592 MB in  2.00 seconds = 295.34 MB/sec
 Timing buffered disk reads:  86 MB in  3.01 seconds =  28.59 MB/sec

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
August 12, 2015 06:34AM
Hi all,

I'm trying Linux 4.1.x and Debian8.
Sometimes, during shutdown, I receive this message:

[  390.760685] watchdog watchdog0: watchdog did not stop!

Does anybody know what does it mean and, more important, if it's a real problem?
pseudo-disclaimer: I admit I don't know systemd so much yet... :D

Ty!

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
August 12, 2015 02:53PM
Hi davideDG,

i'll take a better closer look after my holiday.

Target FS is ntfs
Re: NSA 325 V2 Debian Is Possible!
August 12, 2015 03:21PM
Hi Davide,

>
> [  390.760685] watchdog watchdog0: watchdog did
> not stop!
>

Not a real problem. You can ignore it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 13, 2015 04:32PM
bodhi Wrote:
-------------------------------------------------------

> Not a real problem. You can ignore it.

Thanks. My new system is ready at last!
I finally finished fighting against Kernel 4.x, Debian8, SystemD, Bluez5 and PulseAudio5 :D

Some samba reports on internal drive, ext4 with Gbps net:
read 98MB/sec sustained
write 60MB/sec sustained

This is a little pleasantly unexpected! (kernel 3.x and debian 7 was at ~50MB/sec R/W).


Again, thank you T... Mr. Bodhi for your endless and untiring work and support!!

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
August 13, 2015 06:25PM
You're welcome, Davide!

> Some samba reports on internal drive, ext4 with
> Gbps net:
> read 98MB/sec sustained
> write 60MB/sec sustained

Now that's some impressive stats! the best I've seen for Samba on these boxes :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 04:28AM
Hi,

booting into Debian was successful.
When I want to boot the standard system do I have to change something in the environment parameters or just boot without usb stick?

Regards, Dieter
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: