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):

espressobin@buildserver:~$ mkdir buildroot
espressobin@buildserver:~$ cd buildroot/
espressobin@buildserver:~/buildroot$ git clone https://github.com/MarvellEmbeddedProcessors/buildroot-marvell .

 

Then let's checkout to the proper branch we are going to use: buildroot-2015.11-16.08

espressobin@buildserver:~/buildroot$ 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 we make a default ./.config file using the arch/arm64/configs/mvebu_v8_le_defconfig:

espressobin@buildserver:~/buildroot$ make mvebu_armv8_le_defconfig


Now that we have generated a default .config, we need to launch make menuconfig and set the correct external compiler settings:

espressobin@buildserver:~/buildroot$ make menuconfig


Once in make menuconfig, we select Toolchain and there configure the following (note that 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 not including 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 make menuconfig should look like:

Make Menuconfig

We then select Exit and hit Save on our way out to save our newly-made configuration. Now we can start the build process with:

espressobin@buildserver:~/buildroot$ 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. Also note that the building process might take some time to finish first time it is compiled.

When the build process is done, head into the subdirectory output/image where you will find rootfs.tar.gz rootfs image:

espressobin@buildserver:~/buildroot$ cd output/images/
espressobin@buildserver:~/buildroot/output/images$ ls
Image  rootfs.tar  rootfs.tar.gz