buildroot的使用

1. 是什么

https://buildroot.org/

是一种类似于busybox的文件系统制作工具, 但是buildroot 可以制作交叉编译工具链、根文件系统、Linux 内核映像和引导加载程序以及其他第三方软件。

内置的工具

Build tools:

    which
    sed
    make (version 3.81 or any later)
    binutils
    build-essential (only for Debian based systems)
    gcc (version 4.8 or any later)
    g++ (version 4.8 or any later)
    bash
    patch
    gzip
    bzip2
    perl (version 5.8.7 or any later)
    tar
    cpio
    unzip
    rsync
    file (must be in /usr/bin/file)
    bc


Source fetching tools:

    wget

buildroot的目录

arch:

configs:     

dl:   

linux :           

output:   

support:   

utils:

board:

docs:         

package:

system:

boot:

fs: 

toolchain:

2. 怎么用

在官网下载源码:http://buildroot.org/downloads/

1. make menuconfig : 

        设置的项:

                内核版本:

                debug symbol :   https://blog.csdn.net/man9953211/article/details/107385628/ buildroot下打开gdb调试

                uboot:

2. make 

        设置平台

  • download source files (as required);
  • configure, build and install the cross-compilation toolchain, or simply import an external toolchain;
  • configure, build and install selected target packages;
  • build a kernel image, if selected;
  • build a bootloader image, if selected;
  • create a root filesystem in selected formats.

3. 生成的文件

  • images: where all the images (kernel image, bootloader and root filesystem images) are stored. These are the files you need to put on your target system.
  • build: where all the components are built (this includes tools needed by Buildroot on the host and packages compiled for the target). This directory contains one subdirectory for each of these components.
  • host: contains both the tools built for the host, and the sysroot of the target toolchain. The former is an installation of tools compiled for the host that are needed for the proper execution of Buildroot, including the cross-compilation toolchain. The latter is a hierarchy similar to a root filesystem hierarchy. It contains the headers and libraries of all user-space packages that provide and install libraries used by other packages. However, this directory is not intended to be the root filesystem for the target: it contains a lot of development files, unstripped binaries and libraries that make it far too big for an embedded system. These development files are used to compile libraries and applications for the target that depend on other libraries.
  • staging/ is a symlink to the target toolchain sysroot inside host/, which exists for backwards compatibility.
  • target/ which contains almost the complete root filesystem for the target: everything needed is present except the device files in /dev/ (Buildroot can’t create them because Buildroot doesn’t run as root and doesn’t want to run as root). Also, it doesn’t have the correct permissions (e.g. setuid for the busybox binary). Therefore, this directory should not be used on your target. Instead, you should use one of the images built in the images/ directory. If you need an extracted image of the root filesystem for booting over NFS, then use the tarball image generated in images/ and extract it as root. Compared to staging/target/ contains only the files and libraries needed to run the selected target applications: the development files (headers, etc.) are not present, the binaries are stripped.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值