Buildroot--介绍
一. Buildroot 简介
buildroot是Linux平台上一个构建嵌入式Linux系统的框架。
整个Buildroot是由Makefile脚本和Kconfig配置文件构成的。
可以和编译Linux内核一样,通过buildroot配置,menuconfig修改,编译出一个完整的可以直接烧写到机器上运行的Linux系统软件(包含boot、kernel、rootfs以及rootfs中的各种库和应用程序)。
buildboot也可以单独通过配置和使用交叉编译链工具来实现制作一个Linux文件系统。
下载
下载地址: https://buildroot.org/downloads/
选择好相应的目录,将下载的压缩包放置在其下
解压:
tar -xzvf buildroot-2021.05.3.tar.gz
buildroot目录介绍
解压之后,我们可以看到以下的目录情况:
├── arch: 存放CPU架构相关的配置脚本,如arm/mips/x86,这些CPU相关的配置,在制作工具链时,编译uboot和kernel时很关键.
├── board 存放了一些默认开发板的配置补丁之类的
├── boot
├── CHANGES
├── Config.in
├── Config.in.legacy
├── configs: 放置开发板的一些配置参数.
├── COPYING
├── DEVELOPERS
├── dl: 存放下载的源代码及应用软件的压缩包.
├── docs: 存放相关的参考文档.
├── fs: 放各种文件系统的源代码.
├── linux: 存放着Linux kernel的自动构建脚本.
├── Makefile
├── Makefile.legacy
├── output: 是编译出来的输出文件夹.
│ ├── build: 存放解压后的各种软件包编译完成后的现场.
│ ├── host: 存放着制作好的编译工具链,如gcc、arm-linux-gcc等工具.
│ ├── images: 存放着编译好的uboot.bin, zImage, rootfs等镜像文件,可烧写到板子里, 让linux系统跑起来.
│ ├── staging
│ └── target: 用来制作rootfs文件系统,里面放着Linux系统基本的目录结构,以及编译好的应用库和bin可执行文件. (buildroot根据用户配置把.ko .so .bin文件安装到对应的目录下去,根据用户的配置安装指定位置)
├── package:下面放着应用软件的配置文件,每个应用软件的配置文件有Config.in和soft_name.mk,其中soft_name.mk(这种其实就Makefile脚本的自动构建脚本)文件可以去下载应用软件的包。
├── README
├── support
├── system
└── toolchain
buildroot配置
然后通过make menuconfig进行配置:
Target options --->选择目标板架构特性。
Build options --->配置编译选项。
Toolchain ---> 配置交叉工具链,使用buildroot工具链还是外部提供。
System configuration ---> 系统配置
Kernel ---> 配置内核
Target packages --->
Filesystem images --->配置文件系统
Bootloaders --->硬件启动程序
Host utilities --->
Legacy config options --->
① 主页
② Target options
② Build options
③ Toolchain
③ System configuration
④ Kernel
⑤ Filesystem images
make命令解析
通过make help可以看到buildroot下make的使用细节,包括对package、uclibc、busybox、linux以及文档生成等配置:
Cleaning:
clean - delete all files created by build----------------------------------------清理
distclean - delete all non-source files (including .config)Build:
all - make world----------------------------------------------编译整个系统
toolchain - build toolchain------------------------------------------编译工具链Configuration:
menuconfig - interactive curses-based configurator--------------------------------对整个buildroot进行配置
savedefconfig - Save current config to BR2_DEFCONFIG (minimal config)----------------保存menuconfig的配置Package-specific:-------------------------------------------------------------------------------对package配置
<pkg> - Build and install <pkg> and all its dependencies---------------------单独编译对应APP
<pkg>-source - Only download the source files for <pkg>
<pkg>-extract - Extract <pkg> sources
<pkg>-patch - Apply patches to <pkg>
<pkg>-depends - Build <pkg>'s dependencies
<pkg>-configure - Build <pkg> up to the configure step
<pkg>-build - Build <pkg> up to the build step
<pkg>-show-depends - List packages on which <pkg> depends
<pkg>-show-rdepends - List packages which have <pkg> as a dependency
<pkg>-graph-depends - Generate a graph of <pkg>'s dependencies
<pkg>-graph-rdepends - Generate a graph of <pkg>'s reverse dependencies
<pkg>-dirclean - Remove <pkg> build directory-----------------------------------------清除对应APP的编译目录
<pkg>-reconfigure - Restart the build from the configure step
<pkg>-rebuild - Restart the build from the build step--------------------------------单独重新编译对应APPbusybox:
busybox-menuconfig - Run BusyBox menuconfiguclibc:
uclibc-menuconfig - Run uClibc menuconfiglinux:
linux-menuconfig - Run Linux kernel menuconfig-----------------------------------------配置Linux并保存设置
linux-savedefconfig - Run Linux kernel savedefconfig
linux-update-defconfig - Save the Linux configuration to the path specified
by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILEDocumentation:
manual - build manual in all formats
manual-pdf - build manual in PDF
graph-build - generate graphs of the build times----------------------------------对编译时间、编译依赖、文件系统大小生成图标
graph-depends - generate graph of the dependency tree
graph-size - generate stats of the filesystem size
查看Qt 的默认版本
cd ./package/qt5/qt5.mk
二. ·编译
Buildroot--如何配置安装Qt5_海歌也疯狂的博客-CSDN博客
最后执行make指令,会将uboot、linux、文件系统及Qt全部编译完成。
- images/ — 存放编译后产生的所有镜像文件( 内核镜像 , 加载引导镜像 和 根文件系统镜像)
- build/ — 存放所有的组件除了构建交叉编译工具链的组件 , 在这个目录里面每一个功能对应一个子目录存放他们各自的组件.
- staging/ — 包含一个类似于根文件系统等级层次的层级 . 这个目录包含了 安装的交叉编译工具链 和 所有被选择用于目标板的所有用户空间包.
- target/ — 包含了根文件系统
- host/ — 包含了我们需要的交叉编译工具集
另外,./dl 包含了所有下载的软件包。有时候在线下载太慢的话,需要手动添加,再重新开始编译,就可以跨过去。
三. 安装一些必要库
解决 Solution for “make menuconfig” Error in Linux PC
# 无效
#$ sudo apt-get install build-essentials
$ sudo apt-get install libncurses5 libncurses5-dev
Buildroot--介绍相关推荐
- Buildroot 介绍
buildroot使用介绍 - ArnoldLu - 博客园 (cnblogs.com) buildroot使用介绍 buildroot是Linux平台上一个构建嵌入式Linux系统的框架.整个Bui ...
- buildroot介绍
1.1 什么是buildroot Buildroot是Linux平台上一个构建嵌入式Linux系统的框架.整个Buildroot是由Makefile脚本和Kconfig配置文件构成的.你可以和编译Li ...
- buildroot概述及使用
原文网址:buildroot概述及使用_IT利刃出鞘的博客-CSDN博客 Buildroot介绍 1.Buildroot工具诞生的缘由是:Making Embedded Linux y, 网址 ...
- buildroot_buildroot-我对多平台发行版创作的经验
buildroot 介绍 (Introduction) In my previous article (Monitor linux) I wrote, what is this distro and ...
- Linux | buildroot使用介绍
buildroot是Linux平台上一个构建嵌入式Linux系统的框架.整个Buildroot是由Makefile脚本和Kconfig配置文件构成的.你可以和编译Linux内核一样,通过buildro ...
- buildroot使用介绍
buildroot使用介绍 buildroot是Linux平台上一个构建嵌入式Linux系统的框架.整个Buildroot是由Makefile脚本和Kconfig配置文件构成的.你可以和编译Linux ...
- buildroot管理uboot+kernel+rootfs
鉴于自己制作根文件系统太麻烦了,所以想用buildroot管理uboot,kernel,另外还可以自动生产rootfs,于是花了两天研究了下buildroot的框架和使用,在自己的2440开发板上也跑 ...
- 正则介绍_grep上 grep中 grep下
在计算机科学中,对"正则表达式" 的定义是:它使用单个字符串来描述或匹配一系列符合某个句法规则的字符串.在很多文本编辑器或其他工具里,正则表达式通常用来检索和替换那些符合某个模式的 ...
- Yocto基本概念及介绍
Yocto详解 参考:http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#creating-a-general-laye ...
- 在java 里kv 是什么_consul kv使用介绍
一行python代码实现树结构 树结构是一种抽象数据类型,在计算机科学领域有着非常广泛的应用.一颗树可以简单的表示为根, 左子树, 右子树. 而左子树和右子树又可以有自己的子树.这似乎是一种比较复杂的 ...
最新文章
- rust编程之道 pdf_LPC: 想在内核里引入Rust,还需要做很多决定
- spring boot 整合web开发(二)
- 使用Chrome的inspect element注意事项
- ffmpeg 音乐循环_[宜配屋]听图阁
- 【Linux入门学习之】数据流重定向
- FaunaDB and serverless and bmob
- 江苏大学计算机学院宋美如,姜震-江苏大学计算机科学与通信工程学院
- 戴姆勒:停止内燃机研发 马斯克:欢迎进群!
- PHP网页截图-网页快照实现
- 【报告分享】二次元衍生创作行业报告.pdf(附下载链接)
- 一文看懂 BDTC 2018:探秘大数据新应用(附 PPT 下载)
- linux 用户shell 无效,浅谈Linux环境下,为什么设置用户ID位对shell脚本无效
- python好用的编程工具
- 为什么苹果文件连接服务器没反应,苹果手机连接电脑没反应,教您苹果手机连接电脑没反应具体解决方法...
- 用深度学习完成3D渲染任务的蹿红
- 【iOS】—— 工厂设计模式
- N2N(docker方式安装)实现远程访问家里群晖
- 联芯 1860平台 icn6211 mipi to RGB 转换芯片 调试 和 st7789 LCD调试spi 9bit 模式
- 顺序栈实现将十进制整数转换为r(2、8、16)进制数
- YzmCMS轻爽极简风格Eric模版源码