Welcome! Log In Create A New Profile

Advanced

Debian on NSA310S?

Posted by pengu 
Re: Debian on NSA310S?
July 16, 2015 05:43AM
I found this too but it didn't looked important for me because my ethernet connection is working.

JohnnyUSA, superelchi:
what's your ZyxelOS version?
perhaps they changed something so ist's working for me
Re: Debian on NSA310S?
July 16, 2015 06:41AM
Fresh from the WebIF:
Modellname: NSA310S
Firmware-Version: V4.70(AALH.0)
Re: Debian on NSA310S?
July 16, 2015 06:54AM
Sorry guys :) looks like we're back to square 1 :))

The dmesg superelchi posted above is very crucial. Exactly what Zyxel OS did to bring up the Ethernet. And it was what the NSA320S DTS specified. So even though it is a different LAN chip, the init sequence is the same!!!

Please go back to use the 320S DTS in the mean time. I'll modify it and post another version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 16, 2015 12:18PM
Hi,

on the NSA320 phy is powered if power_resume is on, but it does
not help to simply write 1 to power_resume_data, you must give the
power_resume_clk a transition from 1 to 0, only than the data pin is read,

so if you put something into rc.local like this on the NSA320 power_resume
is switched on at boot, if you shutdown the device than, take of the powerplug
for a couple of seconds, switch power on again, the device boots and the phy is powered,
that is the case with the zyxel vendor uboot,

for the NSA310S you simply have to change the gpio numbers, because of the different gpio numbering,
which you should look up and change accordingly, and try if Zyxel used the same design on the NSA310S,..

best wishes pbg4

# NSA320 export both gpios for power_resume = on
# gpio power_resume_data = 47
# gpio power_resume_clk  = 49
/bin/echo 47 > /sys/class/gpio/export
/bin/echo 49 > /sys/class/gpio/export

# 49 out, value 1
/bin/echo "out" > /sys/class/gpio/gpio49/direction
/bin/echo 1 > /sys/class/gpio/gpio49/value
# 47 out, value 1
/bin/echo "out" > /sys/class/gpio/gpio47/direction
/bin/echo 1 > /sys/class/gpio/gpio47/value
# set 49 value 0
/bin/echo 0 > /sys/class/gpio/gpio49/value



Edited 2 time(s). Last edit at 07/16/2015 01:28PM by pbg4.
Re: Debian on NSA310S?
July 16, 2015 01:35PM
I think I have a possible solution, will post results later.
or not ;-(
I thought that I have a differend firmware version but it's V4.70(AALH.0) too

cold booting ZyxelOS is different here:


Boot from RAM disk
Mount system disk image ...
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: restored from checkpoint
yaffs_read_super: isCheckpointed 1
/etc/zyxel/conf exist..
/etc/init.d/rcS: line 406: can't create /sys/block/sda/queue/read_ahead_kb: nonexistent directory
Start rcS2 of ZyXEL style
base address = 40151000
words[0] = phypoke
woregiga0: link down
ds[1] = 1
words[2] = 16
words[3] = 3
:GbitPhy[0x00000001:0x00000016] <= 0x00000003
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 10
words[3] = 1017
:GbitPhy[0x00000001:0x00000010] <= 0x00001017
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 11
words[3] = 4408
:GbitPhy[0x00000001:0x00000011] <= 0x00004408
Set the phy back to auto-negotiation mode
begiga0: link upase address = 40, full duplex151000
words[0], speed 1 Gbps = phypoke
word
s[1] = 1
words[2] = 16
words[3] = 0
:GbitPhy[0x00000001:0x00000016] <= 0x00000000
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 4
words[3] = 1e1
:GbitPhy[0x00000001:0x00000004] <= 0x000001e1
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 9
words[3] = 300
:GbitPhy[0x00000001:0x00000009] <= 0x00000300
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 10egiga0: link down

words[3] = 3860
:GbitPhy[0x00000001:0x00000010] <= 0x00003860
base address = 40151000
words[0] = phypoke
words[1] = 1
words[2] = 0
words[3] = 9140
:GbitPhy[0x00000001:0x00000000] <= 0x0000914

when sutting down

 1435 root      3492 S    /usr/sbin/zylogd
 1445 root      7836 S    /usr/sbin/uamd
 1703 root      5432 S <  /usr/local/sbin/dhcpcd_request egiga0 50 auto
 1732 root      1600 S <  /sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h NSA310S -m
 1972 root     10904 S <  /usr/sbin/httpd -f /etc/service_conf/htJul 16 18:52:17 NetworkNAS syslog-ng[2488]: Termination requested via sign;
Jul 16 18:52:17 NetworkNAS syslog-ng[2488]: syslog-ng shutting down; version='2.0.10'
Jul 16 18:52:17 NetworkNAS dhcpcd[1732]: terminating on signal 15
Jul 16 18:52:17 NetworkNAS dhcpcd[1732]: terminating on signal 11

  2567 root      2800 S    -/bin/sh
BusyBox v1.17.2 (2014-02-07 14:12:32 CST) multi-call binary.

Usage: swapoff [-a] [DEVICE]

rootfs / rootfs rw 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
none /proc/bus/usb ussave exit: isCheckpointed 1
bfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
/dev/mtdblock8 /zyxel/mnt/nand yaffs2 ro,relatime 0 0
none /zyxel/mnt/sysdisk ramfs ro,relatime 0 0
/dev/loop0 /ram_bin ext2 ro,relatime,errors=continue 0 0
/dev/loop0 /usr ext2 ro,relatime,errors=continue 0 0
/dev/loop0 /lib/security ext2 ro,relatime,errors=continue 0 0
/dev/loop0 /lib/modules ext2 ro,relatime,errors=continue 0 0
/dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
/dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
/dev/ram0 /usr/local/var tmpfs rw,relatime,size=5120k 0 0
/dev/mtdblock4 /usr/local/apache/web_framework/data/config yaffs2 rw,relatime 0 0
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system halt
md: stopping all md devices.
Power down.
reg(0, 4) = 0x21
reg(0, 9) = 0x0
egiga0: link down
reg(0, 0) = 0x1140
reg(3, 18) = 0x4985
reg(3, 17) = 0x4420
reg(0, 18) = 0x0
reg(17, 16) = 0x4500
reg(17, 25) = 0xf45c
reg(17, 24) = 0xe3ab
reg(17, 23) = 0x1ee6

now I can boot into debian and the LAN works fine



Edited 5 time(s). Last edit at 07/16/2015 01:54PM by pengu.
Re: Debian on NSA310S?
July 16, 2015 02:31PM
Hi pbg4,

> for the NSA310S you simply have to change the gpio
> numbers, because of the different gpio numbering,
> which you should look up and change accordingly,
> and try if Zyxel used the same design on the
> NSA310S,..
>

Yes. I did use your post's idea, and I've asked Johnny to try GPIO 26. Looking at the DTS, that was the only one seems feasible.

I think we need more definition in the device tree re Ethernet Phy. Something like the shutdown part pengu's just posted above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 16, 2015 03:00PM
Hi bodhi,

yes you are right, but if gpio 26 is the data pin, we would need to identify the clock pin too,..
if zyxel has used the nsa320 scheme to activate the phy in the same way on the nsa310s, so one could
use the same rc.local based approach as on the nsa320,..

but the protocols pengu just posted show that they are poking register settings on startup, to activate the phy,
that's really weird,..

and even if somebody succeeds in putting all this in the dts description, it will never go upstream and get
accepted, because it is against the spirit of devicetree, which should deliver the descriptions, and after the enumeration
of devices the kernel and its modules care for the correct settings of register values,..

best wishes pbg4
Re: Debian on NSA310S?
July 16, 2015 03:13PM
pbg4,

> but the protocols pengu just posted show that they
> are poking register settings on startup, to
> activate the phy,
> that's really weird,..

I think because their u-boot does not take care of this step. They have to do it in the OS. Zyxel (and other embedded manufacturers) has this pattern of development, i.e. they take a lot shortcuts like this.

> because it is against the spirit of
> devicetree, which should deliver the descriptions,
> and after the enumeration
> of devices the kernel and its modules care for the
> correct settings of register values,..

Agree! these init values should be in the driver for the device. We are just working around it to avoid changing driver.

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



Edited 1 time(s). Last edit at 07/16/2015 03:13PM by bodhi.
Re: Debian on NSA310S?
July 16, 2015 03:16PM
Ok here is another DTB version to try :). I've made the 2 LAN chips compatible devices in the definition, and they have the same init sequence.

I've included both DTB and DTS in this tarball.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-nsa310s.tar (40 KB)
Re: Debian on NSA310S?
July 16, 2015 04:20PM
bodhi,

tried the new dtb file:


Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0000020f).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
Re: Debian on NSA310S?
July 16, 2015 04:49PM
JohnnyUSA Wrote:
-------------------------------------------------------
> bodhi,
>
> tried the new dtb file:
>
>
> 
> Starting kernel ...
> 
> Uncompressing Linux... done, booting the kernel.
> 
> Error: unrecognized/unsupported machine ID (r1 =
> 0x0000020f).
> 
> Available machine support:
> 
> ID (hex)        NAME
> ffffffff        Generic DT based system
> ffffffff        Marvell Kirkwood (Flattened Device
> Tree)
> 
> Please check your kernel config and/or
> bootloader.
>

Johhny,

You're sure it was appended to uImage? this error usually occurs if there is no DTB embedded or a wrong one. OTOH, It could have been that the DTB has error so it could not be loaded (the DTC does a poor job of reporting it when we compile).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 16, 2015 05:19PM
bodhi,

tried again, same result.
Re: Debian on NSA310S?
July 16, 2015 05:29PM
Johhny,

How about this one.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-nsa310s.tar (30 KB)
Re: Debian on NSA310S?
July 16, 2015 05:44PM
bodhi,

this one worked fine, debian booted but still no link at coldboot.

Cheers!
Re: Debian on NSA310S?
July 16, 2015 05:55PM
@pbg4,

More research: regarding Marvell register initial values, it was accepted into the mainline 4.1! so this acceptable.

grep -5 'reg-init' /usr/src/linux-4.1-tld/arch/arm/boot/dts/zynq-parallella.dts

ethernet_phy: ethernet-phy@0 {
		/* Marvell 88E1318 */
		compatible = "ethernet-phy-id0141.0e90",
		             "ethernet-phy-ieee802.3-c22";
		reg = <0>;
		marvell,reg-init = <0x3 0x10 0xff00 0x1e>,
		                   <0x3 0x11 0xfff0 0xa>;
	};
};

&i2c0 {

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 16, 2015 06:12PM
All,

I'd like to see the whole boot log into stock Zyxel OS. Could someone pastebin?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 17, 2015 02:58AM
I can confirm JohnnyUSA's findings: no link with new DTB. Switch still says "Link Up, 10HDX".

Here is my Zyxel OS boot & schutdown log.

EDIT: Just got a download link for the NSA301S GPL sources. Veeeeery slow ftp connection - will take around 12 hours. :O



Edited 1 time(s). Last edit at 07/17/2015 03:00AM by superelchi.
Re: Debian on NSA310S?
July 17, 2015 03:02AM
superelchi Wrote:
-------------------------------------------------------
> I can confirm JohnnyUSA's findings: no link with
> new DTB. Switch still says "Link Up, 10HDX".
>
> Here is my
> Zyxel OS boot & schutdown log.
>
> EDIT: Just got a download link for the NSA301S GPL
> sources. Veeeeery slow ftp connection - will take
> around 12 hours. :O


Pass the link pls, i'll try to download also.

@bodhi, i don't have access to the NAS atm to send my ZyxelOS boot, sorry.



Edited 1 time(s). Last edit at 07/17/2015 03:04AM by JohnnyUSA.
Re: Debian on NSA310S?
July 17, 2015 03:47AM
All,

How about doing this test. We should compare the Debian shutdown sequence between the box that worked (pengu's) and the boxes that did not work (superlechi's, Johnny's).

In the 1st line of these scripts:
/etc/init.d/halt
/etc/init.d/reboot
turn on the script echo so that we can see in the serial log whether the shutdown and reboot actions were the same in both cases:
#! /bin/sh -x

Perhaps we can find the differences:

1. What happended during shutdown that has caused the Ethernet to behave differently in this command execution. Were the flags the same?
halt -d -f $netdown $poweroff $hddown

2. What happened during reboot while in Debian. Did the ethernet stay up at 1000Mbs? Obviously this must have happened, but it's good to see it any way.

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



Edited 2 time(s). Last edit at 07/17/2015 04:49AM by bodhi.
Re: Debian on NSA310S?
July 17, 2015 03:55AM
bodhi Wrote:
-------------------------------------------------------
> All,
>
> How about doing this test. We should compare the
> shutdown sequence between the box that worked
> (pengu's) and the boxes that did not work
> (superlechi's, Johnny's).

Just to be sure I understand you correctly: shutdown sequence of Debian or Zyxel OS?
Re: Debian on NSA310S?
July 17, 2015 04:21AM
Finished downloading the GPL sources.

ZyXEL 310S GPL sources soon up on mirrors. Gonna PM you guys (@bodhi, @superelchi) with links.
Re: Debian on NSA310S?
July 17, 2015 04:38AM
superelchi Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > All,
> >
> > How about doing this test. We should compare
> the
> > shutdown sequence between the box that worked
> > (pengu's) and the boxes that did not work
> > (superlechi's, Johnny's).
>
> Just to be sure I understand you correctly:
> shutdown sequence of Debian or Zyxel OS?

Shutdown on Debian. I wonder if the shutdown sequences were different regarding to the power off and netdown.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 17, 2015 05:35AM
bodhi Wrote:
-------------------------------------------------------
> All,
>
> How about doing this test. We should compare the
> Debian shutdown sequence between the box that
> worked (pengu's) and the boxes that did not work
> (superlechi's, Johnny's).
>
Debian poweroff:
poweroff


Broadcast message from root@debian (ttyS0) (Fri Jul 17 02:54:30 2015):




The system is going down for system halt NOW!


INIT: Switching to run
IN[info] Using makefile-style concurrent boot in runlevel 0.
[....] Stopping busybox' klogd implementation: klogd1209 (klogd)
Stopped klogd (pid 1209).
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS kernel daemon: mountd nfsd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Unexporting directories for NFS kernel daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' syslogd implementation: syslogd1206 (syslogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Asking all remaining processes to terminate...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] All processes ended within 1 seconds...[?25l[?1c7[ ok 8[?25h[?0cdone.
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

[....] Stopping rpcbind daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS common utilities: idmapd statd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Deconfiguring network interfaces...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Unmounting temporary filesystems...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Deactivating swap...[?25l[?1c7[ ok 8[?25h[?0cdone.
+ NETDOWN=yes
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ [ -f /etc/default/halt ]
+ . /etc/default/halt
+ HALT=poweroff
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/40-systemd ]
+ . /lib/lsb/init-functions.d/40-systemd
+ _use_systemctl=0
+ [ -d /run/systemd/system ]
+ [ 0 = 1 ]
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ do_stop
+ [  =  ]
+ INIT_HALT=POWEROFF
+ [ POWEROFF = POWEROFF ]
+ [ -x /etc/init.d/ups-monitor ]
+ hddown=-h
+ grep -qs ^md.*active /proc/mdstat
+ poweroff=-p
+ [ POWEROFF = HALT ]
+ netdown=-i
+ [ yes = no ]
+ log_action_msg Will now halt
+ log_action_msg_pre Will now halt
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xlinux != x ]
+ [ xlinux != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput setaf 6
+ CYAN=
+ /usr/bin/tput op
+ NORMAL=
+ /bin/echo -ne [info] 
[info] + echo Will now halt.
Will now halt.
+ log_action_msg_post Will now halt
+ :
+ logger -s Will halt - now
logger: Will halt - now
+ [ -d /sys/class/leds/status:green:health ]
+ [ -d /sys/class/leds/dockstar:green:health ]
+ [ -d /sys/class/leds/plug:green:health ]
+ [ -d /sys/class/leds/power:blue ]
+ [ -d /sys/class/leds/usb1:blue ]
+ [ -d /sys/class/leds/usb2:blue ]
+ [ -d /sys/class/leds/usb3:blue ]
+ [ -d /sys/class/leds/usb4:blue ]
+ [ -d /sys/class/leds/nsa325:green:sys ]
+ halt -d -f -i -p -h
[   92.932134] reboot: Power down

Debian reboot:
reboot


Broadcast message from root@debian (ttyS0) (Fri Jul 17 02:57:11 2015):




The system is going down for reboot NOW!


INIT: Switching to run
I[info] Using makefile-style concurrent boot in runlevel 6.
[....] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' klogd implementation: klogd1205 (klogd)
Stopped klogd (pid 1205).
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS kernel daemon: mountd nfsd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Unexporting directories for NFS kernel daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' syslogd implementation: syslogd1207 (syslogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Asking all remaining processes to terminate...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] All processes ended within 1 seconds...[?25l[?1c7[ ok 8[?25h[?0cdone.
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

[....] Stopping rpcbind daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS common utilities: idmapd statd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Deconfiguring network interfaces...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Unmounting temporary filesystems...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Deactivating swap...[?25l[?1c7[ ok 8[?25h[?0cdone.
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/40-systemd ]
+ . /lib/lsb/init-functions.d/40-systemd
+ _use_systemctl=0
+ [ -d /run/systemd/system ]
+ [ 0 = 1 ]
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ do_stop
+ log_action_msg Will now restart
+ log_action_msg_pre Will now restart
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xlinux != x ]
+ [ xlinux != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput setaf 6
+ CYAN=
+ /usr/bin/tput op
+ NORMAL=
+ /bin/echo -ne [info] 
[info] + echo Will now restart.
Will now restart.
+ log_action_msg_post Will now restart
+ :
+ reboot -d -f -i
[   82.023270] reboot: Restarting system


>
> 1. What happended during shutdown that has caused
> the Ethernet to behave differently in this command
> execution. Were the flags the same?
>
> halt -d -f $netdown $poweroff $hddown
>
>
That's over my head. Don't know what you mean...

> 2. What happened during reboot while in Debian.
> Did the ethernet stay up at 1000Mbs? Obviously
> this must have happened, but it's good to see it
> any way.

Yes. Stays at 1000FDX on Debian reboots. Changes to 10HDX after poweroff.
Re: Debian on NSA310S?
July 17, 2015 06:17AM
superelchi,

In the script /etc/init.d/halt, try changing NETDOWN to not shutting down the ethernet.

#! /bin/sh -x
### BEGIN INIT INFO
# Provides:          halt
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO

NETDOWN=no

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 17, 2015 06:52AM
#! /bin/sh -x
### BEGIN INIT INFO
# Provides:          halt
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO

NETDOWN=no

No change.
After poweroff link changes to 10HDX and is not coming up on next boot.

Besides - wouldn't be of any use on coldboot...
Re: Debian on NSA310S?
July 17, 2015 07:29AM
Did you do "shutdown -h now"?

If you did, then let's wait for pengu and compare the 2 shutdown sequences.

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



Edited 1 time(s). Last edit at 07/17/2015 07:31AM by bodhi.
Re: Debian on NSA310S?
July 17, 2015 09:30AM
No, I did "poweroff". Thought that's the same in this case (I kown there are subtle differences).

Here is the log for "shutdown -h now" with "NETDOWN=no" and logging enabled
shutdown -h now


Broadcast message from root@debian (ttyS0) (Fri Jul 17 07:15:20 2015):




The system is going down for system halt NOW!


INIT: Switching to run
IN[info] Using makefile-style concurrent boot in runlevel 0.
[....] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' klogd implementation: klogd1205 (klogd)
Stopped klogd (pid 1205).
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS kernel daemon: mountd nfsd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Unexporting directories for NFS kernel daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' syslogd implementation: syslogd1207 (syslogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Asking all remaining processes to terminate...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] All processes ended within 1 seconds...[?25l[?1c7[ ok 8[?25h[?0cdone.
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

[....] Stopping rpcbind daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS common utilities: idmapd statd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Deconfiguring network interfaces...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Unmounting temporary filesystems...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Deactivating swap...[?25l[?1c7[ ok 8[?25h[?0cdone.
+ NETDOWN=no
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ [ -f /etc/default/halt ]
+ . /etc/default/halt
+ HALT=poweroff
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/40-systemd ]
+ . /lib/lsb/init-functions.d/40-systemd
+ _use_systemctl=0
+ [ -d /run/systemd/system ]
+ [ 0 = 1 ]
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ do_stop
+ [  =  ]
+ INIT_HALT=POWEROFF
+ [ POWEROFF = POWEROFF ]
+ [ -x /etc/init.d/ups-monitor ]
+ hddown=-h
+ grep -qs ^md.*active /proc/mdstat
+ poweroff=-p
+ [ POWEROFF = HALT ]
+ netdown=-i
+ [ no = no ]
+ netdown=
+ log_action_msg Will now halt
+ log_action_msg_pre Will now halt
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xlinux != x ]
+ [ xlinux != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput setaf 6
+ CYAN=
+ /usr/bin/tput op
+ NORMAL=
+ /bin/echo -ne [info] 
[info] + echo Will now halt.
Will now halt.
+ log_action_msg_post Will now halt
+ :
+ logger -s Will halt - now
logger: Will halt - now
+ [ -d /sys/class/leds/status:green:health ]
+ [ -d /sys/class/leds/dockstar:green:health ]
+ [ -d /sys/class/leds/plug:green:health ]
+ [ -d /sys/class/leds/power:blue ]
+ [ -d /sys/class/leds/usb1:blue ]
+ [ -d /sys/class/leds/usb2:blue ]
+ [ -d /sys/class/leds/usb3:blue ]
+ [ -d /sys/class/leds/usb4:blue ]
+ [ -d /sys/class/leds/nsa325:green:sys ]
+ halt -d -f -p -h
[   92.087396] reboot: Power down

.. and with "poweroff"
poweroff


Broadcast message from root@debian (ttyS0) (Fr
INIT: Sendin[info] Using makefile-style concurrent boot in runlevel 0.
[....] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' klogd implementation: klogd1205 (klogd)
Stopped klogd (pid 1205).
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS kernel daemon: mountd nfsd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Unexporting directories for NFS kernel daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping busybox' syslogd implementation: syslogd1208 (syslogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Asking all remaining processes to terminate...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] All processes ended within 1 seconds...[?25l[?1c7[ ok 8[?25h[?0cdone.
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

[....] Stopping rpcbind daemon...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Stopping NFS common utilities: idmapd statd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Deconfiguring network interfaces...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Unmounting temporary filesystems...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Deactivating swap...[?25l[?1c7[ ok 8[?25h[?0cdone.
+ NETDOWN=no
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ [ -f /etc/default/halt ]
+ . /etc/default/halt
+ HALT=poweroff
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/40-systemd ]
+ . /lib/lsb/init-functions.d/40-systemd
+ _use_systemctl=0
+ [ -d /run/systemd/system ]
+ [ 0 = 1 ]
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ do_stop
+ [  =  ]
+ INIT_HALT=POWEROFF
+ [ POWEROFF = POWEROFF ]
+ [ -x /etc/init.d/ups-monitor ]
+ hddown=-h
+ grep -qs ^md.*active /proc/mdstat
+ poweroff=-p
+ [ POWEROFF = HALT ]
+ netdown=-i
+ [ no = no ]
+ netdown=
+ log_action_msg Will now halt
+ log_action_msg_pre Will now halt
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xlinux != x ]
+ [ xlinux != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput setaf 6
+ CYAN=
+ /usr/bin/tput op
+ NORMAL=
+ /bin/echo -ne [info] 
[info] + echo Will now halt.
Will now halt.
+ log_action_msg_post Will now halt
+ :
+ logger -s Will halt - now
logger: Will halt - now
+ [ -d /sys/class/leds/status:green:health ]
+ [ -d /sys/class/leds/dockstar:green:health ]
+ [ -d /sys/class/leds/plug:green:health ]
+ [ -d /sys/class/leds/power:blue ]
+ [ -d /sys/class/leds/usb1:blue ]
+ [ -d /sys/class/leds/usb2:blue ]
+ [ -d /sys/class/leds/usb3:blue ]
+ [ -d /sys/class/leds/usb4:blue ]
+ [ -d /sys/class/leds/nsa325:green:sys ]
+ halt -d -f -p -h
[   92.700362] reboot: Power down

For both: link changes from 1000FDX to 10HDX after poweroff. No network after next boot.
Re: Debian on NSA310S?
July 17, 2015 10:22AM
ok let's see ..

power off --> 1000 baseT FD
at U-Boot --> 1000 baseT-FD

I could ping my router and other devices in the network

while booting ZyxelOS, the device isn't connectet
after a while connectet with 1000 baseT-FD

after issuing a halt command and the device is powerd off,
--> 10 baseT-HD

pinging within U-Boot isn't possible

now booting debian ...
still 10bseT-HD ..
while the driver is loaded this changes to 1000 baseT-FD




[....] Unmounting temporary filesystems...done.                                 
[....] Deactivating swap...done.                                                
[  130.378864] EXT4-fs (sda3): re-mounted. Opts: (null)                         
[info] Will now halt.                                                           
logger: Will halt - now                                                         
[  132.535946] reboot: Power down
now the device isn't connected anymore

booting up again and interrupt the boot process, the device is still shown as not connected.
U-Boot reports no link and after setting an IP address pinging isn't possible
booting up debian again, the device is back up with 1000 baseT-FD

with NETDOWN=no, nothing changed.
The device is off after power off and on U-Boot pinging isn't possible.

booting into ZyxelOS --> power of --> power on --> U-Boot .. the device is back with 10 baset-HD
and pinging within U-Boot is still not possible.

when booting debian again, setting NETDOWN to yes ...
the ethernet is up again in U-Boot (1000 baseT-FD) and pinging is possible



Edited 10 time(s). Last edit at 07/17/2015 11:36AM by pengu.
Re: Debian on NSA310S?
July 17, 2015 11:02AM
Fits my findings. Same behavior. Only difference:
Quote
pengu
now booting debian ...
still 10bseT-HD ..
while the driver is loaded this changes to 1000 baseT-FD
that's not happening here - link stays at 10HDX. Argh!
Re: Debian on NSA310S?
July 17, 2015 11:06AM
I know, the same is happening to JohnnyUSA, I have no idea atm
Is it driver related? we use the same driver/kernel
Is it router/switch related? possible
The DIR-825 rev C1 uses an Atheros AR8216/AR8236/AR8316 switch



Edited 3 time(s). Last edit at 07/17/2015 11:15AM by pengu.
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: