[fedora-arm] Banana Pi R1 on fedora 21 - all working

mo.ucina mo.ucina at gmail.com
Thu Jan 15 06:06:42 UTC 2015


Hello Guys,

Just to give you a bit of an update on my BananaPi R1 project . All is 
working well as far as the config is concerned, now it is time for it to 
be put into service .
To get it up to this far , included the following :

- Compiling kernel with OpenWrt source for b53 switch
- Compiling 'swconfig' user-space program to control the switch
- Configuring the WAN and LAN ports

  Here is my kernel :
root at BPi-R1 ~ # rpm -qa kernel
kernel-3.17.4-301.fc21.armv7hl
kernel-3.18.1-2.BPiR1.fc21.armv7hl
root at BPi-R1 ~ # uname -a
Linux BPi-R1.homenet 3.18.1-2.BPiR1.fc21.armv7hl #1 SMP Sun Jan 11 
14:12:35 AEDT 2015 armv7l armv7l armv7l GNU/Linux

Since I was going to compile one , I thought might as well go with 3.18 
. Here is the ifconfig and eth part of the dmesg :

root at BPi-R1 ~ # dmesg | egrep -i '(eth|b53)'
[    8.866285] stmmaceth 1c50000.ethernet: no reset control found
[    9.074829] eth0: PHY ID 03625f24 at 0 IRQ POLL (stmmac-0:00) active
[    9.081271] eth0: PHY ID 03625f24 at 1 IRQ POLL (stmmac-0:01)
[    9.087133] eth0: PHY ID 03625f24 at 2 IRQ POLL (stmmac-0:02)
[    9.087139] eth0: PHY ID 03625f24 at 3 IRQ POLL (stmmac-0:03)
[    9.087144] eth0: PHY ID 03625f24 at 4 IRQ POLL (stmmac-0:04)
[    9.087150] eth0: PHY ID 03625f24 at 30 IRQ POLL (stmmac-0:1e)
[   10.625698] b53_common: found switch: BCM53125, rev 4
[   12.641193] stmmaceth 1c50000.ethernet eth0: Link is Up - 1Gbps/Full 
- flow control off
root at BPi-R1 ~ # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         inet 192.168.1.183  netmask 255.255.255.0  broadcast 192.168.1.255
         inet6 fdc1:4e49:af09:1:58:2ff:fe42:9171  prefixlen 64 scopeid 
0x0<global>
         inet6 fe80::58:2ff:fe42:9171  prefixlen 64  scopeid 0x20<link>
         ether 02:58:02:42:91:71  txqueuelen 1000  (Ethernet)
         RX packets 25599  bytes 10514233 (10.0 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 16164  bytes 2439789 (2.3 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
         device interrupt 117

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
         inet 127.0.0.1  netmask 255.0.0.0
         inet6 ::1  prefixlen 128  scopeid 0x10<host>
         loop  txqueuelen 0  (Local Loopback)
         RX packets 16  bytes 1504 (1.4 KiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 16  bytes 1504 (1.4 KiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
root at BPi-R1 ~ # nmcli con show
NAME                UUID TYPE            DEVICE
Wired connection 1  d3e3650b-d7f1-4ddc-ae26-4ee611b38d1c 802-3-ethernet  
eth0

Here is what the switch looks like , it is an 8 port switch , with port 
8 connecting to the NIC , while ports 4,0,1,2 go to the LAN connectors 
and port 3 goes to the WAN . Other ports 5,6,7 are internally 
disconnected like this :

---------------------------
| P2 | P1 | P0 | P4 || P3 |
---------------------------

Here is the switch printout :

root at BPi-R1 ~ # /usr/sbin/swconfig dev eth0 show
Global attributes:
     enable_vlan: 0
     ports: 0x011f
     reset_mib: ???
     enable_jumbo: 0
     allow_vid_4095: 0
Port 0:
     mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

     pvid: 0
     link: port:0 link:down
Port 1:
     mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

     pvid: 0
     link: port:1 link:down
Port 2:
     mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

     pvid: 0
     link: port:2 link:down
Port 3:
     mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

     pvid: 0
     link: port:3 link:down
Port 4:
     mib: TxOctets            : 2529757
TxDropPkts          : 0
TxBroadcastPkts     : 2
TxMulticastPkts     : 23
TxUnicastPkts       : 16293
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 10727023
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 1244
Pkts65to127Octets   : 16111
Pkts128to255Octets  : 3529
Pkts256to511Octets  : 88
Pkts512to1023Octets : 16
Pkts1024to1522Octets: 5630
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 10727023
RxDropPkts          : 0
RxUnicastPkts       : 21861
RxMulticastPkts     : 3606
RxBroadcastPkts     : 1151
RxSAChanges         : 3683
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 331

     pvid: 0
     link: port:4 link:up speed:1000baseT full-duplex auto
Port 5:
     mib: ???
     pvid: 0
     link: port:5 link:down
Port 6:
     mib: ???
     pvid: 0
     link: port:6 link:down
Port 7:
     mib: ???
     pvid: 0
     link: port:7 link:down
Port 8:
     mib: TxOctets            : 10705979
TxDropPkts          : 0
TxBroadcastPkts     : 1151
TxMulticastPkts     : 3275
TxUnicastPkts       : 21863
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 2533427
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 196
Pkts65to127Octets   : 9639
Pkts128to255Octets  : 4816
Pkts256to511Octets  : 1447
Pkts512to1023Octets : 125
Pkts1024to1522Octets: 105
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 6
RxGoodOctets        : 2531869
RxDropPkts          : 0
RxUnicastPkts       : 16297
RxMulticastPkts     : 23
RxBroadcastPkts     : 2
RxSAChanges         : 1
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

     pvid: 0
     link: port:8 link:up speed:1000baseT full-duplex

The switch has a VLAN capability and that is what I have used in my 
config to create an incoming connection which connects to my ADSL modem 
and an outgoing connection that connects to the home LAN . Here are some 
switch commands:

root at BPi-R1 ~ # /usr/sbin/swconfig dev eth0 help
switch0: eth0(BCM53125), ports: 9 (cpu @ 8), vlans: 4096
      --switch
     Attribute 1 (int): enable_vlan (Enable VLAN mode)
     Attribute 2 (string): ports (Available Ports (as bitmask))
     Attribute 3 (int): reset_mib (Reset MIB counters)
     Attribute 4 (int): enable_jumbo (Enable Jumbo Frames)
     Attribute 5 (int): allow_vid_4095 (Allow VID 4095)
     Attribute 6 (none): apply (Activate changes in the hardware)
     Attribute 7 (none): reset (Reset the switch)
      --vlan
     Attribute 1 (ports): ports (VLAN port mapping)
      --port
     Attribute 1 (string): mib (Get port's MIB counters)
     Attribute 2 (int): pvid (Primary VLAN ID)
     Attribute 3 (string): link (Get port link information)

In my case I have two Vlans running from eth0 , the switch has Vlan 
tagging enabled on ingress into port 8 . Each vlan is then routed to the 
appropriate port , afterwards the vlan tag is removed on egress . So I 
have one eth0.vlan  appearing from port 3 and a different one from port 4 .


Best Regards
Milorad





More information about the arm mailing list