Loading...
 

Build From Source - Buildroot

This page will show you how to download and build Buildroot file system for ESPRESSObin. We will start by downloading the necessary sources to your local Linux machine (e.g. to /home/espressobin/buildroot directory):

$ mkdir buildroot && cd buildroot/
$ git clone https://github.com/MarvellEmbeddedProcessors/buildroot-marvell .
 

Checkout to the buildroot-2015.11-16.08 branch:

$ git checkout buildroot-2015.11-16.08
Branch buildroot-2015.11-16.08 set up to track remote branch buildroot-2015.11-16.08 from origin.
Switched to a new branch 'buildroot-2015.11-16.08'
 

Next, make a default .config file using the -+arch/arm64/configs/mvebu_v8_le_defconfig__:

$ make mvebu_armv8_le_defconfig

Now that the .config file is generated, launch make menuconfig and set the correct external compiler settings:

$ make menuconfig

Once in menuconfig interface, select Toolchain and configure the following (some of these settings might be pre-configured already):

  1. Toolchain Type -> External toolchain
  2. Toolchain -> Custom toolchain
  3. Toolchain origin -> Pre-installed toolchain
  4. Toolchain path -> path-to-linaro-toolchain-excluding-bin
    Here set the compiler path as you have configured it when following Toolchain tutorial but excluding the /bin directory (in our case the path was /home/espressobin/toolchain/gcc-linaro-5.2-2015.11-2-x86_64_aarch64-linux-gnu/)
  5. Toolchain prefix -> aarch64-linux-gnu
    Here we set the toolchain prefix excluding the last "-", so this should be aarch64-linux-gnu
  6. External toolchain gcc version --> 5.x
  7. External toolchain kernel headers series -> 4.0.x
    Here we set the correct toolchain kernel header series. The toolchain used for building ESPRESSObin Buildroot (as we demonstrated in Toolchain) is Linaro gcc 5.2.1 which uses kernel header 4.0.x

So after these changes, this is how your menuconfig should look like:

Make Menuconfig

We then select Exit and hit Save on our way out to save our newly-made configuration.

There is one more fix that needs to be made before building the Buildroot file system. The package fio2.17 is no longer available from the foosies.org, so change the FIO_SITE variable to use github.com as the repository server:

diff --git a/package/fio/fio.mk b/package/fio/fio.mk
index e310d61..39a4d56 100644
--- a/package/fio/fio.mk
+++ b/package/fio/fio.mk
@@ -5,7 +5,7 @@
 ################################################################################

 FIO_VERSION = 2.17
-FIO_SITE = https://fossies.org/linux/misc
+FIO_SITE = https://github.com/axboe/fio/archive
 FIO_LICENSE = GPLv2 + special obligations
 FIO_LICENSE_FILES = LICENSE

Now we can start the build process with:

$ make -j4

Note that during this process Buildroot will download sources from the Internet, so make sure you will have a stable connection throughout the building process. The building process might take some time to finish on the first run.

When the build process finishes, head into output/image sub-directory where you will find the generated components:

$ cd output/images/
$ ls
Image  rootfs.tar  rootfs.tar.gz

The archive containing the Buildroot root file system can also be downloaded from our Tech Spec page, Software table under Buildroot.

Head over to Boot from MicroSD card/USB stick - Buildroot page to see how to boot Buildroot from either a microSD card or a USB device.