本開發板mini2440所配內核版本爲 Linux-2.6.32.2
1 使用缺省配置文件配置和編譯內核
$sudo cp config_mini2440_w35 .config ;注意:w35 後面有個空格,然後有個“.”開頭的 config
$sudo make menuconfig
此處遇到問題:
- [lgw@localhost linux-2.6.32.2]$ make menuconfig
- *** Unable to find the ncurses libraries or the
- *** required header files.
- *** 'make menuconfig' requires the ncurses libraries.
- ***
- *** Install ncurses (ncurses-devel) and try again.
- ***
- make[1]: *** [scripts/kconfig/dochecklxdialog] error 1
- make: *** [menuconfig]error 2
解決方法如下:
- yum install ncurses
- yum install ncurses-devel #我在別的博客裏看到貌似是說只安裝這個就可以了,我當時是按照下面的這個鏈接做的。
安裝好這些後就可以make menuconfig 了,出現配置內核的界面後,不用做任何修改,直接<Exit>退出,這樣是爲了生成相應配置的頭文件。
繼續,開始編譯內核:
$sudo make zImage
出錯
- /bin/sh: arm-linux-gcc: not found
不能用 sudo 提權,要以root 的身份執行該命令,不知道什麼原因,反正可以執行。
來源:http://wenda.tianya.cn/question/58272ed391e17e58
編譯結束後,會在 arch/arm/boot 目錄下生成 linux 內核映象文件:zImage
至此,編譯完畢,打完收工。