当前位置:网站首页>一、buildroot目录结构
一、buildroot目录结构
2022-07-23 01:28:00 【小果壳】
1、什么是buildroot
Buildroot是linux平台上一个开源的嵌入式Linux系统自动构建框架。一个linux系统主要包含bootloader、kernal和rootfs三部分。我们可以独立去开发各个部分,在使用的时候分别去交叉编译,烧写这些软件组件。buildroot这个工具提供了一种更为高效的方法,他把bootloader、kernal和rootfs集成在一起,可以非常方便的去定制、管理、编译和组装一个自己需要的、针对自己的设备的一个完整的软件系统。我们可以利用buildroot针对自己的嵌入式设备开发完整的BSP和SDK。
2、获取buildroot
可以从官网 http://buildroot.org/downloads/ 获取buildroot的发行包。
通过github仓库获取:
git clone git://git.busybox.net/buildroot
未编译的buildroot源码目录如下:
arch:CPU架构相关的配置脚本
board:在构建系统时,board默认的boot和Linux kernel配置文件,以及一些板级相关脚本
boot:uboot的配置脚本目录
configs:板级配置文件,该目录下的配置文件记录这该机器平台或者方案使用的工具链,boot,kernel,各种应用软件包配置
docs:
fs:各种文件系统的自动配置脚本
linux:存放Linux kernel的自动构建脚本
package:第三方开源包的自动构建脚本,用来配置编译dl目录下载的开源包
support:
system:存放文件系统目录的和设备节点的模板,这些模板会被拷贝到output/目录下,用于制作根文件系统rootfs
toolchain:存放着各种制作工具链的脚本
编译之后的源码目录中增加了dl 和 output 目录
- dl:download的简写,下载一些开源包。第一次下载之后,下次就不会再去从官网下载了,而是从dl/目录下拿开源包,以节约时间
编译出的output输出目录介绍:
images:存放所有编译生成的映像文件(内核、bootloader、根文件系统映像)
build:构建所有组件的位置,包括主机上Buildroot所需的工具和针对目标编译的软件包。该目录为每个组件包含一个子目录
host:包含为主机构建的工具和目标工具链
staging:是到内部目标工具链host/的符号链接
target:它几乎包含了目标的完整根文件系统。除了设备文件/dev/(Buildroot无法创建它们,因为Buildroot不能以root身份运行并且不想以root身份运行)之外,所需的一切都存在
3、工具链
buildroot提供了两种交叉编译工具链的解决方案:
- 内部工具链,称为Buildroot toolchain在配置接口。
- 外部工具链EXternal toolchain

Toolchain:设置为 Custom toolchain,表示使用用户自己的交叉编译器。
Toolchain origin:设置为 Pre-installed toolchain,表示使用预装的交叉编译器。
Toolchain path:设置自己安装的交叉编译器绝对路径!buildroot 要用到。
Toolchain prefix:设置交叉编译器前缀,要根据自己实际所使用的交叉编译器来设置,比如我们使用的是 arm-linux-gnueabihf-gcc,因此前缀就是$(ARCH)-linux-gnueabihf,其中 ARCH我们前面已经设置为了 arm。
边栏推荐
- 真人踩过的坑,告诉你避免自动化测试常犯的10个错误
- The peak season of cross-border e-commerce is coming, remittance of international collection 0 rate will help you win the peak season!
- Advantages of BGP machine room
- The pit trodden by real people tells you to avoid the 10 mistakes often made in automated testing
- SPSS Chi-Square
- How to learn MySQL efficiently and systematically?
- 【无标题】
- 基于时频图的音频处理-matlab
- wallys/WiFi6 MiniPCIe Module 2T2R2×2.4GHz 2x5GHz MT7915 MT7975
- RNA 25. What should we do if there is only Shengxin but no experiment in SCI articles?
猜你喜欢
![[Huawei online battle service] how can new players make up frames when the client quits reconnection or enters the game halfway?](/img/b6/f00ac1b9a244832300f2dd898120f9.png)
[Huawei online battle service] how can new players make up frames when the client quits reconnection or enters the game halfway?

Huawei applications have called the checkappupdate interface. Why is there no prompt for version update in the application

Const char* in vs2022 cannot assign char*

C语言实战之猜数游戏

BCG 使用之CBCGPColorDialog控件

Salary increase artifact

【无标题】

【C语言】预处理详解

软件测试面试思路技巧和方法分享,学到就是赚到

解析steam与创客教育课堂的统筹规划
随机推荐
Pytorch visualization
Internet download manager is simply a killer of downloaders
1059 Prime Factors
C语言实战之猜数游戏
一文了解微服务低代码实现方式
wallys/WiFi6 MiniPCIe Module 2T2R2×2.4GHz 2x5GHz MT7915 MT7975
General design of SQL user table
Event listening and deleting events - event object - default event - cancel bubbling event - event delegation - default trigger
一个月学透阿里整理的分布式架构笔记
-bash: wget: 未找到命令
Notifyicondata tray used by BCG
详解Vector
券商真的有保本型理财产品吗?
FPGA出错的积累
[wechat applet] Introduction to development (2)
TFW6524完美替代进口PT6524芯片方案简介
Wallys/DR4019S/IPQ4019/11ABGN/802.11AC/high power
软件测试面试思路技巧和方法分享,学到就是赚到
Stream操作之 先分组再取最大值
妙啊!美团 OCTO 分布式服务治理系统,这描述也太清晰了