Transcription of The Buildroot user manual
1 The Buildroot user manualThe Buildroot user manualiiContentsI Getting started11 About Buildroot22 System packages .. packages ..43 Getting Buildroot54 Buildroot quick start65 Community resources8II User guide96 Buildroot toolchain .. toolchain backend .. toolchain backend .. an external toolchain with Buildroot .. toolchain wrapper .. management .. system .. 147 Configuration of other components168 General Buildroot .. when a full rebuild is necessary .. how to rebuild packages .. builds .. 20 The Buildroot user out-of-tree .. variables .. efficiently with filesystem images .. about packages .. the dependencies between packages .. Graphing the build duration .. Graphing the filesystem size contribution of packages .. Top-level parallel build .. Integration with Eclipse .. Advanced usage.
2 Using the generated toolchain outside Buildroot .. Usinggdbin Buildroot .. Usingccachein Buildroot .. Location of downloaded packages .. Package-specificmaketargets .. Using Buildroot during development .. 289 Project-specific directory structure .. layered customizations .. customizations outside of Buildroot .. of a br2-external tree .. content .. Linux kernel extensions .. layout .. the Buildroot configuration .. the configuration of other components .. the generated target filesystem .. file permissions and ownership and adding custom devices nodes .. custom user accounts .. images have been created .. project-specific patches .. project-specific packages .. Quick guide to storing your project-specific customizations .. 42 The Buildroot user manualiv10 Using SELinux in Enabling SELinux support.
3 SELinux policy tweaking .. 4411 Frequently Asked Questions & The boot hangs afterStarting network.. Why is there no compiler on the target? .. Why are there no development files on the target? .. Why is there no documentation on the target? .. Why are some packages not visible in the Buildroot config menu? .. Why not use the target directory as a chroot directory? .. Why doesn t Buildroot generate binary packages (.deb, .ipkg.. )? .. How to speed-up the build process? .. 4812 Known issues5013 Legal notice and Complying with open source licenses .. Complying with the Buildroot license .. Patches to packages .. 5214 Beyond Boot the generated images .. NFS boot .. Live CD .. Chroot .. 53 III Developer guide5415 How Buildroot works5516 Coding .. The documentation .. Support scripts.
4 5917 Adding support for a particular board60 The Buildroot user manualv18 Adding new packages to Package directory .. Config files .. Choosingdepends onorselect.. Dependencies on target and toolchain options .. Dependencies on a Linux kernel built by Buildroot .. Dependencies on udev /dev management .. Dependencies on features provided by virtual packages .. TheSNNfoostart script .. Infrastructure for packages with specific build systems .. Infrastructure for autotools-based packages .. Infrastructure for CMake-based packages .. Infrastructure for Python packages .. Generating apython-packagefrom a PyPI repository .. backend .. for LuaRocks-based packages .. for Perl/CPAN packages .. for virtual packages .. Virtual package .. Virtual package .. Provider .. Provider.
5 88 The Buildroot user Notes on depending on a virtual package .. Notes on depending on a specific provider .. for packages using kconfig for configuration files .. for rebar-based packages .. for Waf-based packages .. for Meson-based packages .. of Cargo-based packages .. Cargo-based package .. Cargo-based package .. About Dependencies Management .. for Go packages .. for QMake-based packages .. for packages building kernel modules .. for asciidoc documents .. specific to the Linux kernel package .. linux-kernel-tools .. linux-kernel-extensions .. available in the various build steps .. Using thePOST_RSYNC hook .. Target-finalize hook .. integration and interaction with packages .. and tricks .. Package name, config entry name and makefile variable relationship .. How to check the coding style .. How to test your package.
6 How to add a package from GitHub .. How to add a package from Gitlab .. 108 The Buildroot user manualvii19 Patching a Providing patches .. Downloaded .. Within Buildroot .. Global patch directory .. How patches are applied .. Format and licensing of the package patches .. Integrating patches found on the Web .. 11120 Download infrastructure11221 Debugging Buildroot11322 Contributing to Reproducing, analyzing and fixing bugs .. Analyzing and fixing autobuild failures .. Reviewing and testing patches .. Applying Patches from Patchwork .. Work on items from the TODO list .. Submitting patches .. The formatting of a patch .. Preparing a patch series .. Cover letter .. Patches for maintenance branches .. Patch revision changelog .. Reporting issues/bugs or getting help .. Using the runtime tests framework.
7 Creating a test case .. Debugging a test case .. Runtime tests and Gitlab CI .. 12223 DEVELOPERS file and get-developers12424 Release Releases .. Development .. 125IV Appendix12625 Makedev syntax documentation12726 Makeusers syntax documentation129 The Buildroot user manualviii27 Migrating from older Buildroot General approach .. Migrating to .. Migrating to .. 132 The Buildroot user manualixBuildroot manual generated on 2022-02-28 20:20:52 UTC from git revision eeb8c004daThe Buildroot manual is written by the Buildroot developers. It is licensed under the GNU General Public License, version to the COPYING file in the Buildroot sources for the full text of this 2004-2020 The Buildroot Buildroot user manual1 / 132 Part IGetting startedThe Buildroot user manual2 / 132 Chapter 1 About BuildrootBuildroot is a tool that simplifies and automates the process of building a complete Linux system for an embedded system, order to achieve this, Buildroot is able to generate a cross-compilation toolchain, a root filesystem, a Linux kernel image and abootloader for your target.
8 Buildroot can be used for any combination of these options, independently (you can for example usean existing cross-compilation toolchain, and build only your root filesystem with Buildroot ). Buildroot is useful mainly for people working with embedded systems. Embedded systems often use processors that are notthe regular x86 processors everyone is used to having in his PC. They can be PowerPC processors, MIPS processors, ARMprocessors, supports numerous processors and their variants; it also comes with default configurations for several boards availableoff-the-shelf. Besides this, a number of third-party projects are based on, or develop their BSP1or SDK2on top of : Board Support Package2 SDK: Software Development KitThe Buildroot user manual3 / 132 Chapter 2 System requirementsBuildroot is designed to run on Linux Buildroot itself will build most host packages it needs for the compilation, certain standard Linux utilities are expectedto be already installed on the host system.
9 Below you will find an overview of the mandatory and optional packages (note thatpackage names may vary between distributions). Mandatory packages Build tools: which sed make(version or any later) binutils build-essential(only for Debian based systems) gcc(version or any later) g++(version or any later) bash patch gzip bzip2 perl(version or any later) tar cpio unzip rsync file(must be in/usr/bin/file) bc Source fetching tools: wgetThe Buildroot user manual4 / Optional packages Recommended dependencies:Some features or utilities in Buildroot , like the legal-info, or the graph generation tools, have additional dependencies. Althoughthey are not mandatory for a simple build, they are still highly recommended: python(version or any later) Configuration interface dependencies:For these libraries, you need to install both runtime and development data, which in many distributions are packaged development packages typically have a-devor-develsuffix.
10 Ncurses5to use themenuconfiginterface qt5to use thexconfiginterface glib2,gtk2andglade2to use thegconfiginterface Source fetching tools:In the official tree, most of the package sources are retrieved usingwgetfromftp,httporhttpslocations. A few packages areonly available through a version control system. Moreover, Buildroot is capable of downloading sources via other tools, likersyncorscp(refer to Chapter 20 for more details). If you enable packages using any of these methods, you will need toinstall the corresponding tool on the host system: bazaar cvs git mercurial rsync scp subversion Java-related packages, if the Java Classpath needs to be built for the target system: Thejavaccompiler Thejartool Documentation generation tools: asciidoc, version or higher w3m pythonwith theargparsemodule (automatically present in + and +) dblatex(required for the pdf manual only) Graph generation tools: graphvizto usegraph-dependsand<pkg>-graph-depends python-matplotlibto usegraph-buildThe Buildroot user manual5 / 132 Chapter 3 Getting BuildrootBuildroot releases are made every 3 months, in February, May, August and November.