Introduction
In this topic you will build Buildroot so you can create binary image files ready to flash onto a SD Memory card using a default or custom configuration for the target: ATSAMA5D27 SOM1 EK1 Evaluation Kit.
The build process will initiate a series of actions that will download and compile the software that you configured during the configuration process. Be aware that the build process can take several hours to complete.
Prerequisites
Download
You have downloaded Buildroot following the instructions in the topic: Buildroot – Clone with Git.
Mandatory Packages for Buildroot
Before you build a project in Buildroot, ensure you have the mandatory software packages required. Mandatory and optional packages required by Buildroot are listed in the Buildroot User Manual: System Requirements.
Configuration
Before you can build the entire embedded system (cross-compilation toolchain, bootloaders, kernel, device tree, and target software packages) Buildroot must first be configured.
There are two methods in which you can perform the configuration:
- From a default configuration (defconfig) file, or
- Manually, creating a custom project.
If you are new to Buildroot, you may want to try a default configuration first to familiarize yourself with the process and ensure everything works. With this knowledge you gain from configuring a default configuration, you can customize your own Buildroot configuration for a custom project.
Build
1
Issue the make build command
Be certain that you are in the Buildroot directory:
$ cd ~/project_1/buildroot
To start the build process, issue the make command:
$ make
It will take several hours for the build to complete.
Build Results
Once the build is completed, the results are stored in the ~/project_1/buildroot/output directory:
- Images – target binary images compiled by Buildroot.
- Build – software packages for the host and target that were built.
- Staging – directory structure resembling the root filesystem that Buildroot uses to compile libraries and applications for the target.
- Target – a staging area for the root file system for the target.
- Host – software packages fun on the host required by Buildroot.
In addition, the ~/project_1/buildroot/dl directory contains the compressed archives of the software packages Buildroot downloaded during the build.
Summary
Once Buildroot has been configured, the build process is straight forward. Buildroot will download and compile the software and place the results in the ~/project_1/buildroot/output directory.
What’s Next?
After the build is complete the next step is to flash the binary images to mass storage so that you can boot Linux® on the evaluation kit of your choice.
For the ATSAMA5D27 SOM1 EK1 Evaluation Kit, mass storage is in the form of an SD Memory Card. Flashing binary images to SD Memory Card can be done one of two ways:
- Using the Etcher utility program, or
- Using the SAM-BA® utility program.