日期:2014-05-16  浏览次数:20714 次

基于mini2440做国嵌mp3项目问题
我在做这个项目的时候,按键驱动移植的时候遇到了问题,输入make命令后如下:
ot@localhost driver]# make
make -C /feng/SDK-MP3/kernel/linux-2.6.29 M=/feng/SDK-MP3/driver modules ARCH=arm CROSS_COMPILE=arm-linux-
make[1]: Entering directory `/feng/SDK-MP3/kernel/linux-2.6.29'
  CC [M] /feng/SDK-MP3/driver/mini2440_buttons.o
/feng/SDK-MP3/driver/mini2440_buttons.c:11:28: error: mach/regs-gpio.h: No such file or directory
/feng/SDK-MP3/driver/mini2440_buttons.c:30: error: 'IRQ_EINT8' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:30: error: 'S3C2410_GPG0' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:30: error: 'S3C2410_PG0_EINT8' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:31: error: 'IRQ_EINT11' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:31: error: 'S3C2410_GPG3' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:31: error: 'S3C2410_GPG3_EINT11' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:32: error: 'IRQ_EINT13' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:32: error: 'S3C2410_GPG5' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:32: error: 'S3C2410_GPG5_EINT13' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:33: error: 'IRQ_EINT14' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:33: error: 'S3C2410_GPG6' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:33: error: 'S3C2410_GPG6_EINT14' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:34: error: 'IRQ_EINT15' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:34: error: 'S3C2410_GPG7' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:34: error: 'S3C2410_GPG7_EINT15' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:35: error: 'IRQ_EINT19' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:35: error: 'S3C2410_GPG11' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c:35: error: 'S3C2410_GPG11_EINT19' undeclared here (not in a function)
/feng/SDK-MP3/driver/mini2440_buttons.c: In function 'buttons_interrupt':
/feng/SDK-MP3/driver/mini2440_buttons.c:62: error: implicit declaration of function 's3c2410_gpio_getpin'
make[2]: *** [/feng/SDK-MP3/driver/mini2440_buttons.o] 错误 1
make[1]: *** [_module_/feng/SDK-MP3/driver] 错误 2
make[1]: Leaving directory `/feng/SDK-MP3/kernel/linux-2.6.29'
make: *** [all] 错误 2
然后我是在一个driver的目录下执行make命令的,在这个driver目录下只有两个文件,一个是Makefile,另一个是mini2440-buttons.c。
我看了上面的错误好像是说缺少了mach/regs-gpio.h文件,但是目录我是直接复制来的,应该没有错吧。

------解决方案--------------------
lz 的错误是一堆为定义的东西,貌似少了个头文件
------解决方案--------------------
可以到mini2440_buttons.c 这个文件下去看看 那些未定义的东西在那儿?然后一步一步追踪。此问题不难解决
------解决方案--------------------
是不是没regs-gpio.h这个头文件。