Firefly Open Source Community

   Login   |   Register   |

ROC-RK3308-CC Docker container for Buildroot building








Rank: 9Rank: 9Rank: 9

Posted at 4/13/2019 10:26:09     

This is a Docker container for Buildroot building. It was created to support the Firefly Open Source Project. We install the required dependencies and make the development environment based on Ubuntu 16.04 LTS.

It currently only supports to ROC-RK3308-CC Buildroot SDK.

Install Docker CE

To install Docker CE, you need the 64-bit version of one of these Ubuntu versions:

  • Bionic 18.04 (LTS)
  • Xenial 16.04 (LTS)
  • Trusty 14.04 (LTS) (older than Docker CE v18.06)

You can refer to “Get Docker CE for Ubuntu” to install Docker CE.

The Automatic tool: DKCook

DKCook is a hell script programming, put at FFTools/DockerCook/.

If you can’t find FFTools, please update the SDK.

DKCookdefault use a docker image tchip/buildroot-builder,it will automatically download the buildroot-builder from Docker Hub.

To build the SDK, you can add ./FFTools/DockerCook/DKCook in front of the building command. As below:

Building the whole SDK:

  1. $ cd SDK/
  2. $ ./FFTools/DockerCook/DKCook ./
Copy the code

Building kernel:

  1. $ cd SDK/
  2. $ ./FFTools/DockerCook/DKCook ./ kernel
Copy the code

Or building kernel step by step:

  1. $ cd SDK/
  2. $ ./FFTools/DockerCook/DKCook --run
Copy the code


If you have build the SDK on PC, and want to do it in container instead. Or the opposite. You must rebuild the whole SDK with new environment(rm SDK/buildroot/output/ directory), to avoid some misstake.


If you are familiar with Docker, you can customize the Docker operation by referring to the following.

Docker image from

There are two ways to get Docker image:

  • Generating a Docker image by Dockerfile
  • Get the docker image from Docker Hub

Generating the Docker image

Github for Dockerfile:

Get the project:

  1. $ git clone
Copy the code

Run commands:

  1. $ cd DockerCook/
  2. $ docker build -t buildroot-builder .
Copy the code

Download the Docker image

You can download the docker image from Docker Hub , search for tchip/buildroot-builder.

Run commands:

  1. $ docker pull tchip/buildroot-builder:latest
Copy the code

Command line

The container default working directory is /home/project, it is also a mountpoint that can be used to mount your current working directory into the container, like:

  1. docker run -it --rm \
  2.             -e USER_ID=$UID \
  3.             --mount type=bind,source="$PWD",target="/home/project" \
  4.             buildroot-builder \
  5.             /bin/bash
Copy the code

Run bash into container, to build the SDK refer to “Building System Firmware”.


Docker Documentation

Access Firefly Wiki to know more


Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list