网址
官网:https://buildroot.org/
下载地址:https://buildroot.org/download.html
使用
解压后,执行make menuconfig
Target options (目标板配置)
Target Architecture: 目标架构,这里选择 ARM(little endian),ARM小端模式Target Binary Format: 二进制格式,为 ELFTarget Architecture Variant:架构变体为 arm920t,内核类型Target ABI: 应用程序二进制接口,为EABIFloating point strategy: 浮点数的策略,选择为 Soft floatARM instruction set: arm 汇编指令集,选择 ARM
Build options: (编译选项)
主要是一些编译时用到的选项,比如dl的路径,下载代码包使用的路径,同时运行多个编译的上限,
是否使能编译器缓冲区等等,这里按照默认就行了.
Toolchain:工具链选项
Toolchain type:Buildroot提供两种方式使用toolchainexternal toolthain: 非Buildroot提供的交叉编译器 Buildroot toolchain: //Buildroot本身编译生成的Buildroot toolchaincustom toolchain vendor name://填上S3C2440Toolchain: 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 prefixC library: C库选择,选择 glibc/eglibc,不要选其他的。区别可以百度Kernel Headers: //内核头文件,Linux 4.9.x kernel headersglibc version: //glibc版本选择,2.24Binutils Version: //binutils版本:2.27Additional binutils options: 附加的 binutils 选择,不填即可GCC compiler Version: //GCC版本选择,gcc 6.xAdditional 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/52381776Enable compiler OpenMP support://支持OpenMP?OpenMP用于共享内存并行系统的多处理器程序设计,OpenMP并不适合需要复杂的线程间同步和互斥的场合,OpenMp的另一个缺点是不能在非共享内存系统(如计算机集群)上使用。不选择Enable graphite support : //是否支持graphite。Graphite是应用WEB应用的一套开源的编程接口。不选择。具体看百度百科:https://baike.baidu.com/item/Graphite/9810474?fr=aladdinBuild 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插件支持,不选
System configuration:系统配置
Root FS skeleton:System hostname: JZ2440 (开发板的名称)System banner: 欢迎语,如:Welcome to JZ2440Passwords 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 tablesUse symlinks to /usr for /bin, /sbin and /libEnable root login with passwordRoot password: 进入linux控制台终端后的密码,为空则登录时不需要密码,默认登录用户名为root。为空。/bin/sh (busybox‘ default shell)Run a getty (login prompt) after boot: 保持默认,默认为选中。TTY port: 配置为 ttySAC3Baudrate : 波特率,配置为 115200TERM environment variable: 默认即可other options to pass to getty: 默认即可remount root filesystem read-write during boot: 选中,表示可以进行动态的挂载
Kernel:内核配置
Kernel version: 内核版本,选择用户自定义,Custom versionKernel version: 填上自己所需要的版本,3.4.2Custom kernel patches: 自定义的内核补丁,本处:/work/system/linux-3.4.2_100ask.patchKernel configuration: 内核配置,本处选择/work/system/linux-3.4.2/config_okDefconfig name: //填写为 mini2440Additional configuration fragment files: //暂且不填写Kernel binary format: 内核二进制文件格式,uImage //zImageKernel compression format: //内核压缩格式,选择gzip即可Build a Device Tree Blob: 设备树,暂且不填写Install kernel image to /boot in target: 暂且不填Linux Kernel Extensions: 内核扩展,默认不选择Linux Kernel Tools: 内核工具,默认不选择
Target packages
// ext2/3/4 root filesystem: 在ext2/3/4variant中选择ext4//tar the root filesystem: 选中Filesystem images: 文件系统选择,选择 yaffs2 root filesystem
Bootloaders:硬件启动程序,选择为 U-boot
Build system: // Kconfig: 若是选择2015.04之后的u-boot 选择此项legacy: 若是选择2015.04之前的u-boot 选择此项U-boot Version: U-boot版本,默认为 2017.01,选择为Custom versionU-Boot version: 填写为2012.04.01Custom 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: 默认