这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 请问关于QT2410编译问题?

共4条 1/1 1 跳转至

请问关于QT2410编译问题?

菜鸟
2006-04-20 06:34:28     打赏

我在编译一个驱动程序时出现如下错误,请问是什么原因?

-------------------------------------------

[root@localhost root]# cd /home/test/examples/drvtest
[root@localhost drvtest]# make clean
rm -rf *.o
[root@localhost drvtest]# make
/usr/local/arm/2.95.3/bin/arm-linux-gcc -O2 -DMODULE -D__KERNEL__ -Wall -Wstrict
-prototypes -Wno-trigraphs -Wmissing-prototypes -I/home/test/kernel/include -c
-o drv.o drv.c
In file included from drv.c:5:
/home/test/kernel/include/linux/module.h:297: linux/version.h: ?????????
In file included from /home/test/kernel/include/asm-arm/arch-s3c2410/S3C2410.h:4
7,
from drv.c:11:
/home/test/kernel/include/asm-arm/arch-s3c2410/hardware.h:32: asm/mach-types.h:
?????????
make: *** [drv.o] Error 1
[root@localhost drvtest]#

-----------------------------




关键词: 请问     关于     QT2410     编译     问题    

菜鸟
2006-04-20 21:12:00     打赏
2楼

-D__KERNEL__ !!

这不是在编写驱动程序吗?和QT有什么关系


菜鸟
2006-04-21 19:35:00     打赏
3楼
把相关的代码贴出来看看 [align=right][color=#000066][此贴子已经被作者于2006-4-21 11:35:17编辑过][/color][/align]

菜鸟
2006-04-22 18:33:00     打赏
4楼

我是按照你们光盘里面的 QT2410开发小记:挑战linux下的驱动程序下的 编自己的驱动程序,驱动按键

一、将“obj-$(CONFIG_QT2410_BUTTONS) += qt2410-buttons.o”放到上面提到的“makefile”中类似语句的最后一行,保存。二、将“dep_tristate 'Support QT2410 Buttons' CONFIG_QT2410_BUTTONS”放到“config.in”中第6行——“comment 'Character devices'”之后,保存退出。三、把“qt2410-buttons.c”;将其放到上面两个文件的所在目录。
[root@localhost root]# cd /home/test/kernel
[root@localhost kernel]# make menuconfig
rm -f include/asm-arm/arch include/asm-arm/proc
(cd include/asm-arm; ln -sf arch-s3c2410 arch; ln -sf proc-armv proc)
rm -f include/asm
( cd include ; ln -sf asm-arm asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/home/test/kernel/scripts/lxdialog'
make[1]: Leaving directory `/home/test/kernel/scripts/lxdialog'
/bin/sh scripts/Menuconfig arch/arm/config.in
Using defaults found in .config
Preparing scripts: functions, parsing...........................................
..............................done.

Saving your kernel configuration...

*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.

[root@localhost kernel]# make modules
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-include
scripts/split-include.c
scripts/split-include include/linux/autoconf.h include/config
make -C kernel CFLAGS="-D__KERNEL__ -I/home/test/kernel/include -Wall -Wstrict-
prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-commo
n -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -
DMODULE" MAKING_MODULES=1 modules
make[1]: Entering directory `/home/test/kernel/kernel'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/home/test/kernel/kernel'
make -C drivers CFLAGS="-D__KERNEL__ -I/home/test/kernel/include -Wall -Wstrict
-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-comm
on -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float
-DMODULE" MAKING_MODULES=1 modules
make[1]: Entering directory `/home/test/kernel/drivers'
make -C block modules
make[2]: Entering directory `/home/test/kernel/drivers/block'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/test/kernel/drivers/block'
make -C cdrom modules
make[2]: Entering directory `/home/test/kernel/drivers/cdrom'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/test/kernel/drivers/cdrom'
make -C char modules
make[2]: Entering directory `/home/test/kernel/drivers/char'
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc -D__KERNEL__ -I/home/test/kernel/i
nclude -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing
-fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-loa
d-bytes -msoft-float -DMODULE -DKBUILD_BASENAME=qt2410_buttons -c -o qt2410-b
uttons.o qt2410-buttons.c
make[2]: /opt/host/armv4l/bin/armv4l-unknown-linux-gcc: Command not found
make[2]: *** [qt2410-buttons.o] Error 127
make[2]: Leaving directory `/home/test/kernel/drivers/char'
make[1]: *** [_modsubdir_char] Error 2
make[1]: Leaving directory `/home/test/kernel/drivers'
make: *** [_mod_drivers] Error 2


共4条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]