LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   FTDI drivers errors (http://www.linuxquestions.org/questions/linux-hardware-18/ftdi-drivers-errors-733885/)

mikeinf 06-18-2009 07:26 AM

FTDI drivers errors
 
I cannot work out what is wrong with this drivers!
Please help.
Code:

memarrano:/home/mike/Desktop/ftdi_sio# make
gcc -Wall -D__KERNEL__ -DMODULE -I/lib/modules/2.6.26-1-686/build/include -D__SMP__ -DSMP -DMODVERSIONS -include /lib/modules/2.6.26-1-686/build/include/linux/modversions.h -I/usr/src/linux-2.6.26-1-686/drivers/usb/serial/ -O  -c -o ftdi_sio.o ftdi_sio.c
cc1: error: /lib/modules/2.6.26-1-686/build/include/linux/modversions.h: No such file or directory
In file included from /lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h:24,
                from /lib/modules/2.6.26-1-686/build/include/asm/thread_info.h:5,
                from /lib/modules/2.6.26-1-686/build/include/linux/thread_info.h:47,
                from /lib/modules/2.6.26-1-686/build/include/linux/preempt.h:9,
                from /lib/modules/2.6.26-1-686/build/include/linux/spinlock.h:49,
                from /lib/modules/2.6.26-1-686/build/include/linux/mmzone.h:7,
                from /lib/modules/2.6.26-1-686/build/include/linux/gfp.h:4,
                from /lib/modules/2.6.26-1-686/build/include/linux/slab.h:12,
                from ftdi_sio.c:254:
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:112: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:112: error: requested alignment is not a constant
In file included from /lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h:24,
                from /lib/modules/2.6.26-1-686/build/include/asm/thread_info.h:5,
                from /lib/modules/2.6.26-1-686/build/include/linux/thread_info.h:47,
                from /lib/modules/2.6.26-1-686/build/include/linux/preempt.h:9,
                from /lib/modules/2.6.26-1-686/build/include/linux/spinlock.h:49,
                from /lib/modules/2.6.26-1-686/build/include/linux/mmzone.h:7,
                from /lib/modules/2.6.26-1-686/build/include/linux/gfp.h:4,
                from /lib/modules/2.6.26-1-686/build/include/linux/slab.h:12,
                from ftdi_sio.c:254:
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:152:1: warning: "cache_line_size" redefined
In file included from /lib/modules/2.6.26-1-686/build/include/asm/pda.h:7,
                from /lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h:14,
                from /lib/modules/2.6.26-1-686/build/include/asm/thread_info.h:5,
                from /lib/modules/2.6.26-1-686/build/include/linux/thread_info.h:47,
                from /lib/modules/2.6.26-1-686/build/include/linux/preempt.h:9,
                from /lib/modules/2.6.26-1-686/build/include/linux/spinlock.h:49,
                from /lib/modules/2.6.26-1-686/build/include/linux/mmzone.h:7,
                from /lib/modules/2.6.26-1-686/build/include/linux/gfp.h:4,
                from /lib/modules/2.6.26-1-686/build/include/linux/slab.h:12,
                from ftdi_sio.c:254:
/lib/modules/2.6.26-1-686/build/include/linux/cache.h:64:1: warning: this is the location of the previous definition
/lib/modules/2.6.26-1-686/build/include/asm/processor.h: In function ‘load_cr3’:
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:184: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:184: error: (Each undeclared identifier is reported only once
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:184: error: for each function it appears in.)
/lib/modules/2.6.26-1-686/build/include/asm/processor.h: At top level:
/lib/modules/2.6.26-1-686/build/include/asm/processor.h:233: error: requested alignment is not a constant
In file included from /lib/modules/2.6.26-1-686/build/include/asm/thread_info.h:5,
                from /lib/modules/2.6.26-1-686/build/include/linux/thread_info.h:47,
                from /lib/modules/2.6.26-1-686/build/include/linux/preempt.h:9,
                from /lib/modules/2.6.26-1-686/build/include/linux/spinlock.h:49,
                from /lib/modules/2.6.26-1-686/build/include/linux/mmzone.h:7,
                from /lib/modules/2.6.26-1-686/build/include/linux/gfp.h:4,
                from /lib/modules/2.6.26-1-686/build/include/linux/slab.h:12,
                from ftdi_sio.c:254:
/lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h: In function ‘current_thread_info’:
/lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h:66: error: ‘THREAD_SIZE’ undeclared (first use in this function)
/lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h: In function ‘stack_thread_info’:
/lib/modules/2.6.26-1-686/build/include/asm/thread_info_64.h:74: error: ‘THREAD_SIZE’ undeclared (first use in this function)
In file included from /lib/modules/2.6.26-1-686/build/include/linux/mmzone.h:16,
                from /lib/modules/2.6.26-1-686/build/include/linux/gfp.h:4,
                from /lib/modules/2.6.26-1-686/build/include/linux/slab.h:12,
                from ftdi_sio.c:254:
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h: In function ‘__first_node’:
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h:233: warning: implicit declaration of function ‘find_first_bit’
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h: In function ‘__next_node’:
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h:239: warning: implicit declaration of function ‘find_next_bit’
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h: In function ‘__first_unset_node’:
/lib/modules/2.6.26-1-686/build/include/linux/nodemask.h:257: warning: implicit declaration of function ‘find_first_zero_bit’
In file included from /lib/modules/2.6.26-1-686/build/include/linux/ktime.h:25,
                from /lib/modules/2.6.26-1-686/build/include/linux/timer.h:5,
                from /lib/modules/2.6.26-1-686/build/include/linux/workqueue.h:8,
                from /lib/modules/2.6.26-1-686/build/include/linux/tty.h:12,
                from ftdi_sio.c:255:
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:39:3: error: #error Invalid value of HZ.
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
/lib/modules/2.6.26-1-686/build/include/linux/jiffies.h:247:31: error: division by zero in #if
In file included from /lib/modules/2.6.26-1-686/build/include/linux/elf.h:7,
                from /lib/modules/2.6.26-1-686/build/include/linux/module.h:14,
                from ftdi_sio.c:258:
/lib/modules/2.6.26-1-686/build/include/asm/elf.h: In function ‘elf_common_init’:
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:166: error: ‘struct pt_regs’ has no member named ‘r8’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:166: error: ‘struct pt_regs’ has no member named ‘r9’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:166: error: ‘struct pt_regs’ has no member named ‘r10’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:166: error: ‘struct pt_regs’ has no member named ‘r11’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:167: error: ‘struct pt_regs’ has no member named ‘r12’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:167: error: ‘struct pt_regs’ has no member named ‘r13’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:167: error: ‘struct pt_regs’ has no member named ‘r14’
/lib/modules/2.6.26-1-686/build/include/asm/elf.h:167: error: ‘struct pt_regs’ has no member named ‘r15’
In file included from /lib/modules/2.6.26-1-686/build/include/linux/module.h:21,
                from ftdi_sio.c:258:
/lib/modules/2.6.26-1-686/build/include/asm/module.h:70:2: error: #error unknown processor family
In file included from /lib/modules/2.6.26-1-686/build/include/linux/sched.h:77,
                from /lib/modules/2.6.26-1-686/build/include/linux/interrupt.h:12,
                from /lib/modules/2.6.26-1-686/build/include/linux/usb.h:15,
                from ftdi_sio.c:261:
/lib/modules/2.6.26-1-686/build/include/linux/proportions.h: In function ‘prop_inc_percpu’:
/lib/modules/2.6.26-1-686/build/include/linux/proportions.h:75: warning: implicit declaration of function ‘local_irq_save’
/lib/modules/2.6.26-1-686/build/include/linux/proportions.h:77: warning: implicit declaration of function ‘local_irq_restore’
In file included from /lib/modules/2.6.26-1-686/build/include/linux/interrupt.h:12,
                from /lib/modules/2.6.26-1-686/build/include/linux/usb.h:15,
                from ftdi_sio.c:261:
/lib/modules/2.6.26-1-686/build/include/linux/sched.h: At top level:
/lib/modules/2.6.26-1-686/build/include/linux/sched.h:1671: error: ‘THREAD_SIZE’ undeclared here (not in a function)
In file included from /lib/modules/2.6.26-1-686/build/include/linux/usb.h:15,
                from ftdi_sio.c:261:
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h: In function ‘cli’:
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h:227: warning: implicit declaration of function ‘local_irq_disable’
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h: In function ‘sti’:
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h:231: warning: implicit declaration of function ‘local_irq_enable’
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h: In function ‘save_flags’:
/lib/modules/2.6.26-1-686/build/include/linux/interrupt.h:235: warning: implicit declaration of function ‘local_save_flags’
In file included from ftdi_sio.c:261:
/lib/modules/2.6.26-1-686/build/include/linux/usb.h: In function ‘usb_register’:
/lib/modules/2.6.26-1-686/build/include/linux/usb.h:1077: error: ‘KBUILD_MODNAME’ undeclared (first use in this function)
ftdi_sio.c: At top level:
ftdi_sio.c:655: error: unknown field ‘num_interrupt_in’ specified in initializer
ftdi_sio.c:656: error: unknown field ‘num_bulk_in’ specified in initializer
ftdi_sio.c:656: warning: missing braces around initializer
ftdi_sio.c:656: warning: (near initialization for ‘ftdi_sio_device.driver_list’)
ftdi_sio.c:656: warning: initialization makes pointer from integer without a cast
ftdi_sio.c:657: error: unknown field ‘num_bulk_out’ specified in initializer
ftdi_sio.c:657: warning: initialization makes pointer from integer without a cast
ftdi_sio.c: In function ‘update_mctrl’:
ftdi_sio.c:793: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_determine_type’:
ftdi_sio.c:1105: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_set_max_packet_size’:
ftdi_sio.c:1124: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1132: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1137: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1144: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_sio_port_probe’:
ftdi_sio.c:1316: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_olimex_probe’:
ftdi_sio.c:1397: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_open’:
ftdi_sio.c:1490: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_close’:
ftdi_sio.c:1522: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_write’:
ftdi_sio.c:1586: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1593: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1635: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_chars_in_buffer’:
ftdi_sio.c:1741: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_read_bulk_callback’:
ftdi_sio.c:1759: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1761: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1782: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_process_read’:
ftdi_sio.c:1882: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:1995: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_break_ctl’:
ftdi_sio.c:2024: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_set_termios’:
ftdi_sio.c:2093: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2106: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2117: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2124: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2142: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2169: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2181: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_tiocmget’:
ftdi_sio.c:2206: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c:2225: error: expected ‘)’ before ‘KBUILD_MODNAME’
ftdi_sio.c: In function ‘ftdi_init’:
ftdi_sio.c:2369: error: expected ‘)’ before ‘KBUILD_MODNAME’
make: *** [ftdi_sio.o] Error 1

Code:

memarrano:/home/mfiorito/Desktop/ftdi_sio# uname -a
Linux memarrano 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686 GNU/Linux


Thanks,
Mike

jeremia 06-26-2009 03:27 AM

I'm running in the same trouble, getting the module compiled i did a maybe dirty thing, ...

I took the kernel source tree, and replaced in /usr/src/linux-source-2.6.26/drivers/usb/serial the ftdi_sio which has version 1.4.3 with version 1.5 from FTDI webiste.
as i build the kernel and modules i got in an error which tells that there are some unresolvable variables.

didn't know what they're for but commenting them out got me to a compilable module that works fine for me.

655://.num_interrupt_in = 0,
656://.num_bulk_in = 1,
657://.num_bulk_out = 1,

building the module as it is written in readme.dat at ftdi didn't work for me.

Marrrriej 01-05-2010 06:39 AM

Same problem
 
Hi,

I have the same problem.
I get a list of errors.

I tried to install some packages but it didn't help..

You've found allready an answer or do someone else now how to deal with it?

Thanks!

Regards,
Marrrriej

dxqcanada 01-05-2010 07:13 AM

Kernel version 2.6.32 includes the v1.5.0 of the FTDI driver.

My guess it that your kernel sources are too old for the latest FTDI driver to compile against.


All times are GMT -5. The time now is 06:31 AM.