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)

 

 

 





[gr@bpi:~] $ sudo dpkg -i swconfig_15.04-1~armbian5.20+1_armhf.deb
[sudo] password for gr:
Selecting previously unselected package swconfig.
(Reading database ... 181437 files and directories currently installed.)
Preparing to unpack swconfig_15.04-1~armbian5.20+1_armhf.deb ...
Unpacking swconfig (15.04-1~armbian5.20+1) ...
Setting up swconfig (15.04-1~armbian5.20+1) ...

[gr@bpi:~] $ whereis swconfig
swconfig: /sbin/swconfig /usr/local/bin/swconfig
[gr@bpi:~] $ ll /sbin/swconfig /usr/local/bin/swconfig
-rwxr-xr-x 1 root root 14036 Sep 14 18:25 /sbin/swconfig*
-rwxr-xr-x 1 root root 34868 Apr  2  2015 /usr/local/bin/swconfig*

[gr@bpi:~] $ /sbin/swconfig list
Found: switch0 - eth0


 

 

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

 

edit: not yet ;)

 

thanks

Posted

 

 






[gr@bpi:~] $ /usr/local/bin/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)

[gr@bpi:~] $ /sbin/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))

 

 

 

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

 

 

 













[gr@bpi:~] $ wget https://dl.dropboxusercontent.com/u/5385968/swconfig_15.04-1_armhf.deb
--2016-09-16 21:13:43--  https://dl.dropboxusercontent.com/u/5385968/swconfig_15.04-1_armhf.deb
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 45.58.70.5
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|45.58.70.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7376 (7.2K) [application/x-debian-package]
Saving to: ‘swconfig_15.04-1_armhf.deb’

100%[==================================================================================================>] 7,376       --.-K/s   in 0s

2016-09-16 21:13:45 (95.4 MB/s) - ‘swconfig_15.04-1_armhf.deb’ saved [7376/7376]

You have new mail in /var/mail/gr
[gr@bpi:~] $ ll /sbin/swconfig
-rwxr-xr-x 1 root root 34868 Sep 16 21:01 /sbin/swconfig*
[gr@bpi:~] $ sudo dpkg -i swconfig_15.04-1_armhf.deb
(Reading database ... 181441 files and directories currently installed.)
Preparing to unpack swconfig_15.04-1_armhf.deb ...
Unpacking swconfig (15.04-1) over (15.04-1~armbian5.20+1) ...
Setting up swconfig (15.04-1) ...
[gr@bpi:~] $ ll /sbin/swconfig
-rwxr-xr-x 1 root root 11444 Sep 16 21:10 /sbin/swconfig*

[gr@bpi:~] $ /sbin/swconfig
swconfig list
swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)

[gr@bpi:~] 1 $ /sbin/swconfig list
Found: switch0 - eth0

[gr@bpi:~] 1 $ /sbin/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))

 

 

 

it may look the binary has not been linked properly

 

 

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

 

 







[gr@bpi:~] $ nm /sbin/swconfig
nm: /sbin/swconfig: no symbols
[gr@bpi:~] $ nm /usr/local/bin/swconfig
         U abort@@GLIBC_2.4
0000ab40 t ack_wait_handler
0000a090 t add_attr
0000a050 t add_id
0000a450 t add_port_map
0000a564 t add_switch
0000bd90 t __alloc_socket
         U __assert_fail@@GLIBC_2.4
         U atoi@@GLIBC_2.4
         U bind@@GLIBC_2.4
000155e0 A __bss_end__
000155e0 A _bss_end__
000154e4 A __bss_start
000154e4 A __bss_start__
000154f4 b cache
0001555c b cache_ops
[...]

 

 

 

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

@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

 

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

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