【Linux学习】Ubuntu下内核编译(一)


(1)当要执行内核配置时,输入make menuconfig时出现错误

\

遇到这个问题,主要是以为没有ncurses库,而make menconfig 需要这个库,因此需要安装ncurses或者ncurses-devel即可。输入命令:sudo apt-get install ncurses或者sudo apt-get install ncurses-devel。

(2)错误
drivers/input/touchscreen/eeti_ts.c: In function "eeti_ts_irq_active':
drivers/input/touchscreen/eeti_ts.c:65: error: implicit declaration of function 'irq_to_gpio'
make[3]: *** [drivers/input/touchscreen/eeti_ts.o] 错误 1
make[2]: *** [drivers/input/touchscreen] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2

解决办法:
先编译看下内核有没有问题,运行make命令出现下面的错误:
问题:drivers/input/touchscreen/eeti_ts.c:65: 错误: 隐式声明函数‘irq_to_gpio’解决:重新make menuconfig,将driver中的输入设备->触摸设备中,将EETI选项不选,保存退出后,重新make

(3)移植linux2.6.38内核到TQ2440。移植步骤见网址:http://blog.sina.com.cn/s/blog_77aea4c60100qs9o.html
在第9条中自己改为:/drivers/tty/serial/
按照第10条中./patch-kernel.sh c m /usr/src/linux-2.6.38(自己内核所在目录)后显示“没有那个文件和目录”
解决:看到yaffs2文件夹下没有patch-kernel.sh,只有patch-ker.sh,然后改为:./patch-ker.sh c m /usr/src/linux-2.6.38然后出现:
Updating /usr/src/linux-2.6.38/fs/Kconfig
Updating /usr/src/linux-2.6.38/fs/Makefile
打补丁完成

相关内容