casastorta / gobiserial

GobiSerial (Gobi 3000 driver) patched for newer Linux kernels
18 stars 16 forks source link

Kernel oops on Raspberry Pi with Netgear AirCard 341U when not using DKMS #3

Closed Tookmund closed 10 years ago

Tookmund commented 10 years ago

After compiling GobiSerial using sudo make install, using modprobe when the modem is inserted (it does not load by default) produces a kernel oops. DKMS is not an option if you want to use the latest kernel on the pi. I am using 3.12.24+. I followed the instructions posted here to get the kernel headers updating the version numbers to the version I am using. I also used the code referenced in this post.

Tookmund commented 10 years ago

When compiling these are the warnings I got:

rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
make -C /lib/modules/3.12.24+/build SUBDIRS=/usr/src/gobiserial-master/GobiSerial modules
make[1]: Entering directory `/usr/src/linux-rpi-3.12.y'
  CC [M]  /usr/src/gobiserial-master/GobiSerial/GobiSerial.o
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c: In function ‘GobiOpen’:
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c:422:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat]
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c: In function ‘GobiClose’:
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c:498:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat]
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c: In function ‘__check_debug’:
/usr/src/gobiserial-master/GobiSerial/GobiSerial.c:784:1: warning: return from incompatible pointer type [enabled by default]
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/gobiserial-master/GobiSerial/GobiSerial.mod.o
  LD [M]  /usr/src/gobiserial-master/GobiSerial/GobiSerial.ko
make[1]: Leaving directory `/usr/src/linux-rpi-3.12.y'
casastorta commented 10 years ago

I have no means to properly test this, since I've switched jobs (and companies) and no gobi hardware available anymore.

But will see what I can do without hardware for testing since it looks like bit of code cleanup could do the trick. Thank you for reporting!

ivuk commented 10 years ago

@casastorta, I've tried, but I can't reproduce the warnings when compiling on Ubuntu 14.04 or Fedora 19. There are some other warnings, but they're fixed by switching the 'static int debug' to bool. I have no ARM hardware at the moment, so I can't test on that platform.

Tookmund commented 10 years ago

No warnings on Debian 7.5 either. Although when the modem is inserted /dev/ttyUSB2 is not created and /dev/ttyUSB0 outputs nothing. /dev/ttyUSB1 works fine (direct modem access) but what do I need to do to access the GPS data?

EDIT: I made this its own issue, see casastorta/gobiserial/issues/5

Tookmund commented 10 years ago

Could the warnings have something to do with the the fact that Raspberry Pi uses a "hard float ABI"? I'm not really sure how it works but the raspbian.org FAQ states:

What do you mean by "soft float ABI" and "hard float ABI"?

ABI stands for application binary interface. The term has slightly different meanings in different contexts but in this context it refers to the set of rules used to set up registers and the stack when calling and returning from functions and other details that are required for binaries to be compatible with each other.

The "soft float" ABI passes floating point parameters in integer registers while the "hard float ABI" passes them in vfp (floating point) registers. The two ABIs are not compatible because they use different registers. It is possible to use hardware floating point with the soft-float ABI but doing so means that whenever a floating point value is passed to or returned from a function it must be transferred to an integer register incurring a performance penalty.

ivuk commented 10 years ago

@Toukmond, can we close this now that you got it somewhat working in issue #5?

Tookmund commented 10 years ago

Yes of course. Sorry for not doing it myself.

Jacob

On Jul 23, 2014, at 5:10 PM, Igor Vuk notifications@github.com wrote:

@Toukmond, can we close this now that you got it somewhat working in issue #5?

— Reply to this email directly or view it on GitHub.

ivuk commented 10 years ago

Thank you for the feedback. I'm closing this bug report, it was resolved in #5.