BMC Firmware build and modify

Note, this guide is not fully working, build process is failing with missing library, waiting for developer to respond.


In this guide, we are going to look how can you build and modify the BMC firmware. Mind you, since the firmware is still in active development, this is subject to change. We will try to keep this guide updated as much as possible.

Where do I get the BMC firmware ?

You can find the BMC and $tpi on our GitHub repo.

Some important folders:

  • app > bmc  - Here you can find source code to the BMC and the web interface
  • app > tpi - $tpi command line utility
  • app > board > rootfs_overlay > mnt > var > www - HTML files for web interface

These utilities are written in C and you can modify them as you like, however we would advise against it at the moment, since the software is in active development. Both apps are build automatically by Buildroot during image creation.

In this section we are going to focus more on modifying the underlying Linux OS, maybe you want to add some utility, enable functionality or just want to rebuild the BMC from scratch and ref lash the Turing Pi V2 board.

Reconfiguring BMC Linux OS

For this process you will need a Linux OS with internet access, if you are on a Windows machine you can use WSL just fine. We will use Ubuntu WSL in this example, but the process should be nearly identical on other version of Linux except maybe the required package installation command.


A bit of theory

We are using Buildroot project to build an embedded version of Linux OS for our Turing Pi V2, these have its advantages like:

  • It is lightweight and easy to use, making it suitable for small embedded systems.
  • It can be easily customized to fit the specific needs of the project.
  • It allows for easy management of package dependencies.

However, one disadvantage is that every time you change something you need to rebuild the whole Linux OS, and that can take time (depending on your HW specs).

The Buildroot project folder structure is organized as follows:

  • buildroot/: The top-level directory of the Buildroot project.
  • buildroot/board/: This directory contains the board-specific configuration files for different architectures.
  • buildroot/configs/: This directory contains the default configuration files for different boards and architectures.
  • buildroot/dl/: This directory is used to store downloaded source files for packages.
  • buildroot/package/: This directory contains the package configuration files and patches.
  • buildroot/output/: This directory contains the output of the Buildroot build process.
  • buildroot/output/build/: This directory contains the built packages and target filesystem.
  • buildroot/output/images/: This directory contains the final images that can be written to the target device.
  • buildroot/output/host/: This directory contains the host utilities and libraries.
  • buildroot/Makefile: This is the top-level Makefile that controls the build process.
  • buildroot/.config: This file contains the current configuration of the Buildroot project.
  • buildroot/README: This file contains the project documentation

This is the general structure, and we have some more folder that modify the buildroot like br2t113pro:

  • br2t113pro > configs > 100ask_t113-pro_spinand_core_defconfig - contains configuration for Turing Pi V2 board

Building the image

Install the following required packages for building the image.

sudo apt-get install build-essential subversion git-core libncurses5-dev \
zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial \
bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 libncurses-dev \
u-boot-tools -y

Clone the GitHub repository.

git clone
cd turing-pi/buildroot

Set up the make with custom configuration.

make   BR2_EXTERNAL="../br2t113pro"  100ask_t113-pro_spinand_core_defconfig

Customize. Here you have space to add more custom software to the OS

make menuconfig

The above command will show you a text based GUI where you can modify further the Linux OS we are going to create.


You can go to "Target packages" and enable additional software. Keep in mind that the onboard CPU and RAM is limited, so we would not recommend including stuff like docker or any CPU/RAM intensive processes.

For example, if you want to add screen go "Target packages>Shell and utilities>screen"


You can then Save and Exit.


Run build command.

make V=1

This can take some time to finish, depending on your PC. Make will compile all the source code to useful binary applications, and in the end produce .img file that you can use to flash to Turing Pi V2.


You can find the .img in buildroot/output/images/ and if you want to build .swu for OTA update do following:

cd output/images/
./ 1.0.0

Was this article helpful?

3 out of 3 found this helpful
Have more questions? Submit a request

Comments (1 comment)

Chris S

When I try to build in a clean environment (using docker with the default ubuntu image) the following dependencies are also missing:

file wget cpio rsync bc

Assuming I manage to get a clean build at some point, I will make a PR.


Please sign in to leave a comment.