Re: [Xmblackberry-devel] XmBlackBerry kernel module
Status: Beta
Brought to you by:
rwscott
From: Rick S. <rw...@al...> - 2010-03-04 11:04:28
|
The format warnings should be fixed by changing the %i to %lu it looks like. Glad to see you found the lock_kernel. I hope it works .... Compiling a kernel module with limited knowledge of C is very brave of you :) On Wed, 2010-03-03 at 18:39 -0800, kirk w wrote: > That seems to have fixed that problem, but got another one: > > # make > make V=0 -C /lib/modules/2.6.33/build M=/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel modules > make[1]: Entering directory `/usr/src/linux-2.6.33' > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/bootload.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/jvmdebug.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/desktop.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/caltask.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/ftp.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/loader.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/modem.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/util.o > CC [M] /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.o > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'get_info': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:790: warning: format '%i' expects type 'int', but argument 6 has type 'long unsigned int' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'select_mode': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:832: warning: format '%i' expects type 'int', but argument 6 has type 'long unsigned int' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:838: warning: format '%i' expects type 'int', but argument 5 has type 'size_t' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'open_socket': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:861: warning: format '%i' expects type 'int', but argument 6 has type 'long unsigned int' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'close_socket': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:883: warning: format '%i' expects type 'int', but argument 6 has type 'long unsigned int' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'reset_device': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:903: warning: format '%i' expects type 'int', but argument 6 has type 'long unsigned int' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c: In function 'disconnect': > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:2218: error: implicit declaration of function 'lock_kernel' > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.c:2221: error: implicit declaration of function 'unlock_kernel' > make[2]: *** [/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/init.o] Error 1 > make[1]: *** [_module_/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel] Error 2 > make[1]: Leaving directory `/usr/src/linux-2.6.33' > make: *** [modules] Error 2 > # > > I should mention that this is with gcc 4.4.3 and I'm using 2.6.30 headers. Everything is compiled for 64bit, which may account for the warnings, but my understanding of C is quite limited. This did compile on linux-2.6.28.10 64bit. Thanks again! > > > > --- On Wed, 3/3/10, Rick Scott <rw...@al...> wrote: > > > From: Rick Scott <rw...@al...> > > Subject: Re: XmBlackBerry kernel module > > To: "kirk w" <kir...@ya...> > > Cc: "XmBlackBerry" <xmb...@li...> > > Date: Wednesday, March 3, 2010, 5:49 PM > > On Wed, 2010-03-03 at 12:39 -0800, > > kirk w wrote: > > > Hi Rick, > > > > > > I've been using your Blackberry kernel module for > > quite a while. It's been working great, with my old 8703e > > and now with my 9630. I recently upgraded my kernel to > > 2.6.33 and now I'm having a problem getting the module to > > compile: > > > > > > > 9630, I've never tried one of those. Good to hear. It looks > > like they > > got rid of the info, and probably err and warn, macros from > > the > > linux/usb.h kernel header. I don't think I've built on any > > kernel newer > > than 2.6.18. It looks like you should be able to add the > > following to > > util.h .... > > > > #include <linux/usb.h> > > > > #ifndef err > > #define err(format, arg...) printk(KERN_ERR "%s: " format > > "\n" , > > __FILE__ , ## arg) > > #endif > > #ifndef info > > #define info(format, arg...) printk(KERN_INFO "%s: " format > > "\n" , > > __FILE__ , ## arg) > > #endif > > #ifndef warn > > #define warn(format, arg...) printk(KERN_WARNING "%s: " > > format "\n" , > > __FILE__ , ## arg) > > #endif > > > > Those defines have to be on a single line of course. As > > long as nothing > > else has changed, that should do it. Let me know what > > happens so I can > > update the CVS .... > > > > > > > > # make > > > make V=0 -C /lib/modules/2.6.33/build > > M=/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel > > modules > > > make[1]: Entering directory `/usr/src/linux-2.6.33' > > > CC [M] > > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/bootload.o > > > > > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/bootload.c: > > In function 'bootload_send_packet': > > > > > /initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/bootload.c:39: > > error: implicit declaration of function 'info' > > > make[2]: *** > > [/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel/bootload.o] > > Error 1 > > > make[1]: *** > > [_module_/initrd/mnt/dev_save/sources/blackberry/XmBlackBerry/kernel] > > Error 2 > > > make[1]: Leaving directory `/usr/src/linux-2.6.33' > > > make: *** [modules] Error 2 > > > # > > > > > > Really would be nice to have it working again, any > > ideas? > > > > > > Thanks, > > > > > > Kirk > > > > > > > > > > > > > > > > > > > > |