先安裝以下軟件包
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 ---
這裏面所有的選項都不要選