Jump to content

[Lamobo-R1] [5.20] swconfig & problem with last 5.20 Armbian update


Recommended Posts

Posted

Hi,

 

Did today a kernel update...upon reboot, has no connectivity. I have lost swconfig; copied the one that comes with the sdcard/img download, it booting the switch by default, but does not allow to do much more...the reset and set operations are giving an error.

 

What could I do?

Posted

Thanks Zador.b.s, it has got exactly the same behaviour.

 

root@ruir:/etc/network# swconfig dev eth0 set reset 1

failed

root@ruir:/etc/network# swconfig dev eth0 set enable_vlan 1

root@ruir:/etc/network# swconfig dev eth0 vlan 101 set ports '3 8t'

root@ruir:/etc/network# swconfig dev eth0 set apply 1

failed

root@ruir:/etc/network# uname -r

4.7.3-sunxi

root@ruir:/etc/network# swconfig list

Found: switch0 - eth0

Posted

@zador.blood.stain

 

thanks, I thought I had a problem 2 days ago when I compiled the kernel (I copy/paste the swconfig binary from older debs)

 

 

  Reveal hidden contents

 

so I need to delete the old /usr/local/bin/swconfig

 

edit: not yet ;)

 

thanks

Posted

 

  Reveal hidden contents

 

 

not sure about the "((null))" and the binary size is very short

Posted

Here it is Zador. I only have one swconfig, unlike goldfish

 

#swconfig dev eth0 help

switch0: eth0(BCM53125), ports: 9 (cpu @ 8), vlans: 4096

     --switch

        Attribute 1 (int): enable_vlan ((null))

        Attribute 2 (string): ports ((null))

        Attribute 3 (int): reset_mib ((null))

        Attribute 4 (int): enable_jumbo ((null))

        Attribute 5 (int): allow_vid_4095 ((null))

        Attribute 6 (unknown): apply ((null))

        Attribute 7 (unknown): reset ((null))

     --vlan

        Attribute 1 (ports): ports ((null))

     --port

        Attribute 1 (string): mib ((null))

        Attribute 2 (int): pvid ((null))

        Attribute 3 (string): link ((null))

Posted

@goldfich_paris Even I had checked earlier with find, I checked again after your post. I do not have it. Thanks.

 

root@ruir:/sbin# whereis swconfig

swconfig: /sbin/swconfig

Posted

@zador.blood.stain

 

 

  Reveal hidden contents

 

 

it may look the binary has not been linked properly

 

 

edit: the following doesn't mean anything (sorry)

 

  Reveal hidden contents

 

 

edit2:

 

I am using Ubuntu 14.04.05

the deb files sounds like it is Ubuntu 15.04

 

edit3:

I looked at

objdump -D -M intel /sbin/swconfig

but it is ASM and I don't read ASM fluently :)

Posted

@zador, last binary still problematic.

 

swconfig dev eth0 help

switch0: eth0(BCM53125), ports: 9 (cpu @ 8), vlans: 4096

     --switch

Attribute 1 (int): enable_vlan ((null))

Attribute 2 (string): ports ((null))

Attribute 3 (int): reset_mib ((null))

Attribute 4 (int): enable_jumbo ((null))

Attribute 5 (int): allow_vid_4095 ((null))

Attribute 6 (unknown): apply ((null))

Attribute 7 (unknown): reset ((null))

     --vlan

Attribute 1 (ports): ports ((null))

     --port

Attribute 1 (string): mib ((null))

Attribute 2 (int): pvid ((null))

Attribute 3 (string): link ((null))

Posted
  On 9/16/2016 at 7:47 PM, goldfish_paris said:

@Rui

Cool, so we have a workaround solution for others Lamobo-R1 Armbian users

 

Yep, specially problematic for me as the R1 is my home router...

Posted
  On 9/16/2016 at 7:51 PM, zador.blood.stained said:

@Rui Ribeiro

Thanks, I hope this will be sorted out in next release, meanwhile we need to find and test working sources for swconfig and use precompiled one before that.

 

No problem, I am using the one from golfish.

Posted

@Mikhail

 

if it can help

 

the "old" swconfig has (with readelf)

 

 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

 

the new one

 

test1

 

 0x00000001 (NEEDED)                     Shared library: [libnl-3.so.200]
 0x00000001 (NEEDED)                     Shared library: [libnl-genl-3.so.200]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [ld-linux-armhf.so.3]
 

test2

 

 0x00000001 (NEEDED)                     Shared library: [libnl-3.so.200]
 0x00000001 (NEEDED)                     Shared library: [libnl-genl-3.so.200]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

 

so as I am using Ubuntu 14.04 and the binary "looks like" for Ubuntu 15.04

Maybe there is a library issue.

 

edit: I have the libnl-3



[gr@bpi:~] $ dpkg -l "libnl*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-===============================================================
ii  libnl-3-200:armhf             3.2.21-1ubuntu3     armhf               library for dealing with netlink sockets
ii  libnl-3-dev                   3.2.21-1ubuntu3     armhf               development library and headers for libnl-3
un  libnl-dev                     <none>              <none>              (no description available)
ii  libnl-genl-3-200:armhf        3.2.21-1ubuntu3     armhf               library for dealing with netlink sockets - generic netlink
ii  libnl-genl-3-dev              3.2.21-1ubuntu3     armhf               development library and headers for libnl-genl-3
ii  libnl-route-3-200:armhf       3.2.21-1ubuntu3     armhf               library for dealing with netlink sockets - route interface
ii  libnl1:armhf                  1.1-8ubuntu1        armhf               library for dealing with netlink sockets
un  libnl2-dev                    <none>              <none>              (no description available)
un  libnl3-dev                    <none>              <none>              (no description available)

looking more closely I have libnl 3.2.21 it seems I would need libnl (network library) 3.2.24

maybe it is not related.

Posted

Old swconfig

 

# ldd swconfig

linux-vdso.so.1 (0xbee4d000)

libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f6b000)

libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e7a000)

/lib/ld-linux-armhf.so.3 (0x7f601000)

 

new swconfig

 

# ldd swconfig

linux-vdso.so.1 (0xbef88000)

libnl-3.so.200 => /lib/arm-linux-gnueabihf/libnl-3.so.200 (0xb6f11000)

libnl-genl-3.so.200 => /lib/arm-linux-gnueabihf/libnl-genl-3.so.200 (0xb6f04000)

libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e14000)

libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6df1000)

libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6d7d000)

/lib/ld-linux-armhf.so.3 (0x7f628000)

 

The pthread library seems out of place here.

 

@goldfish the difference in size is because the new is stripped

 

Even then, after stripping

 

root@ruir:/sbin# ls -la swconfig

-rwxr-xr-x 1 root root 23276 Sep 17 04:30 swconfig

root@ruir:/sbin# ls -la swconfig.new

-rwxr-xr-x 1 root root 11444 Sep 16 20:10 swconfig.new

Posted (edited)

@Mikhail

 

while this one (generating swconfig*15.04*.deb) seems to be broken

https://github.com/jekader/swconfig

 

this one (also doing debian packaging "debuild -uc -us" and closer to openwrt) works ok

https://github.com/xypron/swconfig
 

edit:

before using debuild -uc -us

./autogen.sh has to be launched (if not there is no binary)

Edited by goldfish_paris
note about building xypron/swconfig
Posted
Guys,
 
Problem comes from switch.h :) 
 
switch0: eth0(BCM53125), ports: 9 (cpu @ 8), vlans: 4096
     --switch
        Attribute 1 (int): enable_vlan ((null))
        Attribute 2 (string): ports ((null))
        Attribute 3 (int): reset_mib ((null))
        Attribute 4 (int): enable_jumbo ((null))
        Attribute 5 (int): allow_vid_4095 ((null))
        Attribute 6 (unknown): apply ((null))
        Attribute 7 (unknown): reset ((null))
     --vlan
        Attribute 1 (ports): ports ((null))
     --port
        Attribute 1 (string): mib ((null))
        Attribute 2 (int): pvid ((null))
        Attribute 3 (string): link ((null))
 
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)
 
My solution
apt-get purge -y swconfig
wget -O /usr/include/linux/switch.h https://raw.githubusercontent.com/Bananian/openwrt/master/target/linux/generic/files/include/uapi/linux/switch.h
git clone https://github.com/jekader/swconfig.git
cd swconfig
bash build.sh
cd ..
dpkg -i swconfig_15.04-1_armhf.deb
rm -rf swconfig*

PS:  Nice people developers, please test your code that working on 100%  before to release new versions :)

 

Posted

@dobriloff

  On 9/18/2016 at 10:03 AM, dobriloff said:

 

Guys,
 
Problem comes from switch.h :)
 

 

PS:  Nice people developers, please test your code that working on 100%  before to release new versions :)

 

 

the Bananian switch.h has the same xypron/swconfig switch.h

 

but looking at the diff of the 2 files (openwrt-mirror vs. Bananian), I am surprised the compilation can even work, there are many more enum-ed attributes.

 

I am thinking of a conspiracy of Bananian over Lamobo-R1 users ;)

Posted
  On 9/18/2016 at 10:03 AM, dobriloff said:

PS:  Nice people developers, please test your code that working on 100%  before to release new versions :)

Except that

  • This is not "our code", this is wrong configuration for someone else's code
  • This is not "core functionality" and can easily be fixed by replacing a single file
  • We don't have all the boards that are listed on download page, some boards are just assumed to work since they are similar to others
  • Even if we wanted to extensively test all the images, it would probably take several weeks and a box of microSD cards to do it
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines