Target Board: GEC2410 ( 64MRAM
编译环境: ubuntu7.10
交叉编译工具:
内核包:
1.交叉编译工具安装的路径: /usr/local/arm2410/
内核包放在某个地方,自己决定吧!
解压 file.tar.bz2的命令:
2.把交叉编译器路径添加到系统的路径中:
在alias l='ls -CF'后的空白处填上:
PATH=$PATH:/usr/local/arm2410/3.3.2/bin
export PATH
启动新系统路径:
#source /root/.bashrc
显示新系统路径:
# echo $PATH
查看交叉编译器版本号
# arm-linux-gcc -v
3.修改 linux-2.6.8的根目录下的 makfile 文件:
注释掉以下内容:
4.运行 #make menuconfig
出错:scripts/kconfig/mconf.c:91: error: static declaration of‘current_menu’ follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of‘current_menu’ was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2
解决办法:
修改 scripts/kconfig/mconf.c文件
static struct termios ios_org;
static int rows = 0, cols = 0;
static struct menu *current_menu;
//struct menu*current_menu;
static int child_count;
注释粗体行并取消其下行代码注释,结果如下
static struct termios ios_org;
static int rows = 0, cols = 0;
//static struct menu*current_menu;
struct menu*current_menu;
static int child_count;
再运行:#make menuconfig
出错:
>>
>>
>> You must install ncurses-devel inorder
>> to use 'make menuconfig'
make[2]: *** [scripts/lxdialog/ncurses] 错误 1
make[1]: *** [menuconfig] 错误 2
make: *** [menuconfig] 错误 2
解决办法: 安装ncurses-dev
#apt-get install ncurses-dev
再运行: #make menuconfig
最后:#
注意:更新 bootloader
< end >
Enjoy it !
注:CROSS-3.3.2
交叉编译工具下载地址:
arm-linux-gcc-3.4.1 http://www.handhelds.org/download/projects/toolchain/arm-linux-gcc-3.4.1.tar.bz2
arm-linux-gcc-3.3.2 http://www.handhelds.org/download/projects/toolchain/arm-linux-gcc-3.3.2.tar.bz2