在linux上安装FTDI设备驱动程序

时间:2012-08-22 14:25:32

标签: c linux-kernel

我试图在ubuntu 10.04上安装FTDI的虚拟COM驱动程序(http://www.ftdichip.com/Drivers/VCP/Linux/ftdi_sio.tar.gz)。

我下载了该文件并尝试编译它。但它显示了这样的错误:

有人可以告诉我原因吗? 我安装了linux内核开发包

以下是make的输出。 由于尺寸限制,我删除了一些零件

sudo make
gcc -Wall -D__KERNEL__ -DMODULE -I/lib/modules/2.6.32-41-generic/build/include -D__SMP__ -DSMP -DMODVERSIONS -include /lib/modules/2.6.32-41-generic/build/include/linux/modversions.h -I/usr/src/linux-2.6.32-41-generic/drivers/usb/serial/ -O   -c -o ftdi_sio.o ftdi_sio.c
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/kernel.h:11,
                 from ftdi_sio.c:251:
/lib/modules/2.6.32-41-generic/build/include/linux/linkage.h:5:25: error: asm/linkage.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/kernel.h:15,
                 from ftdi_sio.c:251:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:17:24: error: asm/bitops.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/kernel.h:15,
                 from ftdi_sio.c:251:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h: In function ‘get_bitmask_order’:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:29: warning: implicit declaration of function ‘fls’
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h: In function ‘hweight_long’:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:45: warning: implicit declaration of function ‘hweight32’
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:45: warning: implicit declaration of function ‘hweight64’
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h: In function ‘fls_long’:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:132: warning: implicit declaration of function ‘fls64’
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h: In function ‘__ffs64’:
/lib/modules/2.6.32-41-generic/build/include/linux/bitops.h:147: warning: implicit declaration of function ‘__ffs’
In file included from ftdi_sio.c:251:
/lib/modules/2.6.32-41-generic/build/include/linux/kernel.h:21:21: error: asm/bug.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/preempt.h:9,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:50,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:56:29: error: asm/thread_info.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/preempt.h:9,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:50,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:65: warning: ‘struct thread_info’ declared inside parameter list
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:65: warning: its scope is only this definition or declaration, which is probably not what you want
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: In function ‘set_ti_thread_flag’:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:67: warning: implicit declaration of function ‘set_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:67: error: dereferencing pointer to incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:70: warning: ‘struct thread_info’ declared inside parameter list
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: In function ‘clear_ti_thread_flag’:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:72: warning: implicit declaration of function ‘clear_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:72: error: dereferencing pointer to incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:75: warning: ‘struct thread_info’ declared inside parameter list
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: In function ‘test_and_set_ti_thread_flag’:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:77: warning: implicit declaration of function ‘test_and_set_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:77: error: dereferencing pointer to incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:80: warning: ‘struct thread_info’ declared inside parameter list
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: In function ‘test_and_clear_ti_thread_flag’:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:82: warning: implicit declaration of function ‘test_and_clear_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:82: error: dereferencing pointer to incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:85: warning: ‘struct thread_info’ declared inside parameter list
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h: In function ‘test_ti_thread_flag’:
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:87: warning: implicit declaration of function ‘test_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/thread_info.h:87: error: dereferencing pointer to incomplete type
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/list.h:6,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/preempt.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:50,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/prefetch.h:14:27: error: asm/processor.h: No such file or directory
/lib/modules/2.6.32-41-generic/build/include/linux/prefetch.h:15:23: error: asm/cache.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/preempt.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:50,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/list.h:7:24: error: asm/system.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h: In function ‘smp_mb__after_lock’:
/lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:137: warning: implicit declaration of function ‘smp_mb’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/spinlock.h:321:24: error: asm/atomic.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:9,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/wait.h:26:25: error: asm/current.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:15,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/seqlock.h: In function ‘write_seqlock’:
/lib/modules/2.6.32-41-generic/build/include/linux/seqlock.h:64: warning: implicit declaration of function ‘smp_wmb’
/lib/modules/2.6.32-41-generic/build/include/linux/seqlock.h: In function ‘read_seqbegin’:
/lib/modules/2.6.32-41-generic/build/include/linux/seqlock.h:93: warning: implicit declaration of function ‘cpu_relax’
/lib/modules/2.6.32-41-generic/build/include/linux/seqlock.h:96: warning: implicit declaration of function ‘smp_rmb’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/bitmap.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h:95,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:16,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/string.h:21:24: error: asm/string.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:16,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h: In function ‘__first_node’:
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h:239: warning: implicit declaration of function ‘find_first_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h: In function ‘__next_node’:
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h:245: warning: implicit declaration of function ‘find_next_bit’
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h: In function ‘__first_unset_node’:
/lib/modules/2.6.32-41-generic/build/include/linux/nodemask.h:263: warning: implicit declaration of function ‘find_first_zero_bit’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:20:22: error: asm/page.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:353: error: expected specifier-qualifier-list before ‘atomic_long_t’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/notifier.h:13,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/memory_hotplug.h:6,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:666,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/mutex.h: In function ‘mutex_is_locked’:
/lib/modules/2.6.32-41-generic/build/include/linux/mutex.h:118: warning: implicit declaration of function ‘atomic_read’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/notifier.h:14,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/memory_hotplug.h:6,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:666,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/rwsem.h:22:65: error: asm/rwsem.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/memory_hotplug.h:6,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:666,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/notifier.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/notifier.h:62: error: field ‘rwsem’ has incomplete type
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h: In function ‘populated_zone’:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:699: error: ‘struct zone’ has no member named ‘present_pages’
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h: In function ‘is_normal’:
/lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:748: error: ‘struct zone’ has no member named ‘zone_pgdat’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:7,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/topology.h:34:26: error: asm/topology.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmdebug.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/autoconf.h:991:1: warning: "CONFIG_NR_CPUS" redefined
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/mmzone.h:12,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:4,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/threads.h:16:1: warning: this is the location of the previous definition
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:12,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h: In function ‘allocflags_to_migratetype’:
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:121: warning: implicit declaration of function ‘WARN_ON’
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h: In function ‘gfp_zone’:
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:219: error: ‘ZONE_DMA’ undeclared (first use in this function)
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:219: error: (Each undeclared identifier is reported only once
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:219: error: for each function it appears in.)
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:219: error: ‘ZONE_HIGHMEM’ undeclared (first use in this function)
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h: In function ‘alloc_pages_node’:
/lib/modules/2.6.32-41-generic/build/include/linux/gfp.h:284: warning: implicit declaration of function ‘cpu_to_node’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/time.h:9,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/ktime.h:24,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/timer.h:5,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/math64.h:5:23: error: asm/div64.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/time.h:9,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/ktime.h:24,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/timer.h:5,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/math64.h: In function ‘div_u64_rem’:
/lib/modules/2.6.32-41-generic/build/include/linux/math64.h:43: warning: implicit declaration of function ‘do_div’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/ktime.h:25,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/timer.h:5,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/timex.h:170:23: error: asm/timex.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/ktime.h:25,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/timer.h:5,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:8,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
/lib/modules/2.6.32-41-generic/build/include/linux/jiffies.h:257:31: error: division by zero in #if
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:11,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:26: error: expected specifier-qualifier-list before ‘atomic_long_t’
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h: In function ‘cancel_delayed_work’:
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:240: error: ‘struct work_struct’ has no member named ‘data’
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h: In function ‘__cancel_delayed_work’:
/lib/modules/2.6.32-41-generic/build/include/linux/workqueue.h:255: error: ‘struct work_struct’ has no member named ‘data’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/kmemtrace.h:12,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:13,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/trace/events/kmem.h: In function ‘trace_kmalloc’:
/lib/modules/2.6.32-41-generic/build/include/trace/events/kmem.h:47: warning: implicit declaration of function ‘smp_read_barrier_depends’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/slab.h:162,
                 from ftdi_sio.c:254:
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:53: error: expected specifier-qualifier-list before ‘atomic_long_t’
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:142: error: ‘PAGE_SHIFT’ undeclared here (not in a function)
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h: In function ‘kmalloc_large’:
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:232: warning: implicit declaration of function ‘get_order’
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:236: error: ‘PAGE_SIZE’ undeclared (first use in this function)
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h: In function ‘kmalloc’:
/lib/modules/2.6.32-41-generic/build/include/linux/slub_def.h:246: error: ‘PAGE_SIZE’ undeclared (first use in this function)
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/fs.h:369,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/tty.h:9,
                 from ftdi_sio.c:255:
/lib/modules/2.6.32-41-generic/build/include/linux/dcache.h: In function ‘dget’:
/lib/modules/2.6.32-41-generic/build/include/linux/dcache.h:336: warning: implicit declaration of function ‘BUG_ON’
/lib/modules/2.6.32-41-generic/build/include/linux/dcache.h:337: warning: implicit declaration of function ‘atomic_inc’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/fs.h:470,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/tty.h:9,
                 from ftdi_sio.c:255:
/lib/modules/2.6.32-41-generic/build/include/linux/quota.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/quota.h:384: error: field ‘dqptr_sem’ has incomplete type
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/tty.h:9,
                 from ftdi_sio.c:255:
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h:748: error: field ‘i_alloc_sem’ has incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h:926: error: expected specifier-qualifier-list before ‘atomic_long_t’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/tty.h:9,
                 from ftdi_sio.c:255:
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h:1337: error: field ‘s_umount’ has incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h: In function ‘file_accessed’:
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h:1738: error: ‘struct file’ has no member named ‘f_flags’
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h: In function ‘put_write_access’:
/lib/modules/2.6.32-41-generic/build/include/linux/fs.h:2130: warning: implicit declaration of function ‘atomic_dec’
In file included from /usr/include/asm/termios.h:1,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/termios.h:5,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/tty.h:11,
                 from ftdi_sio.c:255:
/lib/modules/2.6.32-41-generic/build/include/asm-generic/termios.h:51:25: error: asm/uaccess.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/module.h:14,
                 from ftdi_sio.c:258:
/lib/modules/2.6.32-41-generic/build/include/linux/elf.h:7:21: error: asm/elf.h: No such file or directory
In file included from ftdi_sio.c:258:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:20:23: error: asm/local.h: No such file or directory
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:21:24: error: asm/module.h: No such file or directory
In file included from ftdi_sio.c:258:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:302: error: field ‘arch’ has incomplete type
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:319: error: expected specifier-qualifier-list before ‘Elf_Sym’
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:455: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/lib/modules/2.6.32-41-generic/build/include/linux/module.h: In function ‘__module_get’:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:470: warning: implicit declaration of function ‘local_inc’
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:470: warning: implicit declaration of function ‘__module_ref_addr’
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:472: warning: implicit declaration of function ‘local_read’
In file included from ftdi_sio.c:258:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h: At top level:
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:712: warning: type defaults to ‘int’ in declaration of ‘Elf_Ehdr’
/lib/modules/2.6.32-41-generic/build/include/linux/module.h:712: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/usb.h:14,
                 from ftdi_sio.c:261:
/lib/modules/2.6.32-41-generic/build/include/linux/delay.h:14:23: error: asm/delay.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/usb.h:14,
                 from ftdi_sio.c:261:
/lib/modules/2.6.32-41-generic/build/include/linux/delay.h: In function ‘ndelay’:
/lib/modules/2.6.32-41-generic/build/include/linux/delay.h:39: warning: implicit declaration of function ‘udelay’
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/interrupt.h:12,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/usb.h:15,
                 from ftdi_sio.c:261:
/lib/modules/2.6.32-41-generic/build/include/linux/hardirq.h:10:25: error: asm/hardirq.h: No such file or directory
In file included from /lib/modules/2.6.32-41-generic/build/include/linux/interrupt.h:13,
                 from /lib/modules/2.6.32-41-generic/build/include/linux/usb.h:15,
                 from ftdi_sio.c:261:
/lib/modules/2.6.32-41-generic/build/include/linux/irqflags.h:57:26: error: asm/irqflags.h: No such file or directory

1 个答案:

答案 0 :(得分:0)

我在想你错过了asm符号链接。我没有经历过所有事情,但很多这些错误都没有“asm / XXXX.h”。

让我们来看看第一个错误。检查内核中的include目录:

#/usr/src/linux/include> ls

在这个目录中你应该有一个“linux”目录,它应该包含linkage.h。打开这个我们看到:

#include <asm/linkage.h>

所以它正在/ usr / src / linux / include中寻找一个“asm”目录。你有吗?它是否指向系统的正确架构?这是我的linux / include

的顶部
mike@linux-4puc:/usr/src/linux/include> ls -l
total 120
drwxr-xr-x  3 root root  4096 Aug  1 10:51 acpi
lrwxrwxrwx  1 root root    47 Aug  1 12:08 asm -> /usr/src/linux-3.1.10-1.16/arch/x86/include/asm

我的系统最初没有这个符号链接,所以当我开始时我必须添加它:

mike@linux-4puc:/usr/src/linux/include> ln -s /usr/src/linux-3.1.10-1.16/arch/x86/include/asm asm