天嵌 ARM开发社区

 找回密码
 注册
查看: 3911|回复: 7

加触摸屏后编译出错,各位帮忙看究竟为什么

[复制链接]
weilingsi 发表于 2009-5-28 20:16:47 | 显示全部楼层 |阅读模式
加触摸屏后编译出错,各位帮忙看究竟为什么
我按照天嵌科技step by step 中添加触摸屏的步骤作,make zImage 出错如下
[root@localhost linux-2.6.25.8]# make zImage
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
<stdin>:1377:2: warning: #warning syscall timerfd_create not implemented
<stdin>:1389:2: warning: #warning syscall timerfd_settime not implemented
<stdin>:1393:2: warning: #warning syscall timerfd_gettime not implemented
  CHK     include/linux/compile.h
  CC      arch/arm/mach-s3c2440/mach-smdk2440.o
arch/arm/mach-s3c2440/mach-smdk2440.c:175: error: variable `EmbedSky_ts_info' has initializer but incomplete type
arch/arm/mach-s3c2440/mach-smdk2440.c:176: error: unknown field `delay' specified in initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:176: warning: excess elements in struct initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:176: warning: (near initialization for `EmbedSky_ts_info')
arch/arm/mach-s3c2440/mach-smdk2440.c:177: error: unknown field `presc' specified in initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:177: warning: excess elements in struct initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:177: warning: (near initialization for `EmbedSky_ts_info')
arch/arm/mach-s3c2440/mach-smdk2440.c:178: error: unknown field `oversampling_shift' specified in initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:178: warning: excess elements in struct initializer
arch/arm/mach-s3c2440/mach-smdk2440.c:178: warning: (near initialization for `EmbedSky_ts_info')
arch/arm/mach-s3c2440/mach-smdk2440.c:175: error: storage size of `EmbedSky_ts_info' isn't known
make[1]: *** [arch/arm/mach-s3c2440/mach-smdk2440.o] Error 1
make: *** [arch/arm/mach-s3c2440] Error 2
[root@localhost linux-2.6.25.8]#

根据出错提示应该是下列代码有问题
//touch screen
struct platform_device s3c_device_ts={
        .name        ="EmbedSky-ts",
        .id        =-1,
};
static struct EmbedSky_ts_mach_info EmbedSky_ts_info={
        .delay=10000,
        .presc=49,
        .oversampling_shift=2,
};

static struct platform_device *smdk2440_devices[] __initdata = {
        &s3c_device_usb,
        &s3c_device_lcd,
        &s3c_device_wdt,
        &s3c_device_i2c,
        &s3c_device_iis,
        &s3c_device_ts,
};
 楼主| weilingsi 发表于 2009-5-29 19:16:38 | 显示全部楼层
以上问题已解决,但编译后出现其他的问题,如下
[root@localhost linux-2.6.25.8]# make zImage
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
  SYMLINK include/asm-arm/arch -> include/asm-arm/arch-s3c2410
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
<stdin>:1377:2: warning: #warning syscall timerfd_create not implemented
<stdin>:1389:2: warning: #warning syscall timerfd_settime not implemented
<stdin>:1393:2: warning: #warning syscall timerfd_gettime not implemented
  CHK     include/linux/compile.h
  CC      drivers/input/tsdev.o
drivers/input/tsdev.c:51:26: linux/config.h: No such file or directory
drivers/input/tsdev.c:56:35: linux/devfs_fs_kernel.h: No such file or directory
drivers/input/tsdev.c: In function `tsdev_connect':
drivers/input/tsdev.c:413: error: implicit declaration of function `devfs_mk_cdev'
drivers/input/tsdev.c:419: error: incompatible type for argument 1 of `class_device_create'
drivers/input/tsdev.c:419: warning: passing arg 2 of `class_device_create' makes pointer from integer without a cast
drivers/input/tsdev.c:419: error: incompatible type for argument 3 of `class_device_create'
drivers/input/tsdev.c:419: warning: passing arg 4 of `class_device_create' from incompatible pointer type
drivers/input/tsdev.c:419: warning: passing arg 5 of `class_device_create' makes pointer from integer without a cast
drivers/input/tsdev.c: In function `tsdev_disconnect':
drivers/input/tsdev.c:430: error: incompatible type for argument 1 of `class_device_destroy'
drivers/input/tsdev.c:431: error: implicit declaration of function `devfs_remove'
drivers/input/tsdev.c: At top level:
drivers/input/tsdev.c:448: error: implicit declaration of function `LONG'
drivers/input/tsdev.c:448: error: nonconstant array index in initializer
drivers/input/tsdev.c:448: error: (near initialization for `tsdev_ids[0].keybit')
drivers/input/tsdev.c:448: warning: left shift count >= width of type
drivers/input/tsdev.c:455: error: nonconstant array index in initializer
drivers/input/tsdev.c:455: error: (near initialization for `tsdev_ids[1].keybit')
drivers/input/tsdev.c:455: warning: left shift count >= width of type
drivers/input/tsdev.c:472: warning: initialization from incompatible pointer type
drivers/input/tsdev.c: In function `tsdev_init':
drivers/input/tsdev.c:482: warning: ignoring return value of `input_register_handler', declared with attribute warn_unused_result
make[2]: *** [drivers/input/tsdev.o] Error 1
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
[root@localhost linux-2.6.25.8]#
亚瑟王 发表于 2009-6-3 12:07:16 | 显示全部楼层
找不到那几个头文件哦。config.h,devfs_fs_kernel.h
 楼主| weilingsi 发表于 2009-6-5 09:42:19 | 显示全部楼层
我的TSDEV设备打补丁用的tsdev.c是从你们光盘中kernel-2.6.13中拷贝到kernel-2.6.25.8进行编译,不知你们这个tsdev.c是否通用?
亚瑟王 发表于 2009-6-5 10:02:29 | 显示全部楼层
移植手册里面讲解了如何修改tsdev.c的不同版本的内核的同名文件多多少少都有修改的。
 楼主| weilingsi 发表于 2009-6-6 17:56:18 | 显示全部楼层
亚瑟王,能否提供你们用于kernel-2.6.25.8中的tsdev.c文件给我
 楼主| weilingsi 发表于 2009-6-9 15:42:34 | 显示全部楼层
tsdev.c 中用以下代码创建设备文件,kernel-2.6.25.8放弃使用devfs了,那它是如何创建设备文件的?

        devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
        devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
        class_device_create(input_class,
                        MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
                        dev->dev, "ts%d", minor);
亚瑟王 发表于 2009-6-11 11:55:49 | 显示全部楼层
我们的2.6.25.8的文件系统是udev和devfs都支持的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-29 07:37 , Processed in 1.042902 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表