嵌入式系统构建工具 - BuildRoot

Buildroot是一个用于生成嵌入式Linux系统的Makefiles和补丁集合,支持跨平台构建工具链、根文件系统、内核镜像和引导加载器镜像。通过其简单的配置接口和对数百个用户空间应用程序和库的支持,Buildroot简化了嵌入式系统开发的流程。本文介绍了在Ubuntu系统中设置Buildroot编译环境,下载源码,配置选项,并编译生成根文件系统的步骤。
摘要由CSDN通过智能技术生成

Buildroot is a set of Makefiles and patches that makes it easy to generate a complete embedded Linux system. Buildroot can generate any or all of a cross-compilation toolchain, a root filesystem, a kernel image and a bootloader image. Buildroot is useful mainly for people working with small or embedded systems, using various CPU architectures (x86, ARM, MIPS, PowerPC, etc.) : it automates the building process of your embedded system and eases the cross-compilation process.

The major Buildroot features are:

  • Can handle everything in your embedded system development project: cross-compiling toolchain, root filesystem generation, kernel image compilation and bootloader compilation. Buildroot is also sufficiently flexible that it can also be used for only one or several of these steps.
  • Is very easy to set up, thanks to its menuconfig, gconfig and xconfig configuration interfaces, familiar to all embedded Linux developers. Building a basic embedded Linux system with Buildroot typically takes 15-30 minutes.
  • Supports 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
简介 XMake 是一个跨平台自动构建工具,支持在各种主流平台构建项目,类似 cmake、automake、premake,但是更加的方便易用,工程描述语法更简洁直观,支持平台更多,并且集创建、配置、编译、打包、安装、卸载、运行于一体。 支持特性 支持windows、mac、linux、ios、android等平台,自动检测不同平台上的编译工具链(也可手动配置) 编译windows项目采用原生vs的工具链,不需要使用cygwin、mingw(当然这些也支持) 支持自定义平台编译配置,可以很方便的扩展第三方平台支持 采用lua脚本语法描述项目,描述规则简单高效,逻辑规则可灵活修改,并且不会生成相关平台的工程文件,是工程更加简单明了 支持创建模板工程、配置项目、编译项目、运行、打包、安装和卸载等常用功能(后续还会增加:自动生成文档、调试等模块) 支持编译c/c /objc成静态库、动态库、命令行可执行程序(后续还会增加:mac、ios、android的app的生成规则) 提供丰富的工程描述api,使用简单灵活,例如添加编译文件只需(还支持过滤排除): add_files("src/*.c", "src/asm/**.S", "src/*.m") 支持头文件、接口、链接库依赖、类型的自动检测,并可自动生成配置头文件config.h 支持自定义编译配置开关,例如如果在工程描述文件中增加了enable_xxx的开关,那么配置编译的时候就可以手动进行配置来启用它: xmake config --enable_xxx=true 提供一键打包功能,不管在哪个平台上进行打包,都只需要执行一条相同的命令,非常的方便 支持自定义编译工具和规则,例如想要增加对masm/yasm的编译规则,只需将自己写的masm.lua/yasm.lua规则文件,放到当前项目目录下即可。。 支持全局配置,一些常用的项目配置,例如工具链、规则描述等等,都可以进行全局配置,这样就不需要每次编译不同工程,都去配置一遍 除了可以自动检测依赖模块,也支持手动强制配置模块,还有各种编译flags。 简单例子 创建一个c console项目:xmake create -l c  -t 1 console  or xmake create --language=c  --template=1 console 工程描述文件:xmake.luaadd_target("console")     set_kind("binary")     add_files("src/*.c") 配置工程: 这个是可选的步骤,如果只想编译当前主机平台的项目,是可以不用配置的,默认编译release版本。   当然每次配置都会被缓存,不需要每次全部重新配置。xmake f -p iphoneos -m debug or xmake f --ldflags="-Lxxx -lxxx" or xmake f --plat=macosx --arch=x86_64 or xmake config --plat=iphoneos --mode=debug or xmake config --plat=iphonesimulator or xmake config --plat=android --arch=armv7-a --ndk=xxxxx or xmake config --cross=i386-mingw32- --toolchains=/xxx/bin or xmake config --cxflags="-Dxxx -Ixxx" or xmake config --help 编译工程:xmake or xmake -r or xmake --rebuild 运行目标:xmake r console or xmake run console 打包所有:xmake p or xmake p --archs="armv7, arm64" or xmake package or xmake package console or xmake package -o /tmp or xmake package --output=/tmp 安装目标:xmake i or xmake install or xmake install console or xmake install -o /tmp or xmake install --output=/tmp 详细使用方式和参数说明,请参考文档 或者运行:xmake -h or xmake --help or xmake config --help or xmake package --help ... 也可以参考使用xmake的实际项目:TBOX 后续工作 完善打包模块,支持对ios、mac、android的app进行一键打包和签名,生成.ipa、.apk、.app的应用程序文件 完善安装功能,支持对ios、android的app进行安装到设备 实现调试功能 实现自动生成doxygen文档功能 增加一些实用的工程描述api,例如:下载api,可以自动下载缺少的依赖库等等。。 解析automake、cmake的工程,并自动生成xmake的描述文件,实现无缝编译(如果这个实现成功的话,以后移植编译一些开源代码就更方便了) 标签:构建工具

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值