build icon indicating copy to clipboard operation
build copied to clipboard

[RfE] Drop support for Lamobo R1

Open ThomasKaiser opened this issue 10 years ago • 220 comments

This device suffers from a few fundamental problems, the most severe claiming to be useable as a router which is not the case.

For R1 users to be able to fool themselves it's necessary that an external piece of software called swconfig works to configure the dumb Broadcom switch which caused problems with 5.20 update and maybe now also with 5.23 (wouldn't call this a bug report since zero information has been provided to be able to even understand what might be happening).

Maybe switching to kernel 4.8 with sunxi-next branch as part of the 5.22 update to fix Dirty COW caused again an incompatibility with this swconfig tool, maybe it's something else. R1 users do not care about security that much so they don't need security updates that urgently or at all.

So let's drop further support for this device and stop providing updates. Unhappy users can switch to Bananian for example since less upgrades are considered a feature and not a problem for sure.

ThomasKaiser avatar Oct 25 '16 08:10 ThomasKaiser

@ThomasKaiser TK, I agree with you.

Slowing support & stopping later, yes sure. I am waiting for the Turris Omnia (+NAS box) to arrive & to replace the R1 (I will be keeping R1 as a "smart" lan switch).

Idea: legacy version: ? next version: forcing a step back to kernel 4.4.x and letting the R1 dies slowly. dev version: mainline with a disclaimer for swconfig

golfromeo-fr avatar Oct 25 '16 11:10 golfromeo-fr

This device can still be used as anything other than a router, and b53 switch driver is now a part of mainline kernel. So we don't have to drop updates for the device completely, instead building beta images once a month should be enough, and if users are interested in this device, they will have to test the beta image, and if it is reported as working, stable update should be made based on tested version.

zador-blood-stained avatar Oct 25 '16 14:10 zador-blood-stained

next version: forcing a step back to kernel 4.4.x and letting the R1 dies slowly.

This will turn our build script into a mess since sunxi-next kernel branch and sunxi-next set of patches are used for many other devices, and we can't split this without breaking backwards compatibility.

zador-blood-stained avatar Oct 25 '16 14:10 zador-blood-stained

I am waiting for the Turris Omnia

@golfromeo-fr I think it's not about you or your plans with R1 or any successor. It's about

  • properly documenting what's up with this device below https://github.com/igorpecovnik/lib.docs/tree/master/docs/board_details (which is pretty easy since it's just explaining the dumb switch issue one more time in big red letters, a link to linux-sunxi wiki and describing Armbian support status)
  • Armbian users taking care of software support for this specific device. If we manage to get a better release/testing policy and if people support this device (I totally agree with Mikhail here) then there's no need to drop support

But if there are no people willing to test prior to releases or unforeseen events like Dirty COW now then it's simply a matter of focusing on devices worth the effort and removing Lamobo R1 from list of automated builds.

ThomasKaiser avatar Oct 25 '16 17:10 ThomasKaiser

@ThomasKaiser @zador-blood-stained I understand and agree. Thanks. I've added some tasks for XU4 (incl. Zador remarks). I will try to help here also.

golfromeo-fr avatar Oct 25 '16 21:10 golfromeo-fr

I would not change the current schema because of last events.

igorpecovnik avatar Oct 26 '16 05:10 igorpecovnik

IMO we need at least one person 'feeling' responsible for devices like R1 that are

  • known to be mis-used (since people ignore that this is not a routerboard but a dumb switchboard instead)
  • known to be fragile since the way people want to mis-use the device implies using a driver and a piece of software to set up the dumb switch

So someone caring about this device could've take notice that there's a change with 4.8 and start early to develop a fix that can be included in Armbian long before the kernel update (in our case now needed due to Dirty COW) will be rolled out.

I believe we've a lot of users capable of doing this amongst us (see https://github.com/igorpecovnik/lib/issues/514 for example) but IMO it's necessary to improve testing/release cycles and get them on board.

ThomasKaiser avatar Oct 26 '16 09:10 ThomasKaiser

I would not like to see support for this device dropped. Basically, it is just an A20 board with a b53 and some crappy rtl8192cu on the USB (which any other board could have, as well). Although I feel pretty busy on my other projects, if this is the price I have to pay to keep this device supported, then I volunteer to do some testing (hopefully just every now and then).

hknaack avatar Oct 26 '16 10:10 hknaack

I was referring to not dropping the board.

IMO we need at least one person 'feeling' responsible for devices like R1 that are

Yes, that's the idea. Before we start next testing period, we have to deal with roles. I would propose to start with a simple check list. We can expand it later, on the way, when we got the system working. For now, only basic parameters. If we need something extra, we could add it to armbianmonitor. When we build images, they must (only) boot and be able to connect to network. The rest is usually fixable with update.

igorpecovnik avatar Oct 26 '16 16:10 igorpecovnik

I was referring to not dropping the board.

I know but this can only work with a changed release/test policy since otherwise we don't get support by users testing stuff prior to release.

As for automated tests I already thought about that in the past and maybe it can work like this:

  • adding a test routine to firstrun (called with a trailing &)
  • the test routine logs everything to /var/log/armbian-initial-tests.log
  • most basic test is ping -c10 $(ip route show default | awk '/default/ {print $3}')
  • Next test is ping -c1 armbian-test.local >/dev/null 2>&1 and based on result then a bunch of other tests could be fired up

Idea behind: When we want to do automated testing after image creation then all that's needed is another host in the network that registers itself through avahid as armbian-test.local and has iperf3 -s running. Also the pure existence of a armbian-test.local can be used to fire up a few more non-network tests on the board (like eg. running sysbench).

In case firstrun detects full test mode based on existence of this other host we could then use show_motd_warning functionality to inform user about test results. So in the end our testers have to download a new image, start it unattended, log in 10 minutes later and see whether everything's ok or not.

The list of tests can easily be extended/updated/adjusted as needed and even with boards like Orange Pi Lite or NanoPi Air we can do a fully automated test based on the assumption that we (or experienced testers) simply use another SBC (called armbian-test.local ;) ) with active AP providing a Wi-Fi network called ARMBIAN-$some-garbage-here where $some-garbage-here contains the passphrase in an obfuscated form. So this is just 2 lines using nmcli to establish an unattended Wi-Fi test setup.

And no, no idea about A33-OlinuXino (but I fear I have to admit that I've not the slightest idea what to do with it anyway -- zero connectivity to the outside isn't comptabile with my use cases)

ThomasKaiser avatar Oct 26 '16 17:10 ThomasKaiser

I did another attempt to upgrade to 5.23 (this time from 5.20), made sure to have swconfig installed, too. But that didn't work out. After realizing, that no b53 driver was loaded, I modprobe'd b53_common and the corresponding mdio driver. That was the result in dmesg:

[ 411.023547] libphy: mdio_driver_register: bcm53xx [ 411.024377] b53_common: found switch: BCM53125, rev 4 [ 411.024607] DSA: switch 0 0 parsed [ 411.024620] DSA: tree 0 parsed [ 411.169920] libphy: dsa slave smi: probed [ 411.266978] Generic PHY dsa-0.0:00: attached PHY driver [Generic PHY](mii_bus:phy_addr=dsa-0.0:00, irq=-1) [ 411.366953] Generic PHY dsa-0.0:01: attached PHY driver [Generic PHY](mii_bus:phy_addr=dsa-0.0:01, irq=-1) [ 411.466962] Generic PHY dsa-0.0:02: attached PHY driver [Generic PHY](mii_bus:phy_addr=dsa-0.0:02, irq=-1) [ 411.567005] Generic PHY dsa-0.0:03: attached PHY driver [Generic PHY](mii_bus:phy_addr=dsa-0.0:03, irq=-1) [ 411.667091] Generic PHY dsa-0.0:04: attached PHY driver [Generic PHY](mii_bus:phy_addr=dsa-0.0:04, irq=-1) [ 411.675727] bcm53xx stmmac-0:1e: Configured port 8 for rgmii [ 413.310845] Link is Up - 1000/Full

As a result, all switch ports got separated. swconfig list however did not find any switch. Digging further into the topic and DSA, it appears that swconfig won't be necessary any more (so no need to have such dependency on lamobo kernel images), and configuration should be done with ip and brctl. As the dmesg output shows, PHY devices are created for each external ethernet port, with aliases lan1 to lan4 and wan for convenience. Furthermore, I was able to set links up or down using ifconfig wan up and ifconfig wan down (same for other ports). There was also a dependency between those ports and eth0.101/eth0.102 in the sense, that the corresponding eth0.10x had to be up, before those ports could be configured. This is the dmesg log when trial-and-erroring:

[ 2687.703430] IPv6: ADDRCONF(NETDEV_UP): wan: link is not ready [ 2689.328289] bcm53xx stmmac-0:1e wan: Link is Down [ 2691.408503] bcm53xx stmmac-0:1e wan: Link is Up - 100Mbps/Full - flow control off [ 2691.408567] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready [ 2693.488812] bcm53xx stmmac-0:1e wan: Link is Down [ 2695.568792] bcm53xx stmmac-0:1e wan: Link is Up - 100Mbps/Full - flow control off [ 2697.649028] bcm53xx stmmac-0:1e wan: Link is Down [ 2698.689012] bcm53xx stmmac-0:1e wan: Link is Up - 100Mbps/Full - flow control off [ 2700.769130] bcm53xx stmmac-0:1e wan: Link is Down [ 2702.849329] bcm53xx stmmac-0:1e wan: Link is Up - 100Mbps/Full - flow control off [ 2849.529885] IPv6: ADDRCONF(NETDEV_UP): lan1: link is not ready [ 2850.619736] bcm53xx stmmac-0:1e lan1: Link is Down [ 2851.659851] bcm53xx stmmac-0:1e lan1: Link is Up - 100Mbps/Full - flow control rx/tx [ 2851.659915] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready [ 2892.222626] bcm53xx stmmac-0:1e lan1: Link is Down [ 2905.854285] IPv6: ADDRCONF(NETDEV_UP): lan2: link is not ready [ 2907.423733] bcm53xx stmmac-0:1e lan2: Link is Down [ 2908.463875] bcm53xx stmmac-0:1e lan2: Link is Up - 100Mbps/Full - flow control off [ 2908.463940] IPv6: ADDRCONF(NETDEV_CHANGE): lan2: link becomes ready [ 2921.984511] bcm53xx stmmac-0:1e lan2: Link is Down [ 2926.780949] IPv6: ADDRCONF(NETDEV_UP): lan3: link is not ready [ 2928.385226] bcm53xx stmmac-0:1e lan3: Link is Down [ 2931.505480] bcm53xx stmmac-0:1e lan3: Link is Up - 1Gbps/Full - flow control rx/tx [ 2931.505547] IPv6: ADDRCONF(NETDEV_CHANGE): lan3: link becomes ready [ 2936.705536] bcm53xx stmmac-0:1e lan3: Link is Down [ 2941.078079] IPv6: ADDRCONF(NETDEV_UP): lan4: link is not ready [ 2943.026239] bcm53xx stmmac-0:1e lan4: Link is Down [ 2944.066393] bcm53xx stmmac-0:1e lan4: Link is Up - 100Mbps/Full - flow control off [ 2944.066460] IPv6: ADDRCONF(NETDEV_CHANGE): lan4: link becomes ready [ 2989.829301] bcm53xx stmmac-0:1e lan4: Link is Down [ 3012.533573] br0: port 2(wlan0) entered disabled state [ 3012.533741] br0: port 1(eth0.102) entered disabled state [ 3035.469970] IPv6: ADDRCONF(NETDEV_UP): lan1: link is not ready [ 3036.792867] bcm53xx stmmac-0:1e lan1: Link is Down [ 3038.873087] bcm53xx stmmac-0:1e lan1: Link is Up - 100Mbps/Full - flow control rx/tx [ 3038.873154] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready [ 3199.044075] bcm53xx stmmac-0:1e lan1: Link is Down [ 3210.702451] IPv6: ADDRCONF(NETDEV_UP): lan2: link is not ready [ 3212.165292] bcm53xx stmmac-0:1e lan2: Link is Down [ 3214.245499] bcm53xx stmmac-0:1e lan2: Link is Up - 100Mbps/Full - flow control off [ 3214.245563] IPv6: ADDRCONF(NETDEV_CHANGE): lan2: link becomes ready [ 3264.168700] bcm53xx stmmac-0:1e lan2: Link is Down [ 3268.699627] IPv6: ADDRCONF(NETDEV_UP): lan3: link is not ready [ 3272.649638] bcm53xx stmmac-0:1e lan3: Link is Up - 1Gbps/Full - flow control rx/tx [ 3272.649705] IPv6: ADDRCONF(NETDEV_CHANGE): lan3: link becomes ready [ 3304.891576] bcm53xx stmmac-0:1e lan3: Link is Down [ 3309.532806] IPv6: ADDRCONF(NETDEV_UP): lan4: link is not ready [ 3311.212363] bcm53xx stmmac-0:1e lan4: Link is Up - 100Mbps/Full - flow control off [ 3311.212428] IPv6: ADDRCONF(NETDEV_CHANGE): lan4: link becomes ready

However, I assigned the wan and lan aliases a valid IP, but every ping to my devices on the corresponding port failed. After that, I went back to 5.20 and try to gather further information. One good explanation of the DSA concept can be found at http://trac.gateworks.com/wiki/linux/vlan#LinuxDistributedSwitchArchitecture. Other than that, I will look into the documentation of ip and brctl to see what useful features they hide under the hood. Until we have all the issues figured out, would there be a problem in keep building the old openwrt driver for the b53 with swconfig? That would make testing less painful, since it would just involve loading and unloading kernel modules to test some configurations.

hknaack avatar Nov 01 '16 22:11 hknaack

Unless there is a testing branch and appropriate mechanisms established and volunteers are known who care for this weird switchboard (it isn't and never will be a routerboard) I still think the best thing is to drop support (implement checks in package upgrading scripts and skip the device so it remains at 4.7 until someone cares about the switchboard again).

ThomasKaiser avatar Nov 01 '16 22:11 ThomasKaiser

probably swconfig is no longer needed anymore, maybe "bridge" instead http://lwn.net/Articles/634787/ Just an idea, we have experts here

golfromeo-fr avatar Nov 02 '16 01:11 golfromeo-fr

i've tried to tackle this issue too, but without much success. theoretically it should 'just work', practically it doesnt. script i've used:

ip link set eth0 up brctl addbr lan for i in lan1 lan2 lan3 lan4; do ip addr flush $i ip link set $i up brctl addif lan $i done ip addr add 192.168.1.1/24 brd 192.168.1.255 dev lan ip link set lan up

and while apparently switch ports regained forwarding capability, i cant connect to/from the lamobo. something makes the packets get dropped when they are originated from the device (they show on eth0, but not on any of the lanX interfaces or lan bridge). let's see if the driver author/maintainer responds.

kotc avatar Nov 02 '16 13:11 kotc

more funnies, leave switch unconfigured, assign local lan ip to eth0, set /proc/sys/net/ipv4/conf/eth0/{forwarding,proxy_arp} to 1, and voila! switch acts like a dumb hub where everything sees everything (even with downed lanX ports o.o). while this might not be the wanted case, if one only needs this device for local lan functionality with mainline, its nice, in a dumb way of nice

kotc avatar Nov 02 '16 16:11 kotc

switch acts like a dumb hub where everything sees everything

This is the only mode this device should be operated since U20 (EEPROM to save switch state so the dumb switch could be brought up in a way where not each and every port is interconnected at layer 2) isn't populated on this crappy device.

Still: best idea would be to drop support entirely since currently we help users actively fooling themselves since people don't want to understand that this is not a routerboard but just a dumb switchboard.

BTW: When using the switchboard as such is GbE performance still crappy or normal A20 level (exceeding 300 Mbits/sec)?

ThomasKaiser avatar Nov 02 '16 16:11 ThomasKaiser

@ThomasKaiser otoh, would be interesting if adding this eeprom could make it remember the setting

kotc avatar Nov 02 '16 16:11 kotc

as for the speed, serving file from /tmp: /dev/null 100%[====================================>] 230.00M 52.9MB/s in 4.5s 2016-11-02 17:40:37 (51.1 MB/s) - '/dev/null' saved [241172480/241172480](receiver is bpi-m1)

kotc avatar Nov 02 '16 16:11 kotc

Still: best idea would be to drop support entirely since currently we help users actively fooling themselves since people don't want to understand that this is not a routerboard but just a dumb switchboard.

Still, the best idea IMO is to write on the download page that network features are supported only on legacy kernel due to changes to mainline. At least until we can provide at least basic network connectivity out of the box with 4.8+ kernels. Or temporary add the old swconfig-compatible driver to the next branch and leave dev branch for DSA tests.

zador-blood-stained avatar Nov 02 '16 16:11 zador-blood-stained

previous result was with bpi-m1 as a receiver, this one is using thinkpad t500: /dev/null 100%[==================================>] 230.00M 62.4MB/s in 3.8s 2016-11-02 17:43:54 (59.9 MB/s) - '/dev/null' saved [241172480/241172480]

kotc avatar Nov 02 '16 16:11 kotc