Buildroot 把交叉工具链、目标软件包、Linux 内核、引导程序和根文件系统的构建串成一条流程。它适合生成经过明确配置的嵌入式 Linux 系统,但“第一次 make 成功”只是开始:要让其他人或未来的自己重建同一套系统,还必须保存配置、定制文件和版本依据,并理解何时增量构建已经不可靠。
本文范围:依据 Buildroot 2026.08 手册(页面标注生成于 2026-09-04,Git revision d5180309b1),整理第 2–4 章、8.2、8.5、9.3、9.4 的完整任务流程,并补充与之直接相关的清理和配置说明。它不是整本手册全译,也没有验证任何开发板的启动结果。文中命令仅作静态核对,未在本次环境构建镜像。

在 Linux 主机上准备构建环境
Buildroot 设计为在 Linux 上运行。它会构建许多所需的主机工具,但仍要求系统事先提供基础工具。手册列出的必需项包括:which、diffutils、sed、GNU make、binutils、gcc、g++、bash、patch、gzip、bzip2、Perl、tar、cpio、unzip、rsync、file、bc、findutils、awk 和 wget;Debian 系的 build-essential 是相关开发工具元包,file 应在 /usr/bin/file。
手册保留了 make 3.81、GCC/G++ 4.8、Perl 5.8.7 等最低版本说明。这些是文档的兼容性下限,不是选用失去安全维护版本的建议。实际构建主机应使用受维护的发行版,并按所选软件包核对额外依赖。
配置界面也有依赖:menuconfig 需要 ncurses 的运行库和开发文件;xconfig 使用 Qt5,gconfig 使用 GTK2/glib2/glade2。不同发行版的开发包名可能带 -dev 或 -devel。下载源码时,若选择的软件包使用 Git、Subversion 等版本控制系统,还须安装相应工具;生成图表或文档又有 Graphviz、Python 模块等独立要求。
从 官方发布目录 取得明确版本的源码,并保存发布归档与核验信息。本文以 2026.08 的手册为基线,不使用随时变化的开发快照。原文还提供 Vagrantfile 获取方式;这里不把下载后的配置文件直接执行作为准备步骤,因为虚拟机配置和 provisioning 同样包含可执行行为,应先审查。
用普通用户配置,而不是 sudo make
Buildroot 明确要求以普通用户构建,无需 root。构建期间会运行下载的软件包的配置脚本、Makefile 和安装步骤;普通权限能缩小其对主机的影响范围,但不等于把任意源码变成可信内容。专用构建环境仍不应包含生产凭证、个人文件或无关可写挂载。
最简单的源码树内构建是:
make menuconfig
make
也可把第一行换成 make nconfig、make xconfig 或 make gconfig。各界面最终生成包含完整配置的 .config,由顶层 Makefile 读取。应按目标硬件选择架构及其变体、工具链、系统配置、目标软件包和需要的文件系统格式;内核与引导程序只会在配置选中时生成。
不要把宿主机架构和目标架构混淆。交叉工具链运行在构建主机上,却为目标 CPU 生成代码;Buildroot 可以自己构建工具链,也可以按配置导入外部工具链。本篇不替某一块板卡选参数。配置项的帮助文本和板级 defconfig 是后续核对的入口。
执行 make 后,Buildroot 按需要下载源文件,构建或导入工具链,配置并构建所选软件包,生成选中的内核、引导程序及根文件系统镜像。手册说明默认不需要给顶层 make 添加 -jN;顶层并行构建是另有条件的功能,不应把常见软件项目的并行命令机械照搬过来。
先分清 output 里面哪些能交付
| 目录 | 用途 | 是否直接部署 |
|---|---|---|
output/images/ |
内核、引导程序和所选格式的根文件系统镜像。 | 这里的相应镜像才是面向目标系统的交付物;具体刷写方式另按板卡说明核验。 |
output/build/ |
主机工具和目标组件的解包、配置、编译目录,每个组件有自己的子目录。 | 否。 |
output/host/ |
主机工具、交叉工具链及目标 sysroot,后者含编译依赖需要的头文件和库。 | 否;包含开发文件及未剥离文件,不是目标根文件系统。 |
output/staging/ |
为兼容保留的符号链接,指向 host 下的目标工具链 sysroot。 | 否。 |
output/target/ |
组装中的目标根文件系统内容。 | 否;缺少最终设备节点,权限也未必正确,例如 setuid 位。 |
target/ 看起来最像目标系统,也因此最容易被误用。不能直接把它当成最终部署镜像或 chroot 根目录。需要通过 NFS 启动的展开根文件系统时,手册要求使用 images/ 中生成的 tar 镜像,并以适当权限展开到专用目标目录。这里不提供自动解包或块设备写入命令,避免把不明设备名变成破坏性示例。
用独立输出目录隔开不同目标
Buildroot 支持 O= 指定输出位置。下面是依据原文改写的可读示例:把路径变量替换为已存在的源码目录及专用输出位置,路径中不要放无关文件。
# 示例路径,先按实际工作区修改
src=/work/buildroot-2026.08
out=/work/builds/device-a
make -C "$src" O="$out" menuconfig
make -C "$src" O="$out"
如果输出目录不存在,Buildroot 会创建它。这里特意采用绝对路径并引用变量;原文允许相对 O,但相对位置是以 Buildroot 主源码目录为基准,而不是调用命令时的当前目录。
树外构建的 .config、临时文件和构建产物都进入输出目录。同一份源码可以服务于多个构建,前提是每次使用各自独立的输出目录。首次调用后,Buildroot 会在输出目录生成 Makefile 包装文件,之后也可以进入该目录直接运行 make 或其他目标,无需反复传入 -C 与 O。
保存最小配置,再保存组件自己的配置
.config 包含大量默认值。make savedefconfig 会去掉等于默认值的配置项,形成更适合版本控制的 defconfig。默认保存到 defconfig,也可通过 BR2_DEFCONFIG 指定位置:
make -C "$src" O="$out" savedefconfig \
BR2_DEFCONFIG="$src/configs/device-a_defconfig"
这条命令会写入或覆盖指定的配置文件,因此应先查看版本控制差异。保存到 configs/<boardname>_defconfig 后,它会出现在 make list-defconfigs 中,并能通过相应的 make <boardname>_defconfig 恢复。若配置保存在任意其他位置,则使用:
make -C "$src" O=/work/builds/device-a-rebuild defconfig \
BR2_DEFCONFIG="$src/configs/device-a_defconfig"
这里选了新的输出目录;它表达的是“从保存的配置重新开始”,而不是依赖旧目录里碰巧留下的状态。真正重建时,还要确保源代码、补丁、外部工具链和定制文件均可取得。
Buildroot 的 defconfig 不会替你保全所有组件内部配置。如果修改过 Linux、BusyBox、uClibc、Barebox 或 U-Boot,还要分别保存。先产生实际配置文件,再把 Buildroot 中对应的配置路径指向它;路径还不存在就提前切换,会使构建失败。手册推荐在 board/<company>/<boardname>/ 下保存这些文件。
| 保存目标 | 写入的配置路径 |
|---|---|
linux-update-defconfig |
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE;Linux 2.6.33 起可去掉默认值,更早版本使用 linux-update-config。 |
busybox-update-config |
BR2_PACKAGE_BUSYBOX_CONFIG |
uclibc-update-config |
BR2_UCLIBC_CONFIG |
barebox-update-defconfig |
BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE |
uboot-update-defconfig |
BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE |
这些都是 make 目标,只有相应组件启用时才有意义。at91bootstrap3 没有同类辅助目标,需要手工将配置保存到 BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE 指定的位置。确认组件配置落盘后,再导出 Buildroot defconfig,使其中的引用指向已保存文件。
什么时候应完整重建
Buildroot 不尝试自动判断所有配置变化对整个系统的影响。再次运行 make 并不保证所有受影响的软件都会重建。这是明确的工作方式,不是配置缓存偶尔出错。
- 更换目标架构、架构变体、二进制格式或浮点策略:必须完整重建。
- 改变工具链:编译器版本、C 库及基础配置变化通常影响全系统,应完整重建。
- 新增软件包:新包会构建,但已经构建的程序不会自动获得新出现的可选库支持。原文以已有 ctorrent 后才添加 OpenSSL 为例,需要重建 ctorrent 或整个系统。
- 移除软件包:取消选中不会删除它已装进 target 或 sysroot 的文件;要真正去掉它,需要完整重建。
- 修改包的子选项或重建它的依赖:相关包不会自动重建,必须明确重建受影响的组件;不确定依赖影响时完整重建。
- 修改 root filesystem skeleton:需要完整重建;修改 overlay、post-build 或 post-image 脚本,通常再次 make 即会生效。
手册给出的完整重建目标是 make clean all。clean 会删除构建目录、工具链、host、staging、target 和镜像;distclean 还会删除配置。本文没有执行任何清理命令,也不把它们放进自动脚本。操作前先导出配置与组件定制,确认当前源码树和输出目录,保留需要比较的镜像及日志;也可用新的独立输出目录重建。
最后保存一份构建记录:Buildroot 版本或提交号、defconfig、各组件配置、补丁与 overlay、工具链身份、源码校验信息和构建主机信息。这样得到的是可解释、可重新生成的构建输入;若要进一步声称“位级可复现”,还须实际比较两次输出并核验影响因素。本篇没有进行这种测试。
来源、许可证与改编说明
原文:The Buildroot user manual。Copyright © The Buildroot developers <buildroot@buildroot.org>。手册明确使用 GNU GPL 第 2 版;本篇中文整理及修改同样按 GPLv2 提供,无任何担保。修改日期:2026-10-05;修改包括中文重组、专用绝对输出路径、变量引用、清理风险解释及原创图示。完整许可证见下方,来源副本为 COPYING-GPLv2.txt,亦见 GNU GPLv2。Buildroot 打包的软件仍各有许可证,本文的文档许可声明不能代替系统镜像的分发合规检查。
版权与许可全文
With the exceptions below, Buildroot is distributed under the terms of
the GNU General Public License, reproduced below; either version 2 of
the License, or (at your option) any later version.
Some files in Buildroot contain a different license statement. Those
files are licensed under the license contained in the file itself.
Buildroot also bundles patch files, which are applied to the sources
of the various packages. Those patches are not covered by the license
of Buildroot. Instead, they are covered by the license of the software
to which the patches are applied. When said software is available
under multiple licenses, the Buildroot patches are only provided under
the publicly accessible licenses.
-----------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
构建主机的可选依赖补充
手册列出的推荐辅助依赖是 Python 2.7 或更新版本;这是兼容性下限,不建议安装停止维护的版本。使用特定源码获取方式时,对应工具还包括 Bazaar、curl、CVS、Git、Mercurial、scp、sftp 与 Subversion。目标需要构建 Java Classpath 时需要 javac 和 jar。生成文档需 AsciiDoc 8.6.3 或更新版本、w3m,以及带 argparse 的 Python;仅PDF手册需要 dblatex。graph-depends 和包级依赖图使用 Graphviz,graph-build 使用 python-matplotlib,pkg-stats 使用 python-aiohttp。
Buildroot 通常每年2、5、8、11月发布,以 YYYY.MM 编号;开发日快照与 Git 树是另一路径。原文的 Vagrantfile 可建立具备依赖的虚拟机,其配置和 provisioning 代码仍须先审查。此文选择固定Linux源码树的构建流程,未执行这些虚拟机配置。
示意图的可编辑源文件
以下为上方Buildroot示意图的SVG源文本,按同一GPLv2提供,可保存为 .svg 编辑。PNG只用于页面显示;原始关系、文字与图元完整保留。
<svg xmlns="http://www.w3.org/2000/svg" width="1400" height="720" viewBox="0 0 1400 720" role="img" aria-labelledby="t d"><title id="t">Buildroot 构建输入与产物</title><desc id="d">保存的配置进入独立输出目录,images 是部署交付,其他目录是中间工作区。</desc><rect width="1400" height="720" fill="#f5f7fb"/><g font-family="Microsoft YaHei, Noto Sans CJK SC, sans-serif"><text x="60" y="75" font-size="38" font-weight="700" fill="#182d44">Buildroot · 从配置到系统镜像</text><text x="60" y="118" font-size="23" fill="#576b80">先保存构建输入,再谈重新生成;不要直接部署 target/</text><rect x="60" y="175" width="345" height="405" rx="16" fill="#e7edf7"/><text x="90" y="225" font-size="29" font-weight="700" fill="#23476a">可保存的输入</text><g font-size="24" fill="#243d55"><text x="90" y="290">Buildroot 版本 / 提交号</text><text x="90" y="345">最小 defconfig</text><text x="90" y="400">内核 / BusyBox 等配置</text><text x="90" y="455">补丁、overlay、脚本</text><text x="90" y="510">工具链与源码依据</text></g><path d="M427 375H489M471 360L489 375L471 390" stroke="#245f7e" stroke-width="5" fill="none"/><rect x="510" y="175" width="345" height="405" rx="16" fill="#fff" stroke="#b8cada" stroke-width="2"/><text x="540" y="225" font-size="29" font-weight="700" fill="#23476a">独立输出 O=</text><g font-size="24" fill="#243d55"><text x="540" y="290">.config</text><text x="540" y="345">build/ 组件构建</text><text x="540" y="400">host/ + staging/</text><text x="540" y="455">target/ 根目录组装</text><text x="540" y="510">images/ 最终镜像</text></g><path d="M877 510H939M921 495L939 510L921 525" stroke="#245f7e" stroke-width="5" fill="none"/><rect x="960" y="410" width="380" height="170" rx="16" fill="#dcefe7"/><text x="990" y="465" font-size="29" font-weight="700" fill="#1b5e46">可交付镜像</text><text x="990" y="518" font-size="24" fill="#1b5e46">按板卡流程单独验证部署</text><rect x="960" y="175" width="380" height="185" rx="16" fill="#fff0da"/><text x="990" y="225" font-size="27" font-weight="700" fill="#83521f">重建边界</text><text x="990" y="275" font-size="23" fill="#83521f">架构 / 工具链 / 移除软件包</text><text x="990" y="318" font-size="23" fill="#83521f">通常需要干净的完整重建</text><text x="60" y="640" font-size="23" fill="#576b80">target/ 缺少最终设备节点与权限;host/ 和 staging/ 包含开发用文件。</text><text x="60" y="690" font-size="18" fill="#728195">未完纪整理绘制 · 依据 Buildroot 2026.08 手册 · GPLv2</text></g></svg>












暂无评论内容