arm-buildroot-linux-,buildroot构建交叉编译工具链,根文件系统
支持多種處理器,arch,avr32,mips,x86等等,在arch/目錄可查看。
buildroot可使用make menuconfig進行配置,選擇需要編譯到目標文件系統的包,相關的配置文件在configs目錄下。
在board目錄下可以添加一些構建文件系統所需的額外配置或庫,這些在make menuconfig時指定,編譯完成或拷貝到根文件系統中, 這個可以避免單獨去編譯安裝第三方庫文件,很方便。
dl目錄用來存放編譯過程需要使用的源碼。
output目錄,用來存放編譯后的目標文件,像編譯生成的交叉工具鏈在output/host/usr/目錄,編譯過程中解壓后使用源碼包在output/build/目錄,編譯后生成的目標文件系統和配置文件所需的庫和應用程序在output/target/目錄。
下載buildroot最新版buildroot-2013.08
解壓源碼包
tar xvzf buildroot-2013.08.tar.gz
拷貝一個現有的配置文件進行配置
cp configs/mini2440_defconfig .config
make menuconfig
可以配置字節序、指令集、浮點處理類型、CPU核心、uclibc版本、內核版本、主機名,登錄密碼、busybox版本、構建的交叉編譯器版本、根文件系統的打包類型、目標文件系統需要用到各種包、board目錄下的外部文件、等等。
編譯
make
編譯可能會出錯,什么什么未安裝,apt-get install安裝好重新編譯
如果是編譯過程中需要下載什么包,但是停在那兒下載不了,需要重新配置buildroot的包下載地址
在
Build options ?--->
Mirrors and Download locations ?--->
下添加后重新編譯即可
編譯完成查看output/host/usr/目錄下已經生成了交叉編譯工具鏈
buildroot-2013.08/output/host/usr/bin# ./arm-buildroot-linux-uclibcgnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-buildroot-linux-uclibcgnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/buildroot-2013.08/output/host/usr/libexec/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabi
Configured with: ./configure --prefix=/opt/buildroot-2013.08/output/host/usr --sysconfdir=/opt/buildroot-2013.08/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --target=arm-buildroot-linux-uclibcgnueabi --with-sysroot=/opt/buildroot-2013.08/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --with-gmp=/opt/buildroot-2013.08/output/host/usr --with-mpfr=/opt/buildroot-2013.08/output/host/usr --enable-target-optspace --disable-libquadmath --enable-tls --enable-threads --with-mpc=/opt/buildroot-2013.08/output/host/usr --with-float=soft --disable-decimal-float --with-arch=armv4t --with-tune=arm920t --with-abi=aapcs-linux --with-float=soft --with-mode=arm --with-pkgversion='Buildroot 2013.08' --with-bugurl= --enable-languages=c --disable-largefile --disable-nls
Thread model: posix
gcc version 4.7.3 (Buildroot 2013.08)
output/target下已經生成了根文件系統
output/target# ls
bin ?etc ? lib ? ?media ?opt ? root ?sbin ?THIS_IS_NOT_YOUR_ROOT_FILESYSTEM ?usr
dev ?home ?lib32 ?mnt ? ?proc ?run ? sys ? tmp ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var
總結
以上是生活随笔為你收集整理的arm-buildroot-linux-,buildroot构建交叉编译工具链,根文件系统的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux不断安装操作系统,无人值守批量
- 下一篇: questasim linux安装包,U