h15994242630 发表于 2013-04-27 15:12

linux3.0.1下编译飞凌自带的s3c6410_leds.c驱动模块出问题。。。求解决

编译环境:虚拟机+ubuntu12.04
开发板:OK6410 交叉编译器arm-linux-gcc 4.3.2

情况如下:
将s3c6410_leds.c(飞凌提供的 应该没问题) Makefile 放在linux共享文件夹(文件夹满权限),Makefile内容如下:ifneq ($(KERNELRELEASE),)
obj-m :=s3c6410_leds.o
else
KDIR := /hypc/linux-3.0.1
all:
      make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-
clean:
      rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif

#make 过后出现如下错误:
root@ubuntu:/mnt/hgfs/linux_share/module_test# make
make -C /hypc/linux-3.0.1 M=/mnt/hgfs/linux_share/module_test modules ARCH=arm CROSS_COMPILE=arm-linux-
make: Entering directory `/hypc/linux-3.0.1'
mkdir: cannot create directory `/mnt/hgfs/linux_share/module_test/.tmp_versions': File exists
CC /mnt/hgfs/linux_share/module_test/s3c6410_leds.o
/mnt/hgfs/linux_share/module_test/s3c6410_leds.c: In function 's3c6410_leds_ioctl':
/mnt/hgfs/linux_share/module_test/s3c6410_leds.c:58: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
/bin/sh: 1: cannot create /mnt/hgfs/linux_share/module_test/.tmp_versions/s3c6410_leds.mod: Directory nonexistent
make: *** Error 2
make: *** Error 2
make: Leaving directory `/hypc/linux-3.0.1'
make: *** Error 2
root@ubuntu:/mnt/hgfs/linux_share/module_test#
生成不了.ko文件。

linux3.0.1内核自带的leds驱动我用应用程序可以控制 说明驱动是没问题的,我怀疑是哪里设置不对?
求高手解决!!!
页: [1]
查看完整版本: linux3.0.1下编译飞凌自带的s3c6410_leds.c驱动模块出问题。。。求解决