免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1959 | 回复: 0
打印 上一主题 下一主题

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

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-04-27 15:12 |只看该作者 |倒序浏览
编译环境:虚拟机+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[1]: Entering directory `/hypc/linux-3.0.1'
mkdir: cannot create directory `/mnt/hgfs/linux_share/module_test/.tmp_versions': File exists
  CC [M]  /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[2]: *** [/mnt/hgfs/linux_share/module_test/s3c6410_leds.o] Error 2
make[1]: *** [_module_/mnt/hgfs/linux_share/module_test] Error 2
make[1]: Leaving directory `/hypc/linux-3.0.1'
make: *** [all] Error 2
root@ubuntu:/mnt/hgfs/linux_share/module_test#
生成不了.ko文件。

linux3.0.1内核自带的leds驱动我用应用程序可以控制 说明驱动是没问题的,我怀疑是哪里设置不对?
求高手解决!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP