Bananian

Bananian on BPI-Router - Discussion

99 29272
mattrix  
Edited by mattrix at Wed Dec 3, 2014 02:25

WOW!

Made the drives built-in.
Copied over new kernel.

Reboot.

GMAC up 1000 blah
Got IP address and now doing apt-get update and upgrade on BPI router fine

A bit too easy....?

SSH working fine

Makes a bit easier to work on now! YAH

This is my IFCONFIG

  1. eth0   Link encap:Ethernet  HWaddr 02:94:XX:XX:XX:XX
  2.           inet addr:192.168.20.124  Bcast:192.168.20.255  Mask:255.255.255.0
  3.           inet6 addr: fe80::94:XXX:XXX:XXXX/64 Scope:Link
  4.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  5.           RX packets:310 errors:0 dropped:0 overruns:0 frame:0
  6.           TX packets:478 errors:0 dropped:0 overruns:0 carrier:0
  7.           collisions:0 txqueuelen:1000
  8.           RX bytes:40103 (39.1 KiB)  TX bytes:60201 (58.7 KiB)
  9.           Interrupt:117 Base address:0xc000

  10. lo        Link encap:Local Loopback
  11.           inet addr:127.0.0.1  Mask:255.0.0.0
  12.           inet6 addr: ::1/128 Scope:Host
  13.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  14.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  15.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  16.           collisions:0 txqueuelen:0
  17.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  18. tunl0     Link encap:IPIP Tunnel  HWaddr
  19.           NOARP  MTU:1480  Metric:1
  20.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  21.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  22.           collisions:0 txqueuelen:0
  23.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  24. wlan0     Link encap:Ethernet  HWaddr ac:a2:13:54:28:28
  25.           BROADCAST MULTICAST  MTU:1500  Metric:1
  26.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  27.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  28.           collisions:0 txqueuelen:1000
  29.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Copy the Code

mattrix  
If you would like to try

https://github.com/matthuisman/bananian

Latest commit for my changes.
https://github.com/matthuisman/b ... 7517271257ede2fcbc1

Had to add one new GPIO function (devm_gpio_request_one)

Rest is pretty much just the code from the latest OPENWRT branch.

mattrix  
There is also a 2nd commit here:
https://github.com/matthuisman/b ... 5aa45b6db04f592df77

That adds support for AX88179 USB3.0 Ethernet Adapters

mattrix  
Few interesting things I found so far with the Ethernet ports.

All the ports seem to be hooked to eth0.
I can pull it out of a port and move it into another and within 10secs the network is back working.

The green LED on the first "separate" ethernet port is on if not connected.
It turns off when ethernet plugged in.
Then flashes with usage.
Half correct.

The other 4 ports are all off except when in use.
When plugged in, they have solid green light that flashes with traffic.
Again, half correct.

Normal should be Off all the time, flash with traffic.

mattrix  
  1. [   22.015099] GMAC gpio_power_hd:gpio_direction_output
  2. [   22.285857] eth0: device MAC address 02:94:0a:c2:25:b6
  3. [   22.343340] sunxi_gmac: probed
  4. [   22.358701] eth0: PHY ID 03625f24 at 0 IRQ POLL (sunxi_gmac-0:00) active
  5. [   22.377015] eth0: PHY ID 03625f24 at 1 IRQ POLL (sunxi_gmac-0:01)
  6. [   22.394557] eth0: PHY ID 03625f24 at 2 IRQ POLL (sunxi_gmac-0:02)
  7. [   22.414319] eth0: PHY ID 03625f24 at 3 IRQ POLL (sunxi_gmac-0:03)
  8. [   22.433439] eth0: PHY ID 03625f24 at 4 IRQ POLL (sunxi_gmac-0:04)
  9. [   22.450736] eth0: PHY ID 03625f24 at 30 IRQ POLL (sunxi_gmac-0:1e)
  10. [   22.468916] b53_common: found switch: BCM53125, rev 4
  11. [   24.482382] PHY: sunxi_gmac-0:00 - Link is Up - 1000/Full
  12. [   33.142179] eth0: no IPv6 routers present
Copy the Code
It looks good, maybe I need some interfaces config to get eth0.1 etc?

igorpec  
All the ports seem to be hooked to eth0.


How sure is this? You mean there is only one ethernet device and that one is connected to the switch? WTF!?

Anyway, I will see on my own pretty soon.

mattrix  
Edited by mattrix at Wed Dec 3, 2014 03:10

Pretty sure it's correct.
If you look here, OPENWRT does the same
http://www.bananapi.com/index.ph ... leased?start=48#750
and here
http://forum.lemaker.org/forum.p ... 97&fromuid=2122

OpenWRT uses a config like this

  1. config switch_vlan
  2.         option device 'eth0'
  3.         option vlan '1'
  4.         option ports '0 1 2 4 8t'

  5. config interface 'wan'
  6.         option _orig_ifname 'eth0.2'
  7.         option _orig_bridge 'false'
  8.         option ifname 'eth0.2'
  9.         option proto 'dhcp'

  10. config switch_vlan
  11.         option device 'eth0'
  12.         option vlan '2'
  13.         option ports '3 8t' "
Copy the Code
Think we need to use some VLAN magic of our own
  1. apt-get install vlan
Copy the Code
then something like this maybe
  1. auto eth0.2
  2. iface eth0.2 inet static
  3.   address 192.168.2.1
  4.   netmask 255.255.255.0

  5. auto eth0.3
  6. iface eth0.3 inet static
  7.   address 192.168.3.1
  8.   netmask 255.255.255.0
Copy the Code

igorpec  
Yes, it should be solvable with VLANs.

I think WAN on other HW phy would be faster and paranoia free

mattrix  
Edited by mattrix at Wed Dec 3, 2014 03:55

Let me know any config you manage to get working with VLANS.
I'm not really clued up on it all

You most likely will have to do
  1. echo "8021q" >> /etc/modules
Copy the Code

tkaiser  
Edited by tkaiser at Wed Dec 3, 2014 03:55
igorpec replied at Wed Dec 3, 2014 03:06
You mean there is only one ethernet device and that one is connected to the switch? WTF!?


Yes, of course. The A20's GMAC uses the BCM53125 as PHY so physically SoC and all 5 external PHYs are interconnected through a simple switch. From then on you have to trust in the quality of drivers and VLAN functionality/configuration to 'route' based on virtual interfaces assigned to VLANs.

A simple error with VLAN definitions --> no more routing.

I still wonder whether it would be possible to use both A20's EMAC and GMAC...

You have to log in before you can reply Login | Sign Up

Points Rules