usbip not working with ZeroPi (Buster Image) - Device disconnect as soon as I try to bind


Recommended Posts

Hi,

 

I normally use Proxmox on Intel Nucs (also Buster based) and also had here usbip with some USB sticks on a USB hub. Now I decided to split that up a bit and so I got some ZeroPi devices and wanted to use them as USBIP hosts kind of. So I installed the buster image and also added usbip_host module to /etc/modules.

The devices are seen by the Linux on the ZeroPi in general and also /usr/sbin/usbip list -l lists them successfully.

 

Here the dmesg output too:

 

[  350.174305] usb 4-1: new high-speed USB device number 6 using ehci-platform
[  350.331127] usb 4-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[  350.331149] usb 4-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  350.331163] usb 4-1: Product: USB 2.0 Hub
[  350.332407] hub 4-1:1.0: USB hub found
[  350.332615] hub 4-1:1.0: 4 ports detected
[  350.738278] usb 4-1.2: new full-speed USB device number 7 using ehci-platform
[  350.968886] usb 4-1.2: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[  350.968907] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  350.968922] usb 4-1.2: Product: USB-Serial Controller
[  350.968935] usb 4-1.2: Manufacturer: Prolific Technology Inc.
[  350.970353] pl2303 4-1.2:1.0: pl2303 converter detected
[  350.972932] usb 4-1.2: pl2303 converter now attached to ttyUSB0
[  351.154251] usb 4-1.3: new full-speed USB device number 8 using ehci-platform
[  351.384959] usb 4-1.3: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[  351.384969] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  351.384975] usb 4-1.3: Product: CP2104 USB to UART Bridge Controller
[  351.384980] usb 4-1.3: Manufacturer: Silicon Labs
[  351.384984] usb 4-1.3: SerialNumber: 01065F3B
[  351.386324] cp210x 4-1.3:1.0: cp210x converter detected
[  351.389285] usb 4-1.3: cp210x converter now attached to ttyUSB1
[  351.590248] usb 4-1.4: new full-speed USB device number 9 using ehci-platform
[  351.820837] usb 4-1.4: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[  351.820848] usb 4-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  351.820854] usb 4-1.4: Product: CP2104 USB to UART Bridge Controller
[  351.820859] usb 4-1.4: Manufacturer: Silicon Labs
[  351.820864] usb 4-1.4: SerialNumber: 010625FA
[  351.822141] cp210x 4-1.4:1.0: cp210x converter detected
[  351.824928] usb 4-1.4: cp210x converter now attached to ttyUSB2

 

But as soon as I try to bind such a device (e.g. /usr/sbin/usbip bind --busid=4-1.2) it is said that the device is not connected and log (syslog this time) shows:

 

Sep  1 09:03:55 usb3 usbipd: usbipd: info: starting usbipd (usbip-utils 2.0)
Sep  1 09:03:55 usb3 usbipd: usbipd: info: listening on 0.0.0.0:3240
Sep  1 09:03:55 usb3 usbipd: usbipd: info: listening on :::3240

...


Sep  1 09:03:56 usb3 kernel: [  414.661581] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
Sep  1 09:03:56 usb3 kernel: [  414.661655] pl2303 4-1.2:1.0: device disconnected
Sep  1 09:03:56 usb3 sh[1837]: usbip: error: error binding device 4-1.2 to driver: No such device
Sep  1 09:03:56 usb3 sh[1837]: usbip: error: could not bind device to usbip-host

Does anyone have an idea? Googl was also not that helpful so far.

 

I reconnected the hub to the proxmox host and everythig works there agin without any problem :-(

Link to post
Share on other sites
Donate and support the project!

Quote

Any instructions on how to go down to kernel 5.6?

Nope.

 

But 5.8.5 should not be a big deal. sunxi-current is already on this particular version and it is planned to bump the current Armbian release to 20.08.1 this weekend. If you are impatient however you can grab dtb, header and kernel image for sunxi from my server (https://werner.armbian.de/_2020/Aug31/) or via nightly builds (beta.armbian.com) and simply install those packages by using dpkg -i.

Link to post
Share on other sites
3 minutes ago, Werner said:

But 5.8.5 should not be a big deal.

Thank you for your answer.

 

When I read "I just compiled 5.8.5 with your patch and usbip works correctly, thx!" (from the linked issue) again Im not sure that it is on 5.8.5 ... I read it more like "when I compile 5.8.5 with that patch it works" ,.. so 5.8.5 is not the solution unless we do a custom build with this patch :-(

 

So downgrading to 5.6 is more forward or ?!

When checking there are some older version of the linux-image-current-sunxi package available but I can not find out which kern is in there :-(

 

ingof@usb3:~$ apt-cache policy linux-image-current-sunxi
linux-image-current-sunxi:
  Installed: 20.08
  Candidate: 20.08
  Version table:
 *** 20.08 500
        500 http://apt.armbian.com buster/main armhf Packages
        100 /var/lib/dpkg/status
     20.05.3 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.05.2 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.05.1 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.05.0-trunk 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.02.9 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.02.7 500
        500 http://apt.armbian.com buster/main armhf Packages
     20.02.5 500
        500 http://apt.armbian.com buster/main armhf Packages

 

Link to post
Share on other sites
3 minutes ago, Igor said:

Add a patch to our build system and you will get support in most recent kernel ... Releasing bug fix update this week. Better than using old unsupported builds.
 

 

Awesome ... I can wait some days ...

 

To be clear: With "Add a patch" you mean you do or I should do? If me then I need to know how :-)

 

Thank you for this incredible fast support

Link to post
Share on other sites

My bad. I did not even check out the link due to lack of time.

Anyway I'll take care for it.

 

https://github.com/armbian/build/pull/2178

Will merge if checks are successful.

 

Quote

Thank you for this incredible fast support

If somebody requesting for help and also helping by him/herself to solve this issue by doing own research we are WAY more motivated to get to a solution ;). Unfortunately this is not very often the case...

Link to post
Share on other sites
7 minutes ago, Werner said:

If somebody requesting for help and also helping by him/herself to solve this issue by doing own research we are WAY more motivated to get to a solution ;). Unfortunately this is not very often the case...

So true ;-)

 

I'm invested myself very deep in a Smart Home project (ioBroker) as one of the Core Developers (mainly Node.js based) ... so I know exactly what you mean ;-)

Link to post
Share on other sites
1 hour ago, apollon77 said:

When checking there are some older version of the linux-image-current-sunxi package available but I can not find out which kern is in there :-(


Normally older kernels are available and switching to them is done simply from armbian-config, but we are right in the middle of infrastructure changes - i cleaned repository few days back, but archived is not yet online.

Link to post
Share on other sites
2 hours ago, Werner said:

Since CI is not working I had to build it myself anyways to test it. Feel free to grab the debs. They include the mentioned patch and are on 5.8.5

Do you have a short info how to do? Do I need to fetch all of them? Or only the armhf ones? ANd then install them with dpkg -i directly?

Link to post
Share on other sites
3 hours ago, apollon77 said:

Do you have a short info how to do? Do I need to fetch all of them? Or only the armhf ones? ANd then install them with dpkg -i directly?

I'd suggest to grab the dtb, the headers and the image. Maybe U-Boot too. Then simply install all of them via dpkg -i *.deb and reboot.

Link to post
Share on other sites

Hm ... headers do not want to install ...

 

Preparing to unpack linux-dtb-current-sunxi_20.08.0-trunk_armhf.deb ...
Unpacking linux-dtb-current-sunxi (20.08.0-trunk) over (20.08) ...
Selecting previously unselected package linux-headers-current-sunxi.
Preparing to unpack linux-headers-current-sunxi_20.08.0-trunk_armhf.deb ...
Unpacking linux-headers-current-sunxi (20.08.0-trunk) ...
Preparing to unpack linux-image-current-sunxi_20.08.0-trunk_armhf.deb ...
update-initramfs: Deleting /boot/initrd.img-5.7.15-sunxi
Removing obsolete file uInitrd-5.7.15-sunxi
Unpacking linux-image-current-sunxi (20.08.0-trunk) over (20.08) ...
Preparing to unpack linux-u-boot-current-zeropi_20.08.0-trunk_armhf.deb ...
Unpacking linux-u-boot-zeropi-current (20.08.0-trunk) over (20.08) ...
Setting up linux-dtb-current-sunxi (20.08.0-trunk) ...
dpkg: dependency problems prevent configuration of linux-headers-current-sunxi:
 linux-headers-current-sunxi depends on make; however:
  Package make is not installed.
 linux-headers-current-sunxi depends on gcc; however:
  Package gcc is not installed.
 linux-headers-current-sunxi depends on libc6-dev; however:
  Package libc6-dev is not installed.
 linux-headers-current-sunxi depends on bison; however:
  Package bison is not installed.
 linux-headers-current-sunxi depends on flex; however:
  Package flex is not installed.
 linux-headers-current-sunxi depends on libssl-dev; however:
  Package libssl-dev is not installed.

dpkg: error processing package linux-headers-current-sunxi (--install):
 dependency problems - leaving unconfigured
Setting up linux-image-current-sunxi (20.08.0-trunk) ...
update-initramfs: Generating /boot/initrd.img-5.8.5-sunxi
update-initramfs: Converting to u-boot format
Setting up linux-u-boot-zeropi-current (20.08.0-trunk) ...
Errors were encountered while processing:
 linux-headers-current-sunxi

 

should I install the missing packages and do the headers again?

 

Link to post
Share on other sites

Ok tried ...

 

ingof@usb3:~/kernel-fix$ sudo apt install make gcc libc6-dev bison flex libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 bison : Depends: m4 but it is not going to be installed
         Depends: libbison-dev (= 2:3.3.2.dfsg-1) but it is not going to be installed
 flex : Depends: m4 but it is not going to be installed
 gcc : Depends: cpp (= 4:8.3.0-1) but it is not going to be installed
       Depends: gcc-8 (>= 8.3.0-1~) but it is not going to be installed
 libc6-dev : Depends: libc-dev-bin (= 2.28-10) but it is not going to be installed
             Depends: linux-libc-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I executed the fix broken command:

 

ingof@usb3:~/kernel-fix$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  binutils binutils-arm-linux-gnueabihf binutils-common bison cpp cpp-8 flex gcc gcc-8 libasan5 libatomic1 libbinutils libbison-dev
  libc-dev-bin libc6-dev libcc1-0 libgcc-8-dev libgomp1 libisl19 libmpc3 libmpfr6 libsigsegv2 libssl-dev libubsan1 linux-libc-dev m4 make
Suggested packages:
  binutils-doc bison-doc cpp-doc gcc-8-locales build-essential flex-doc gcc-multilib manpages-dev autoconf automake libtool gdb gcc-doc
  gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg libmpx2-dbg
  libquadmath0-dbg glibc-doc libssl-doc m4-doc make-doc
Recommended packages:
  libfl-dev manpages manpages-dev
The following NEW packages will be installed:
  binutils binutils-arm-linux-gnueabihf binutils-common bison cpp cpp-8 flex gcc gcc-8 libasan5 libatomic1 libbinutils libbison-dev
  libc-dev-bin libc6-dev libcc1-0 libgcc-8-dev libgomp1 libisl19 libmpc3 libmpfr6 libsigsegv2 libssl-dev libubsan1 linux-libc-dev m4 make
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 28.7 MB of archives.
After this operation, 93.1 MB of additional disk space will be used.

Ok that corrected it ...

 

Setting up linux-headers-current-sunxi (20.08.0-trunk) ...
Compiling headers - please wait ...
Processing triggers for libc-bin (2.28-10) ...

 

Link to post
Share on other sites
7 hours ago, ingenium said:

Any status on when 20.8.2 will be released for imx6? I'm having this same usbip issue, but it seems that 20.8.2 has only been released for rockchip and sunxi.

As mentioned here not all images are being rebuild once an issue has been fixed. Last but not least due to lack of resources.

However it is straight forward enough to build your own kernel package from latest sources using the build script: https://github.com/armbian/build

Or get the packages here which I just built: https://werner.armbian.de/_extra/

Did not know which board you actually have (crystal ball just receiving maintenance) so I chose a random imx6.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...