buildroot配置实例
一、網址
官網:https://buildroot.org/
下載地址:https://buildroot.org/download.html
?
二、使用
解壓后,執行make??menuconfig
1.Target options (目標板配置)
????Target Architecture:?????????????目標架構,這里選擇 ARM(little endian),ARM小端模式
????Target Binary Format:???????????二進制格式,為 ELF
????Target Architecture Variant:架構變體為 arm920t,內核類型
????Target ABI:???????????????????????????應用程序二進制接口,為EABI
????Floating point strategy:??????浮點數的策略,選擇為 Soft float
????ARM instruction set:???????????arm 匯編指令集,選擇??ARM
????
2.Build options: (編譯選項)
??????主要是一些編譯時用到的選項,比如dl的路徑,下載代碼包使用的路徑,同時運行多個編譯的上限,
????是否使能編譯器緩沖區等等,這里按照默認就行了.
????
3.Toolchain:工具鏈選項
????Toolchain type:???????????????Buildroot提供兩種方式使用toolchain
??????external toolthain:????????非Buildroot提供的交叉編譯器??
??????Buildroot toolchain:???????//Buildroot本身編譯生成的Buildroot toolchain
????????custom toolchain vendor name://填上S3C2440
????Toolchain:???????????????????
???????Sourcery CodeBench ARM 2014.05://下載的外部交叉編譯器
???????Custom toolchain:??????????????自己的交叉編譯器
????Toolchain origin (Pre-installed toolchain)??--->
????(/work/tools/usr/local/arm/4.3.2) Toolchain path??
????(arm-none-linux-gnueabi) Toolchain prefix
????C library:????????????????????C庫選擇,選擇 glibc/eglibc,不要選其他的。區別可以百度
????Kernel Headers:???????????????//內核頭文件,Linux 4.9.x kernel headers
????glibc version:????????????????//glibc版本選擇,2.24
????Binutils Version:?????????????//binutils版本:2.27
????Additional binutils options:??附加的 binutils 選擇,不填即可
????GCC compiler Version:?????????//GCC版本選擇,gcc 6.x
????Additional gcc options:???????//附件的GCC選項,不填寫即可
????Enable C++ support:???????????使能C++支持,選上
????Enable Fortran support:???????//使能Fortran語言支持,不選
????Enable compiler link-time-optimization support://是否支持LTO,不選,LTO是什么:????????????????????????
????????????????????????????????????????????????????????????????????????//http://blog.csdn.net/fickyou/article/details/52381776
????Enable compiler OpenMP support://支持OpenMP?OpenMP用于共享內存并行系統的多處理器程序設計,OpenMP并不適合需要復雜的線程間同步和互斥的場合,OpenMp的另一個缺點是不能在非共享內存系統(如計算機集群)上使用。不選擇
????Enable graphite support :?????//是否支持graphite。Graphite是應用WEB應用的一套開源的編程接口。不選擇。具體看百度百科:https://baike.baidu.com/item/Graphite/9810474?fr=aladdin
????Build cross gdb for the host: 主機上運行gdb進行調試,不選
????Copy gconv libraries:?????????//拷貝 gconv庫,gconv庫用于在不同字符集之間進行轉換。默認不選即可
????Enable MMU support:???????????使能 MMU,S3C2440支持MMU,選上
????Target Optimizations:??????????不選
????Target linker options:??????????不選
????Register toolchain within Eclipse Buildroot plug-in:??????//eclipse插件支持,不選
?
4.System configuration:系統配置
????Root FS skeleton:
????System hostname:?????????????????JZ2440 (開發板的名稱)
????System banner:??????????????????????歡迎語,如:Welcome to JZ2440
????Passwords encoding:?????????????默認選項md5即可
????Init system:?????????????????????????????系統初始化,選擇 BusyBox
????/dev management:????????????????設備文件管理,選擇Dynamic using devtmpfs + mdev,即使用mdev動態加載設備節點的方式
????Path to the permission tables:??????設備節點的配置表設置,一定要選擇system/device_table_dev.txt,否則后面在dev目錄下將不會生成各種設備節點。當然我們也可以手動的配置該文件,添加必要的節點或刪除不需要的節點。
????support extended attributes in device tables
????Use symlinks to /usr for /bin, /sbin and /lib
????Enable root login with password
????Root password:??????????????????????進入linux控制臺終端后的密碼,為空則登錄時不需要密碼,默認登錄用戶名為root。為空。
??????/bin/sh (busybox‘ default shell)
????Run a getty (login prompt) after boot:??保持默認,默認為選中。
??????TTY port:???????????????????????????????????????配置為 ttySAC3
??????Baudrate :????????????????????????????????????波特率,配置為 115200
????TERM environment variable:?????????默認即可
????other options to pass to getty:?????默認即可
????remount root filesystem read-write during boot:???選中,表示可以進行動態的掛載
????
5.Kernel:內核配置
????Kernel version:????????????????????????????????內核版本,選擇用戶自定義,Custom version
????Kernel version:????????????????????????????????填上自己所需要的版本,3.4.2
????Custom kernel patches:??????????????????自定義的內核補丁,本處:/work/system/linux-3.4.2_100ask.patch
????Kernel configuration:?????????????????????內核配置,本處選擇/work/system/linux-3.4.2/config_ok
????Defconfig name:????????????????????????????填寫為 mini2440
????Additional configuration fragment files:???//暫且不填寫
????Kernel binary format:?????????????????????????內核二進制文件格式,uImage //zImage
????Kernel compression format:??????????????內核壓縮格式,選擇gzip即可
????Build a Device Tree Blob:??????????????????設備樹,暫且不填寫
????Install kernel image to /boot in target:???暫且不填
????Linux Kernel Extensions:???????????????????內核擴展,默認不選擇
????Linux Kernel Tools:????????????????????????????內核工具,默認不選擇
????
6.Target packages
????// ext2/3/4 root filesystem:???????????????在ext2/3/4variant中選擇ext4
????//tar the root filesystem:???選中
????Filesystem images:?????????????????????文件系統選擇,選擇 yaffs2 root filesystem
????
7.Bootloaders:硬件啟動程序,選擇為 U-boot
????Build system:??????????????????
???????// Kconfig:????????????若是選擇2015.04之后的u-boot 選擇此項
????????legacy:??????????????若是選擇2015.04之前的u-boot 選擇此項
????U-boot Version:??????????U-boot版本,默認為 2017.01,選擇為Custom version
????U-Boot version:??????????填寫為2012.04.01
????Custom U-boot patches:???U-boot補丁:/work/system/u-boot-2012.04.01_100ask.patch?????//不添加
????//U-Boot configuration:????U-boot配置,暫時還沒有U-BOOT,所以選擇為:Using an in-tree board defconfig file
????//Board defconfig:???????????板子的配置,選擇與架構一樣的板子的默認文件,mini2440。后期再修改
????U-boot needs dtc:????????????是否需要設備樹,默認,后期調試
????U-boot needs OpenSSL:??是否需要 OpenSSL,默認,后期調試修改
????U-boot binary format:??????二進制文件,選擇 .bin文件
????produce a .ift signed image:???????默認
????Install U-boot SPL binary image:默認
????Environment image:??????????????默認
?
8.Host utilities:???????????????????默認
9.Legacy config options:???默認
總結
以上是生活随笔為你收集整理的buildroot配置实例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html做一个抽奖游戏,js实现大转盘抽
- 下一篇: VirtualBox 通过 iso