Jump to content
  • 0

SFP Modul on clearfog pro - how to configure?


oli
 Share

Question

Hi, i just installed a SFP Modul on my clearfog pro with armbian but i am not sure if this is the correct device. Is there some way to get more information out of it?

root@armada:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:43:25:fb:84  
          inet addr:192.168.2.124  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::250:43ff:fe25:fb84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:115 errors:0 dropped:0 overruns:0 frame:0
          TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:12347 (12.0 KiB)  TX bytes:12297 (12.0 KiB)
          Interrupt:38 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

root@armada:~# ifconfig eth2 up
root@armada:~# ethtool eth2
Settings for eth2:
	Supported ports: [ TP MII ]
	Supported link modes:   1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  1000baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: No
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 1
	Transceiver: external
	Auto-negotiation: on
	Link detected: yes
root@armada:~# ifconfig eth1 up
root@armada:~# ethtool eth1
Settings for eth1:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Speed: 10Mb/s
	Duplex: Half
	Port: MII
	PHYAD: 0
	Transceiver: external
	Auto-negotiation: on
	Link detected: no

I guess eth1 is the switch? eth0 is working as WAN interface, so i guess it should be eth2 - correct?

any help would be appreciated! 

 

 

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0
root@armada:~# ifconfig lan1 up
root@armada:~# mii-tool lan1
lan1: no link
root@armada:~# ifconfig lan2 up
root@armada:~# ifconfig lan3 up
root@armada:~# ifconfig lan4 up
root@armada:~# ifconfig lan5 up
root@armada:~# ifconfig lan6 up
root@armada:~# ifconfig lan7 up
lan7: ERROR while getting interface flags: No such device
root@armada:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:43:25:fb:84  
          inet addr:192.168.2.124  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::250:43ff:fe25:fb84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1193 errors:0 dropped:0 overruns:0 frame:0
          TX packets:823 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:100648 (98.2 KiB)  TX bytes:138101 (134.8 KiB)
          Interrupt:38 

eth1      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:0 (0.0   TX bytes:0 (0.0 
          Interrupt:39 

eth2      Link encap:Ethernet  HWaddr 00:50:43:0d:19:18  
          inet6 addr: fe80::250:43ff:fe0d:1918/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:0 (0.0   TX bytes:648 (648.0 
          Interrupt:40 

lan1      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

lan2      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

lan3      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

lan4      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

lan5      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          inet6 addr: fe80::250:43ff:fe84:252f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:508 (508.0 

lan6      Link encap:Ethernet  HWaddr 00:50:43:84:25:2f  
          inet6 addr: fe80::250:43ff:fe84:252f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0   TX bytes:508 (508.0 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0   TX bytes:0 (0.0 

root@armada:~# mii-tool lan1
lan1: no link
root@armada:~# mii-tool lan2
lan2: no link
root@armada:~# mii-tool lan3
lan3: no link
root@armada:~# mii-tool lan4
lan4: no link
root@armada:~# mii-tool lan5
lan5: negotiated 1000baseT-FD flow-control, link ok
root@armada:~# mii-tool lan6
lan6: 1000 Mbit, full duplex, link ok
root@armada:~# ethtool lan5
Settings for lan5:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Full 
	Link partner advertised pause frame use: Symmetric Receive-only
	Link partner advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 4
	Transceiver: external
	Auto-negotiation: on
	Supports Wake-on: d
	Wake-on: d
	Link detected: yes
root@armada:~# ethtool lan6
Settings for lan6:
	Supported ports: [ TP AUI BNC MII FIBRE ]
	Supported link modes:   1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  1000baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: No
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 2
	Transceiver: external
	Auto-negotiation: on
	Supports Wake-on: d
	Wake-on: d
	Link detected: yes
root@armada:~# ethtool -i lan6
driver: dsa
version: 0.1
firmware-version: N/A
bus-info: platform
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
root@armada:~# ethtool -i lan5
driver: dsa
version: 0.1
firmware-version: N/A
bus-info: platform
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

i really dont understand it now... i plugged in a network cable into the first port of the board, but seems like this is lan5 or lan6, not as expected lan1.

and i noticed the FIBRE in lan6 - could this be the sfp port??

Link to comment
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

  • 0

I was told that it works but don't have any equipment to try and confirm. I got a Cisco SPF module in my Clearfog but nothing to plug into in  :huh: except my internet connection, but can't really afford doing that.

Link to comment
Share on other sites

  • 0

i just booted the testing image from solid run and noticed this in the boot/kern log:

[    3.657175] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.665599] armada38x-rtc f10a3800.rtc: setting system clock to 2106-02-07 01:55:03 UTC (4294950903)
[    3.682885] ALSA device list:
[    3.685906]   No soundcards found.
[    3.714476] sfp sfp: module OEM              GLC-BX-U-C       rev 1.0  sn 1152216730       dc 02-06-15
[    3.723813] sfp sfp:   LC connector, encoding 8b10b, nominal bitrate 1.3Gbps +0% -0%
[    3.731605] sfp sfp:   1000BaseSX- 1000BaseLX- 1000BaseCX- 1000BaseT- 100BaseTLX- 1000BaseFX- BaseBX10- BasePX-
[    3.741734] sfp sfp:   Wavelength 1310nm, fiber lengths:
[    3.747071] sfp sfp:     9µm SM    : 10000m
[    3.751351] sfp sfp:  62.5µm MM OM1: unsupported/unspecified
[    3.757121] sfp sfp:    50µm MM OM2: unsupported/unspecified
[    3.762880] sfp sfp:    50µm MM OM3: unsupported/unspecified
[    3.768649] sfp sfp:    50µm MM OM4: unsupported/unspecified
[    3.774419] sfp sfp:   Options: txdisable, txfault, los+
[    3.779745] sfp sfp:   Diagnostics: ddm, intcal, rxpwravg
[    3.785188] mvneta f1034000.ethernet eth2: switching to link AN mode 802.3z
[    4.337845] EXT4-fs (mmcblk0p1): warning: mounting fs with errors, running e2fsck is recommended

such information was not in the armbian image (no matter if self compiled with standard kernel config or using the downloadable jessie next image)

so i guess there is something wrong with it in the next image of armbian?

Link to comment
Share on other sites

  • 0

Yes it is 4.4 from the official solidrun image. The 3.x kernel does not have this - which is default in that image. When i set zImage to the 4.4 kernel from the solid run repo, it boots and i see the SFP infos, but it stops booting and somehow hangs ...

[    3.416633] pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.425047] PCI: bus1: Fast back to back transfers enabled
[    3.464585] PCI: bus2: Fast back to back transfers enabled
[    3.470116] pci 0000:02:00.0: of_irq_parse_pci() failed with rc=134
[    3.476441] pci 0000:00:03.0: BAR 8: assigned [mem 0xf8000000-0xf82fffff]
[    3.483249] pci 0000:00:02.0: PCI bridge to [bus 01]
[    3.488257] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8000000-0xf81fffff 64bit]
[    3.495602] pci 0000:02:00.0: BAR 0: error updating (0xf8000004 != 0xffffffff)
[    3.502845] pci 0000:02:00.0: BAR 0: error updating (high 0x000000 != 0xffffffff)
[    3.510360] pci 0000:02:00.0: BAR 6: assigned [mem 0xf8200000-0xf820ffff pref]
[    3.517612] pci 0000:00:03.0: PCI bridge to [bus 02]
[    3.522594] pci 0000:00:03.0:   bridge window [mem 0xf8000000-0xf82fffff]
[    3.529906] pcieport 0000:00:03.0: enabling device (0140 -> 0142)
[    3.536803] libphy: SFP I2C Bus: probed
[    3.547375] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.555845] armada38x-rtc f10a3800.rtc: setting system clock to 2106-02-07 01:55:03 UTC (4294950903)
[    3.573022] ALSA device list:
[    3.576044]   No soundcards found.
[    3.604735] sfp sfp: module OEM              GLC-BX-U-C       rev 1.0  sn 1152216730       dc 02-06-15
[    3.614093] sfp sfp:   LC connector, encoding 8b10b, nominal bitrate 1.3Gbps +0% -0%
[    3.621884] sfp sfp:   1000BaseSX- 1000BaseLX- 1000BaseCX- 1000BaseT- 100BaseTLX- 1000BaseFX- BaseBX10- BasePX-
[    3.623603] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    3.623727] VFS: Mounted root (ext4 filesystem) on device 179:1.
[    3.635135] devtmpfs: mounted
[    3.649126] Unable to open file: /etc/keys/x509_ima.der (-2)
[    3.649126] sfp sfp:   Wavelength 1310nm, fiber lengths:
[    3.660129] sfp sfp:     9µm SM    : 10000m
[    3.664410] sfp sfp:  62.5µm MM OM1: unsupported/unspecified
[    3.670177] sfp sfp:    50µm MM OM2: unsupported/unspecified
[    3.675945] sfp sfp:    50µm MM OM3: unsupported/unspecified
[    3.681704] sfp sfp:    50µm MM OM4: unsupported/unspecified
[    3.687473] sfp sfp:   Options: txdisable, txfault, los+
[    3.692800] sfp sfp:   Diagnostics: ddm, intcal, rxpwravg
[    3.700060] Freeing unused kernel memory: 2048K (c0c00000 - c0e00000)
[    4.007713] random: systemd urandom read with 10 bits of entropy available

Welcome to Debian GNU/Linux 8 (jessie)!

[    4.299915] NET: Registered protocol family 10
[   40.495696] random: nonblocking pool is initialized
[   94.950481] systemd[1]: Job dev-ttyS0.device/start timed out.
[ TIME ] Timed out waiting for device dev-ttyS0.device.
[   94.984727] systemd[1]: Timed out waiting for device dev-ttyS0.device.
[DEPEND] Dependency failed for Serial Getty on ttyS0.
[   95.014701] systemd[1]: Dependency failed for Serial Getty on ttyS0.


i can not log in, so its useless atm :(

 

https://wiki.openwrt.org/toh/solidrun/clearfog

https://images.solid-build.xyz/A38X/

https://repo.solid-build.xyz/

 

regards and thanks for taking a look at this 

Link to comment
Share on other sites

  • 0

That kernel is testing, I haven't got a chance to boot it yet and I'll wait until sources become available.

I used to see SFP module in our 4.x kernel (mainline plus a pack of patches) but I would need to check if it still is detected. Regression is possible. In any case those modern kernels are (AFAIK) not ready yet.

Link to comment
Share on other sites

  • 0

I just flashed the downloadable jessie next image 

md5sum /home/oli/Downloads/Armbian_5.14_Armada_Debian_jessie_4.6.2.raw 
13ae49d54bb5b14d5a48978ad84d213d  /home/oli/Downloads/Armbian_5.14_Armada_Debian_jessie_4.6.2.raw
 
There is really no SFP information. Not in dmesg, nor in any log in /var/log 
could it be that this patch got lost or so...?
 
edit:
made an update with apt-get update && apt-get dist-upgrade && reboot 
 
root@armada:/var/log# grep -ri sfp .
root@armada:/var/log# uname -a
Linux armada 4.6.3-marvell #6 SMP Tue Jul 5 16:19:08 CEST 2016 armv7l GNU/Linux
root@armada:/var/log# 
 
Link to comment
Share on other sites

  • 0

i just flashed the image from solidrun after some support from malte. he helped me to fix the systemd time error (press a key while bootloader loads, then type: date reset; hit 2 times enter) which prevented me from logging in.

now i can login and use the sfp modul and it works... lets hope they will release that soon so you can migrate the changes to armbian.

i have no eth3 which is marked with FIBRE, this was always something else (TP or so...)

Link to comment
Share on other sites

  • 0

oh nice, thanks, i will move that tomorrow into the kernel sources and see what happens when i compile the kernel.. if it generates the .dtb :)

i am pretty new to all this but i thought the compiled .dtb works only with the kernel for whose it was compiled for, doesnt it?

Link to comment
Share on other sites

  • 0

oh nice, thanks, i will move that tomorrow into the kernel sources and see what happens when i compile the kernel.. if it generates the .dtb :)

This is present in kernel sources that you linked here (well, in git submodule), so if you already compiled the kernel with right options, you may find compiled .dtb file in arch/arm/boot/dts

 

i thought the compiled .dtb works only with the kernel for whose it was compiled for, doesnt it?

Not exactly - kernel won't like unknown or incorrect peroperties in DT, but there are no "binary compatibility" concerns, you can compile .dtb standalone as long as kernel is happy with DT contents.

Link to comment
Share on other sites

  • 0

thats really wierdo now, i dont have that file in my local git repo

git status shows: HEAD detached at origin/4.4.y-clearfog

so that should be ok, but after git pull --rebase i dont have any clearfog*.dts in that folder

Link to comment
Share on other sites

  • 0

got the wrong sources... https://github.com/mxOBS/deb-pkg_kernel-xyz/tree/4.4.y-clearfogi used them, will move the linux folder now to linux_old, checkout the one you posted and rebuild the packages and see what happens :)

 

edit: hm no, the repo points as submodule to the one you posted, i really dont get it... i will download the zip, something wierd going on

 

edit 2: got it working, .dtb was created and boots... no idea why it wasnt there before

Link to comment
Share on other sites

  • 0

I added this new kernel, you can found it under DEV branch, so it's possible to build simply with our tools.

 

It boots. SFP is detected, but have no idea if it works. Further - none of my mPCI or mSATA devices were working properly with this kernel ... Since I already wasted two afternoons, I gave up. I also tried to bring SFP to mainline kernel, v4.4 -> 4.7, where everything else works fine now, but no go :(

Link to comment
Share on other sites

  • 0

Did you modify uboot? It is documented in the solid-run wiki what needs to be changed (its an #if 0 in 2 places which must be changed to #if 1) to detect a mSATA.

But mPCIE should work - at least my ath10k card worked.

 

Link to comment
Share on other sites

  • 0

I haven't touched u-boot. Default configuration has enabled almost everything and I already found and fix some problematic stuff, but can't spent a week strait on Clearfog :(

 

Those Pci cards works fine in both our kernel, actually those works everywhere. One is Intel 7260 and the other Atheros 9382 or something (ath9k driver). Firmware is present ...

 

It's WIP and it remain WIP ;)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...