Re: Debian on NSA310S?
July 30, 2015 05:47PM
pengu Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> ...
> >I've started to work on u-boot and think
> > it will be a little slower to bring up because
> > nobody has brought this SoC up in mainline
> u-boot.
>
> The Medion Life P89634 MD 90221 has the same
> board / SoC

Yeah, but no mainline u-boot.

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

> nsa310s_phy_fixup(struct phy_device *phydev)
> +{
> +       int err;
> +       int temp;
> +       /* go to page 3 */
> +       err = phy_write(phydev, 22, 3);
> +       if (err < 0)
> +           return err;
> +       /* read page 3, register 17 */
> +       temp = phy_read(phydev, 17);
> +       /* clear bit 4, set bit 5 */
> +       temp &= ~(1<<4);
> +       temp |= (1<<5);
> +       /* write page 3, register 17 */
> +       err = phy_write(phydev, 17, temp);
> +       if (err < 0)
> +           return err;
> +       /* go to page 0 */
> +       err = phy_write(phydev, 22, 0);
> +       if (err < 0)
> +           return err;
> +
> +       return 0;
> +}

I've tried this in drivers/net/ethernet/marvell/mv643xx_eth.c phy_init(). Not successful! I think the PHY does not have an ID at this point, so phy_init was not called to do the initialization.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
August 01, 2015 08:47PM
The good news :)

I've switched gear and worked on the NSA325 u-boot today. It now brings the link up right away when u-boot starts. So we know what to do for the NSA3xx series.

Now back to the NSA3x0S u-boot!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
August 02, 2015 02:09AM
Great news!
osa
Re: Debian on NSA310S?
August 05, 2015 06:33AM
Guys, i think i have working patch for 4.1. I'll post it here for testing
[   22.152970] NET: Registered protocol family 10
[   22.414745] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:50:43:00:02:02
Sending on   LPF/eth0/00:50:43:00:02:02
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
[   24.914081] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   24.923932] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.189 -- renewal in 20546 seconds.

here's the patch
--- linux-4.1.3a/drivers/net/ethernet/marvell/mv643xx_eth.c     2015-07-21 19:10:33.000000000 +0200
+++ linux-4.1.3b/drivers/net/ethernet/marvell/mv643xx_eth.c     2015-08-05 16:24:15.000000000 +0200
@@ -2313,6 +2313,16 @@
        }

        /*
+       # The MCU set the phy to 10-Mb mode as low-power status.
+       # We have to set it back when booting up.
+       # "Set the phy back to auto-negotiation mode"
+       */
+
+       phy_write(mp->phy, 0x4, 0x1e1);
+       phy_write(mp->phy, 0x9, 0x300);
+       phy_write(mp->phy, 0x0, 0x9140);
+
+       /*
         * Configure basic link parameters.
         */
        pscr = rdlp(mp, PORT_SERIAL_CONTROL);
@@ -3099,6 +3109,10 @@
                mp->phy = of_phy_connect(mp->dev, pd->phy_node,
                                         mv643xx_eth_adjust_link, 0,
                                         PHY_INTERFACE_MODE_GMII);
+               /*Link down fix*/
+               phy_write(mp->phy, 22, 0x3);
+               phy_write(mp->phy, 22, 0x0);
+
                if (!mp->phy)
                        err = -ENODEV;
                else
I don't know if it breaks something on other platforms but auto-negotiation part can be pushed to userland like zyxel did
Edit: works for my nsa310s



Edited 1 time(s). Last edit at 08/05/2015 10:05AM by osa.
Re: Debian on NSA310S?
August 05, 2015 11:31AM
osa,
care to share the exact steps you did to apply the patch pls? i'm kinda noob at this.
osa
Re: Debian on NSA310S?
August 05, 2015 12:18PM
I think Bohdi should write tutorial or something
There's my way:
- set up dev enviroment or cross compilation
- download kernel from kernel.org (ie 4.1.3)
- extract kernel
- apply bohdi's patch
- apply my patch
- compile using make-kpkg and fakeroot
so i finally get linux-image-4.1.3-tld-1_1.0_armel.deb

You can try my build https://www.dropbox.com/s/n6n6b0tgwfei4yv/linux-image-4.1.3-tld-1_1.0_armel.deb?dl=0
Re: Debian on NSA310S?
August 05, 2015 01:01PM
Thanks osa, gonna try your build ;)
Re: Debian on NSA310S?
August 05, 2015 02:25PM
Thanks osa!

The patch looks like it will work. I'll rebuild with it and let you know. BTW, this should be a temporary patch. I think eventually we should find a good place for this code in the PHY subsystem (linux-4.1/drivers/net/phy), if it's possible to do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: Debian on NSA310S?
August 05, 2015 02:36PM
@Bohdi: do you have source code for 310s/320/320s/325/325v2 ? I think they all have fancy phy_init like this
#if defined(CONFIG_ZYXEL_NSA325)
        /* Set LED[2] pin is tristate; for communicating with MCU */
        mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),22,0x3);
        mvEthPhyRegRead(mvBoardPhyAddrGet(ethPortNum),17,&reg);
        reg &= ~(1 << 4);
        reg |= (1 << 5);
        mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),17,reg);
        mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),22,0x0);
#endif
and general patch should detect model ( or maybe this init is general for all zyxel's boxes)?
Also port_init part can be common for zyxel's
Do other supported boxes use the same network chip? This patch can affect them
Re: Debian on NSA310S?
August 05, 2015 02:57PM
osa,

> and general patch should detect model ( or maybe
> this init is general for all zyxel's boxes)?

> Also port_init part can be common for zyxel's
> Do other supported boxes use the same network
> chip? This patch can affect them

Yes, it will affect them, so we have to do the "#ifdef CONFIG_NSA3xx" to wrap the code.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
August 06, 2015 12:32AM
Good work osa :)

I was able to bring the link up fine in the new kernel after a shutdown. I'm going to add either kernel config options (or device tree node parsing) to execute this PHY fixup only in Zyxel boxes with this Ethernet 88E1318/S chip, and then release new kernel version tld-2.

Would you like to look into moving it to the PHY subsystem? pls let me know either way!

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



Edited 1 time(s). Last edit at 08/06/2015 12:34AM by bodhi.
Re: Debian on NSA310S?
August 07, 2015 06:08PM
@osa,


> regs.hour = bin2bcd(tm->tm_hour) | HT1328_24H_BIT;

> in ht1382_rtc_set_time
> not regs.hour = bin2bcd(tm->tm_hour);

HT1328_24H_BIT constant is not in the kernel code. Did you define it somewhere?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: Debian on NSA310S?
August 07, 2015 06:49PM
Sorry
It should be
regs.hour = bin2bcd(tm->tm_hour) | HT1382_HOUR_1224;

I copied it from my patch. I called it HT1328_24H_BIT because this bit sets 24h mode but HT1382_HOUR_1224 is commented clearly. Also, please test on your box ( it will always use 24h mode for simplicity and compatibility with zyxel's driver)
Re: Debian on NSA310S?
August 13, 2015 04:44PM
An interesting issue: the NSA30S apparently uses the same mechanism for fan and temperature as the NSA325. So we can't control the fan speed. The system stat:

echo "CPU Temperature" $(($(/usr/sbin/i2cget -y 0x0 0x0a 0x07))) "C"
echo "Fanspeed" $[60000/$(($(/usr/sbin/i2cget -y 0x0 0x0a 0x08)))] "RPM"
shows system stats without any HDD installed:

Quote

CPU Temperature 38 C
Fanspeed 2608 RPM

This box small fan is spinning at a pretty high RPM, so not as quiet as it should be when there is no 3.5" HDD inside. I'm going to run this box with a 2.5" HDD, so as a last resort, I'm tempting to drill several holes in the back plate and disable the fan altogether :) Of course, also run a cron job to monitor the temperature so it could be shutdown if it gets too hot inside.

Anybody has any thought on how the fan can be modded?

Update:

bobafetthotmail:
http://forum.doozan.com/read.php?2,16532,22581#msg-22581
And pbg4:
http://forum.doozan.com/read.php?2,16532,22608#msg-22608

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



Edited 3 time(s). Last edit at 08/13/2015 08:22PM by bodhi.
Re: Debian on NSA310S?
August 16, 2015 07:13PM
Good news!

 ./kwboot-tool/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.07-tld-4.nsa310s.uart.kwb 
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  2 % [......................................................................]
  4 % [......................................................................]
  6 % [......................................................................]

 94 % [......................................................................]
 96 % [......................................................................]
 98 % [......................................]
[Type Ctrl-\ + c to quit]


U-Boot 2014.07-tld-4 (Aug 16 2015 - 16:48:38)
ZyXEL NSA310S 1-Bay Power Media Server

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

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
main_loop
Hit any key to stop autoboot:  0

NSA310S> bdinfo 
arch_number = 0x00001343
boot_params = 0x00000100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x10000000
DRAM bank   = 0x00000001
-> start    = 0x00000000
-> size     = 0x00000000
eth0name    = egiga0
ethaddr     = xx:xx:xx:xx:xx:xx
current eth = egiga0
ip_addr     = 192.168.0.248
baudrate    = 115200 bps
TLB addr    = 0x0FFF0000
relocaddr   = 0x0FF3D000
reloc off   = 0x0F93D000
irq_sp      = 0x0FB1CF3C
sp start    = 0x0FB1CF30

NSA310S> boot
(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

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	30749696  	29f76b6e-01	83 Boot
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
(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
3123877 bytes read in 377 ms (7.9 MiB/s)
7427303 bytes read in 552 ms (12.8 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.1.0-kirkwood-tld-2
   Created:      2015-08-09   4:08:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3123813 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-2
   Created:      2015-08-09   4:06:53 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7427239 Bytes = 7.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x118f from environment

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-2 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Aug 8 14:44:53 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 NSA310S

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



Edited 1 time(s). Last edit at 08/16/2015 07:17PM by bodhi.
Re: Debian on NSA310S?
August 17, 2015 02:45AM
Please see this post for new u-boot:
http://forum.doozan.com/read.php?3,12381,23331,page=27#msg-23331

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
August 19, 2015 10:11AM
Just came back home after aprox. 2 weeks of absence, installed the new kernel and phy working fine without old workarounds. Fantastic job guys!

I'll keep investigating and see if any more problems surface.

Cheers!!

LE: Everything is working as expected except the fact that box doesnt resume after power loss, i need to power it manually. Any hints on how to debug/fix this?



Edited 1 time(s). Last edit at 08/19/2015 03:37PM by JohnnyUSA.
Re: Debian on NSA310S?
August 19, 2015 04:16PM
Johnny,

> LE: Everything is working as expected except the
> fact that box doesnt resume after power
> loss
, i need to power it manually. Any hints
> on how to debug/fix this?

This box (neither do other Zyxel NSA3xx boxes) does not resume automatically from power loss, you have to push the Power button, or send a WOL.

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



Edited 1 time(s). Last edit at 08/19/2015 04:17PM by bodhi.
Re: Debian on NSA310S?
August 19, 2015 04:22PM
@bodhi,

with stock OS it does. Can you check please since you have the box also? I'm unable to test atm, but i remember it did with stock. I've removed the power cable and plugged back in and the box auto started.

Also, this is something to worry about? Or i better ignore it?:

[   63.374474] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   63.408626] mv643xx_eth_port mv643xx_eth_port.0 eth0: The PHY does not support set_wol, was CONFIG_MARVELL_PHY enabled?

.. from DMESG.

output of my /etc/network/interfaces:
auto lo eth0
iface lo inet loopback

iface eth0 inet static
        address 192.168.1.173
        netmask 255.255.255.0
        gateway 192.168.1.1
        hwaddress ether 5c:f4:ab:df:07:2b
        post-up /sbin/ethtool -s $IFACE wol g
        post-down /sbin/ethtool -s $IFACE wol g



Edited 5 time(s). Last edit at 08/19/2015 04:27PM by JohnnyUSA.
Re: Debian on NSA310S?
August 19, 2015 04:35PM
@Johnny,

> with stock OS it does.

Really? I did not recall this. And I don't think the NSA325v2 either. But I will boot stock OS and check.

> eth0: The PHY does not support set_wol, was
> CONFIG_MARVELL_PHY enabled?

This is wrong. This should not happen.

> hwaddress ether 5c:f4:ab:df:07:2b
> post-up /sbin/ethtool -s $IFACE wol g
> post-down /sbin/ethtool -s $IFACE wol g

You don't need the above.
- ethaddr env already defined the MAC address
- the default for this NIC in this kernel should be WOL enable already.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
August 19, 2015 04:45PM
@bodhi,

did a restart after i've removed the lines you said i don't need so now, my /etc/network/interfaces looks like this:
auto lo eth0
iface lo inet loopback

iface eth0 inet static
        address 192.168.1.173
        netmask 255.255.255.0
        gateway 192.168.1.1

Also, here is the DMESG after reboot:
[    2.068207] libphy: orion_mdio_bus: probed
[    2.078641] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.086112] mv643xx_eth: Set the PHY to fix link down
[    2.091767] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address                                                                                                                                5c:f4:ab:df:07:2b
[    2.101009] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.107626] ehci-pci: EHCI PCI platform driver
[    2.112141] ehci-orion: EHCI orion driver
[    2.116380] orion-ehci f1050000.ehci: EHCI Host Controller
[    2.121867] orion-ehci f1050000.ehci: new USB bus registered, assigned bus nu                                                                                                                               mber 1
[    2.129716] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    2.153651] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    2.159877] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.166671] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                                                                               1
[    2.173884] usb usb1: Product: EHCI Host Controller
[    2.178746] usb usb1: Manufacturer: Linux 4.1.0-kirkwood-tld-2 ehci_hcd
[    2.185348] usb usb1: SerialNumber: f1050000.ehci
[    2.190857] hub 1-0:1.0: USB hub found
[    2.194676] hub 1-0:1.0: 1 port detected
[    2.199608] mousedev: PS/2 mouse device common for all mice
[    2.205648] i2c /dev entries driver
[    2.211768] ht1382 0-0068: rtc core: registered ht1382 as rtc0
[    2.220219] hidraw: raw HID events driver (C) Jiri Kosina
[    2.226022] drop_monitor: Initializing network drop monitor service
[    2.232540] NET: Registered protocol family 17
[    2.237143] Key type dns_resolver registered
[    2.242311] Loading compiled-in X.509 certificates
[    2.247147] registered taskstats version 1
[    2.270605] Key type encrypted registered
[    2.276382] ht1382 0-0068: setting system clock to 2015-08-19 13:39:51 UTC (1                                                                                                                               439991591)
[    2.285779] PM: Hibernation image not present or could not be loaded.
[    2.286899] Freeing unused kernel memory: 288K (c07c2000 - c080a000)
[    2.367271] systemd-udevd[73]: starting version 215
[    2.384663] random: systemd-udevd urandom read with 4 bits of entropy availab                                                                                                                               le
[    2.513751] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.561853] SCSI subsystem initialized
[    2.639733] libata version 3.00 loaded.
[    2.641942] sata_mv f1080000.sata: version 1.28
[    2.642256] sata_mv f1080000.sata: slots 32 ports 2
[    2.675615] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.682317] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.701117] usb 1-1: Product: USB2.0 Hub
[    2.705176] scsi host0: sata_mv
[    2.711779] hub 1-1:1.0: USB hub found
[    2.719494] hub 1-1:1.0: 4 ports detected
[    2.728892] scsi host1: sata_mv
[    2.744579] ata1: SATA max UDMA/133 irq 32
[    2.748667] ata2: SATA max UDMA/133 irq 32
[    3.003978] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[    3.114600] usb 1-1.3: New USB device found, idVendor=0781, idProduct=5571
[    3.121462] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber                                                                                                                               =3
[    3.128778] usb 1-1.3: Product: Cruzer Fit
[    3.132861] usb 1-1.3: Manufacturer: SanDisk
[    3.137133] usb 1-1.3: SerialNumber: 4C530005850112109093
[    3.153299] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    3.159980] scsi host2: usb-storage 1-1.3:1.0
[    3.166215] usbcore: registered new interface driver usb-storage
[    3.175491] usbcore: registered new interface driver uas
[    3.253669] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.293694] ata1.00: ATA-9: WDC WD10EFRX-68FYTN0, 82.00A82, max UDMA/133
[    3.300375] ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.343705] ata1.00: configured for UDMA/133
[    3.363993] scsi 0:0:0:0: Direct-Access     ATA      WDC WD10EFRX-68F 0A82 PQ                                                                                                                               : 0 ANSI: 5
[    3.723661] ata2: SATA link down (SStatus 0 SControl F300)
[    3.758589] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/93                                                                                                                               1 GiB)
[    3.767305] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    3.772823] sd 0:0:0:0: [sda] Write Protect is off
[    3.777760] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.777905] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does                                                                                                                               n't support DPO or FUA
[    3.794475]  sda: sda1 sda2
[    3.799542] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.808596] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.012421] md: bind<sda2>
[    4.026310] md: linear personality registered for level -1
[    4.032603] md0: detected capacity change from 0 to 999674806784
[    4.164960] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.27 PQ                                                                                                                               : 0 ANSI: 6
[    4.179215] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    4.184667] sd 2:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9                                                                                                                                GiB)
[    4.196689] sd 2:0:0:0: [sdb] Write Protect is off
[    4.201495] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
[    4.204010] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doe                                                                                                                               sn't support DPO or FUA
[    4.222499]  sdb: sdb1 sdb2 sdb3
[    4.238026] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   10.196280] device-mapper: uevent: version 1.0.3
[   10.203039] device-mapper: ioctl: 4.31.0-ioctl (2015-3-12) initialised: dm-de                                                                                                                               vel@redhat.com
[   10.244011] PM: Starting manual resume from disk
[   10.248621] PM: Hibernation image partition 8:18 present
[   10.248630] PM: Looking for hibernation image.
[   10.250112] PM: Image not found (code -22)
[   10.250126] PM: Hibernation image not present or could not be loaded.
[   10.461455] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts:                                                                                                                                (null)
[   11.794594] systemd-udevd[297]: starting version 215
[   12.089807] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   12.251159] random: nonblocking pool is initialized
[   12.312323] orion_wdt: Initial timeout 25 sec
[   12.478384] rtc rtc0: __rtc_set_alarm: err=-22
[   14.464569] Adding 524284k swap on /dev/sdb2.  Priority:-1 extents:1 across:5                                                                                                                               24284k FS
[   14.607112] EXT4-fs (sdb3): re-mounted. Opts: (null)
[   14.789070] EXT4-fs (sdb3): re-mounted. Opts: errors=remount-ro
[   55.080573] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (                                                                                                                               null)
[   56.157668] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   56.568905] NET: Registered protocol family 10
[   56.574571] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   57.920640] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full                                                                                                                                duplex, flow control disabled
[   57.930414] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

See the bold part? Something to worry about? Thanks in advance.

LE: Solved this by using DHCP in /etc/network/interfaces instead of fixed IP.



Edited 2 time(s). Last edit at 08/19/2015 04:54PM by JohnnyUSA.
Re: Debian on NSA310S?
August 19, 2015 06:27PM
Johnny,

> [ 12.312323] orion_wdt: Initial timeout 25 sec
> [ 12.478384] rtc rtc0: __rtc_set_alarm:
> err=-22


No idea why! It did not occur on my box. Also your rtc0 device is running OK, according to your dmesg.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: Debian on NSA310S?
August 20, 2015 01:22AM
JohnnyUSA Wrote:
-------------------------------------------------------
[ 12.478384] rtc rtc0: __rtc_set_alarm:
> err=-22
What does hwclock write about stored time? RTC driver was patched and set to 24h mode by defauld
Previously i could get year 1931 set and it caused dhcp problems for me
Maybe it issue is related? Have you ever set alarm with zyxel software? Our driver do not support alarm
Re: Debian on NSA310S?
August 20, 2015 01:27AM
osa Wrote:
-------------------------------------------------------
> JohnnyUSA Wrote:
> --------------------------------------------------
> -----
> [ 12.478384] rtc rtc0: __rtc_set_alarm:
> > err=-22
> What does hwclock write about stored time? RTC
> driver was patched and set to 24h mode by defauld
> Previously i could get year 1931 set and it caused
> dhcp problems for me
> Maybe it issue is related? Have you ever set alarm
> with zyxel software? Our driver do not support
> alarm


You're right, i've had the same issues as you did with year 1931 and dhcp problems before the new TLD-2 kernel. With the new one, everything is working fine.

And no, i've never set alarm with zyxel.

But again, as stated in my previous post, that error went away:
LE: Solved this by using DHCP in /etc/network/interfaces instead of fixed IP.



Edited 1 time(s). Last edit at 08/20/2015 01:28AM by JohnnyUSA.
Re: Debian on NSA310S?
September 04, 2015 11:37AM
got another NSA310s, flashed the new u-boot but I cannot boot debian because bootargs aren't recognized:

[    0.000000] Kernel command line: console=ttyS0,115200

no root and rootfstype were set ;-(

on another box I got this fixed bot not on this one:

my U-Boot env (atm)

NSA3x0S> pri
arcNumber=4931
baudrate=115200
bootcmd=run bootcmd_uenv; run set_bootargs_usb; run usb_init; run usb_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=2
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
load_dtb=fatload usb 0:1 0x1c00000 /dts/kirkwood-nsa310s.dtb
load_initrd=fatload usb 0:1 0x1100000 /uInitrd
load_uimage=fatload usb 0:1 0x800000 /uImage
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x80000@0x0(uboot),0x20000@0xc0000(uboot_env)
partition=nand0,2
rootdelay=4
rootfstype=ext4
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4
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_loaded=0
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=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_init=usb start
usb_root=LABEL=rootfs

Environment size: 1440/131068 bytes
when using $(rootfstype) and $(usb_root) this also doesn't work
Re: Debian on NSA310S?
September 04, 2015 01:53PM
pengu,

- Recreate uImage for booting with separated DTB
- Reboot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
September 04, 2015 02:31PM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> - Recreate uImage for booting with separated DTB
> - Reboot

I'm booting with seperate (nsa310s) DTB.
Re: Debian on NSA310S?
September 04, 2015 03:09PM
pengu Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > pengu,
> >
> > - Recreate uImage for booting with separated
> DTB
> > - Reboot
>
> I'm booting with seperate (nsa310s) DTB.

Go ahead and recreate uImage (emphasis: making sure you're not appending the DTB to it) and boot.

Also pls post the entire serial console log.

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



Edited 2 time(s). Last edit at 09/04/2015 03:18PM by bodhi.
Re: Debian on NSA310S?
September 04, 2015 03:40PM
thanks again bodhi ;-)

when creating the stick, I wanted to keep the old U-Boot but now I decided to use the new one.
as you can see her, this was the cause:
(I found the "zImage.fdt" in the /boot directory ;-))

http://pastebin.com/tP76dgcX <- the "old" bootlog

http://pastebin.com/hcZKi2gk <- the "new" bootlog with recreated uImage and uInitrd


sorry for the old kernel I'll update it now.
http://pastebin.com/G96yGs5x



Edited 2 time(s). Last edit at 09/04/2015 04:30PM 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: