Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

ROC-RK3308-CC Docker container for Buildroot building

1637

Credits

0

Prestige

0

Contribution

administrator

Rank: 9Rank: 9Rank: 9

Credits
1637

ROC-RK3308-CC Docker container for Buildroot building

Posted at 4/13/2019 10:26:09      View:3119 | Replies:0        Print      Only Author   [Copy Link] 1#
Preface

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 ./build.sh
Copy the code

Building kernel:

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

Or building kernel step by step:

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


NOTE


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.


Advanced

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: https://github.com/T-Firefly/buildroot-builder

Get the project:


  1. $ git clone https://github.com/T-Firefly/buildroot-builder.git
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”.



Docs

Docker Documentation

Access Firefly Wiki to know more










Reply

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