Author Message

<  Device Information  ~  cross-compile usb_modeswitch problem

PostPosted: Tue Feb 10, 2009 6:01 am Reply with quote
Posts: 2 Joined: Mon Feb 09, 2009 10:24 am
I cross-compile usb_modeswitch with kernel 2.6.19.2 , and the processor on my board is MX27(arm9), there are some compile problems:

arm-926ejs-linux-gcc -g -DDEBUG -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -I/home/THF/Download/libusb/libusb -I/opt/mx27_ltib/rpm/BUILD/linux/include -c usb_modeswitch.c -o usb_modeswitch.o
In file included from /opt/mx27_ltib/rpm/BUILD/linux/include/linux/usb.h:4,
from usb_modeswitch.c:58:
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:18: error: expected specifier-qualifier-list before '__u32'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:31: error: expected specifier-qualifier-list before '__u32'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:100: error: expected specifier-qualifier-list before '__u16'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:136: error: expected specifier-qualifier-list before '__u16'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:153: error: expected specifier-qualifier-list before '__u16'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:167: error: expected specifier-qualifier-list before '__u8'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:172: error: expected specifier-qualifier-list before '__u8'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:183: error: expected specifier-qualifier-list before '__u8'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:200: error: expected specifier-qualifier-list before 'kernel_ulong_t'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:213: error: expected specifier-qualifier-list before '__u16'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:260: error: expected specifier-qualifier-list before '__u16'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:291: error: expected specifier-qualifier-list before 'kernel_ulong_t'
/opt/mx27_ltib/rpm/BUILD/linux/include/linux/mod_devicetable.h:318: error: expected specifier-qualifier-list before 'kernel_ulong_t'
usb_modeswitch.c:126: warning: function declaration isn't a prototype
usb_modeswitch.c: In function 'main':
usb_modeswitch.c:253: warning: implicit declaration of function 'usb_init'
usb_modeswitch.c:256: warning: implicit declaration of function 'usb_set_debug'
usb_modeswitch.c:258: warning: implicit declaration of function 'usb_find_busses'
usb_modeswitch.c:259: warning: implicit declaration of function 'usb_find_devices'
usb_modeswitch.c:298: warning: implicit declaration of function 'usb_open'
usb_modeswitch.c:298: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c:350: warning: implicit declaration of function 'usb_set_configuration'
usb_modeswitch.c:357: warning: implicit declaration of function 'usb_claim_interface'
usb_modeswitch.c:365: warning: implicit declaration of function 'usb_set_altinterface'
usb_modeswitch.c:371: warning: implicit declaration of function 'usb_clear_halt'
usb_modeswitch.c:409: warning: implicit declaration of function 'usb_control_msg'
usb_modeswitch.c:440: warning: implicit declaration of function 'sleep'
usb_modeswitch.c:445: warning: implicit declaration of function 'usb_reset'
usb_modeswitch.c:462: warning: implicit declaration of function 'usb_release_interface'
usb_modeswitch.c:468: warning: implicit declaration of function 'usb_close'
usb_modeswitch.c: In function 'write_bulk':
usb_modeswitch.c:475: warning: implicit declaration of function 'usb_bulk_write'
usb_modeswitch.c: In function 'read_bulk':
usb_modeswitch.c:486: warning: implicit declaration of function 'usb_bulk_read'
usb_modeswitch.c: In function 'search_devices':
usb_modeswitch.c:515: warning: implicit declaration of function 'usb_get_busses'
usb_modeswitch.c:515: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c:515: error: dereferencing pointer to incomplete type
usb_modeswitch.c:517: error: dereferencing pointer to incomplete type
usb_modeswitch.c:517: error: dereferencing pointer to incomplete type
usb_modeswitch.c:518: error: dereferencing pointer to incomplete type
usb_modeswitch.c:518: error: dereferencing pointer to incomplete type
usb_modeswitch.c:520: error: dereferencing pointer to incomplete type
usb_modeswitch.c:522: error: dereferencing pointer to incomplete type

anyone can help me?


Offline
PostPosted: Wed Feb 11, 2009 4:58 am Reply with quote
Posts: 42 Joined: Thu Jun 05, 2008 9:52 am
It looks like your compiler couldn't find the libusb.

You might want to include also
CFLAGS += -I/home/THF/Download/libusb/libusb -L/home/THF/Download/libusb/libusb/.libs
LIBS += -lusb


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
2 posts
Users browsing this forum: No registered users and 2 guests
Search for:
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 post attachments in this forum
cron