IncentivesPro Forum Index IncentivesPro
Leading USB solutions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Won't compile

 
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux
View previous topic :: View next topic  
Author Message
MarkA007



Joined: 22 Apr 2015
Posts: 5

PostPosted: Wed Dec 19, 2018 6:18 pm    Post subject: Won't compile Reply with quote

Hello

An ASUS tinkerboard (headers correct ?)

Linux linaro-alip 4.4.16-00006-g4431f98-dirty #1 SMP Mon Apr 17 17:27:25 CST 2017 armv7l GNU/Linux

doese this make any sense to anyone ?

gcc: error: unrecognized command line option ‘-mgeneral-regs-only



Regards
Mark

Code:

make -C /lib/modules/4.4.16-00006-g4431f98-dirty/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.132+'
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
scripts/Makefile.build:277: recipe for target '/opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o' failed
make[2]: *** [/opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o] Error 1
Makefile:1471: recipe for target '_module_/opt/usb-redirector-linux-arm/files/modules/src/tusbd' failed
make[1]: *** [_module_/opt/usb-redirector-linux-arm/files/modules/src/tusbd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.132+'
Makefile:61: recipe for target 'default' failed
make: *** [default] Error 2
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 554

PostPosted: Thu Dec 20, 2018 2:01 pm    Post subject: Reply with quote

Hi Mark,
Quote:
make -C /lib/modules/4.4.16-00006-g4431f98-dirty/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.132+'

It looks like you are using wrong headers. Your kernel is 4.4.16, but headers are 4.4.132+:
Back to top
View user's profile Send private message
MarkA007



Joined: 22 Apr 2015
Posts: 5

PostPosted: Fri Dec 21, 2018 1:28 am    Post subject: Reply with quote

Many Thanks, learning all the time and as i thought...
Someone over on Ambian pointed me to the main repository, so now have a version with headers that it says it complies on...
but..


Linux tinkerboard 4.14.70-rockchip #270 SMP PREEMPT Wed Sep 19 11:40:40 CEST 2018 armv7l GNU/Linux

code follows, not complete but you get the idear.
MarkA


Code:

make -C /lib/modules/4.14.70-rockchip/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.70-rockchip'
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.o
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lIIIlIIlI’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:65:77: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 ,IIIll);break;}}while((0x10e4+1729-0x17a5));if(IIIll!=(0x1b58+2741-0x260d)){if(
                                                                             ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:66:27: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 llIlIIl)cdev_del(llIlIIl);if(lIllIll!=MKDEV((0x1ba+4053-0x118f),
                           ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:66:27: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:67:77: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 (0xd9c+6089-0x2565)))unregister_chrdev_region(lIllIll,(0x1402+1301-0x1818));if(
                                                                             ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:67:77: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:68:32: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 IlllIlI)class_destroy(IlllIlI);llIlIIl=NULL;lIllIll=MKDEV((0xcb3+273-0xdc4),
                                ^~~~~~~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘IllIIlII’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:73:10: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 llIlIIl);if(lIllIll!=MKDEV((0x63b+2597-0x1060),(0x498+2770-0xf6a)))
          ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:74:44: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 unregister_chrdev_region(lIllIll,IIIlllIl);if(IlllIlI)class_destroy(IlllIlI);
                                            ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lIlllIIl’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:1: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 if(IIIlllll<(0x134d+5045-0x2702)||IIIlllll>=IIIlllIl)return-EINVAL;if(lIllllII<
 ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:68: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 if(IIIlllll<(0x134d+5045-0x2702)||IIIlllll>=IIIlllIl)return-EINVAL;if(lIllllII<
                                                                    ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:68: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:166:55: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 (0x1b38+200-0x1c00)||lIllllII>=IIIlllIl)return-EINVAL;if(IIIlllll>lIllllII)
                                                       ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:166:55: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:167:15: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 return-EINVAL;mutex_lock(&lIIIIll);for(i=IIIlllll;i<=lIllllII;i++){if(IIIIllll[i
               ^~~~~~~~~~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lllIlIlll’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:217:53: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
 IlIlIl*lIllI;mutex_lock(&lIIIIll);lIllI=IIIIllll[m];if(lIllI&&lIllI->ops.
                                                     ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:218:46: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 lIlIIlII)lIllI->ops.lIlIIlII(lIllI->context);mutex_unlock(&lIIIIll);if(lIllI){
                                              ^~~~~~~~~~~~
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.o
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.c: In function ‘IIlIllllI’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.c:87:28: warning: this ‘if’ clause does not guard... [-Wmis
leading-indentation]
 ;INIT_LIST_HEAD(&IIIIIlIl);if(copy_from_user(&IlIIIllI,lllIl,sizeof(IlIIIllI)))


Code:
               ^~
  LD [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.mod.o
  LD [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.14.70-rockchip'
Back to top
View user's profile Send private message
MarkA007



Joined: 22 Apr 2015
Posts: 5

PostPosted: Thu Mar 14, 2019 1:04 am    Post subject: Almost... Reply with quote

After a lot of tinkering, sorting out all sorts of stuff..

we managed to x-complie a kernel (unsupported...) with vhci etc and ended up with

Linux tinkerboard 4.19.28-rockchip #5.77 SMP PREEMPT Mon Mar 11 22:54:26 GMT 2019 armv7l GNU/Linux

on which tusbd.ko would load/unload properly (symlinks needed fixing for the binaries.

yes, i know it's unsupported, but it seems to work.. more or less..
but wonder why the redirector can't seem to get above around 10Mb/s out of eth0... i.e. about USB1.1 speeds. even with just one device shared/connected.

However.. hardware seems capable and eth0 is gigabit?

user@tinkerboard:~$ lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 1f4d:d803 G-Tek Electronics Group
Bus 001 Device 021: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 020: ID 08bb:2901 Texas Instruments PCM2901 Audio Codec
Bus 001 Device 019: ID 0424:2502 Standard Microsystems Corp.
Bus 001 Device 022: ID 1df7:3020
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:481a Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


M
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 554

PostPosted: Fri Mar 15, 2019 1:00 pm    Post subject: Reply with quote

Hello Mark,

Glad that you were able to compile it finally, great job! Smile

Can you confirm what kind of USB device you are redirecting? And what is your USB client, is it connected through Wifi or cable?
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 554

PostPosted: Fri Mar 15, 2019 1:03 pm    Post subject: Reply with quote

Latency can affect USB redirection performance drastically. Please check your ping times between client and server with long packets:
Code:
ping -s 1024 x.x.x.x
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group