Linux之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: 默认

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值