Chinaunix

标题: 关于驱动编译 unknown field 'ioctl' specified in initializer [打印本页]

作者: d_raistlin    时间: 2010-11-14 20:01
标题: 关于驱动编译 unknown field 'ioctl' specified in initializer
内核版本 2.6.36

包含了 <asm/ioctl.h>
<linux/ioctl.h>
<asm-generic/ioctl.h> 都不行


然后我在Makefile中,包含了我用来编译驱动到内核代码树到路径,仍然不行,

Makefile

CC = arm-linux-gcc  -I/root/桌面/kernerl/linux-2.6.36-rc6/include
  2 ifneq ($(KERNELRELEASE),)
  3
  4 scull-objs := main.o pipe.o access.o
  5
  6 obj-m := scull.o
  7
  8 else
  9
10     KERNELDIR ?= /lib/modules/2.6.36-rc6/build
11     PWD := $(shell pwd)
12
13 default:
14     $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
15
16 endif
17
作者: mayjojo    时间: 2010-11-22 16:16
2.6.36的内核,我升级到这个内核之后也出问题。不知到什么原因
作者: mayjojo    时间: 2010-11-22 16:21
刚发现2.6.36的file_operations结构发生了重大变化。

取消了原有的ioctl成员,添加来新的成员
  1.         long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
  2.         long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
复制代码

作者: dingcai    时间: 2010-11-24 21:59

作者: dingcai    时间: 2010-11-26 22:19

作者: d_raistlin    时间: 2010-11-28 19:56
刚发现2.6.36的file_operations结构发生了重大变化。

取消了原有的ioctl成员,添加来新的成员
mayjojo 发表于 2010-11-22 16:21



    原来是这个样子。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2