先安装以下软件包
gcc
gcc-c++
flex
ncurses
bison
texinfo
# yum install -y gcc gcc-c++ flex ncurses bison texinfo
我的交叉编译器安装在/opt
目录下
# chmod 777 /opt/
$ cd /opt/
下载源码包,这里是2012.08版本
# wget http://buildroot.uclibc.org/downloads/buildroot-2012.08-rc2.tar.gz
$ mv buildroot-2012.08 dl
$ tar -xjf dl/buildroot-2012.08.tar.bz2
$ ls buildroot-2012.08
$ mv dl/ buildroot-2012.08
$ cd buildroot-2012.08
配置编译选项
$ make menuconfig
buildroot-2012.08 make menuconfig
选项配置说明
Target Architecture (ARM (little endian)) --->
Target Architecture Variant (arm920t) --->
根据自己的
CPU
来选择
Target ABI (EABI) --->
Build options --->
($(TOPDIR)/dl) Download dir
($(TOPDIR)/arm920t) Host dir
[*] prefer static libraries
其它选项都不要选,如果是要设置值的地方就使用默认值
Toolchain --->
Kernel Headers (Linux 2.6 (manually specified version)) --->
(2.6.37) linux version
选定内核版本为
2.6.37
... ...
[*] Enable compiler tls support
[*] Enable MMU support
[*] Use software floating point by default
[*] Enable large file (files > 2 GB) support
[*] Enable IPv6 support
[*] Enable RPC support
[*] Enable WCHAR support
[*] Enable C++ support
其它选项都不要选,如果是要设置值的地方就使用默认值
System configuration --->
Init system (None) --->
把 Busbyox
编译去掉
这里面所有的都不要选,如果是要设置值的地方就使用默认值
Package Selection for the target --->
这里面所有的选项都不要选,除了:
Libraries --->
Compression and decompression --->
[*] gzip
[*]lzop
Host utilities --->
这里面所有的选项都不要选
Filesystem images --->
这里面所有的选项都不要选
Bootloaders --->
这里面所有的选项都不要选
Kernel ---
这里面所有的选项都不要选