Coder Social home page Coder Social logo

crankshaft-xl's Introduction

Buildroot

A Docker image for using Buildroot. It can be found on Docker Hub.

Get started

To get started build the Docker image.

$ docker build -t "advancedclimatesystems/buildroot" .

Create a data-only container to use as build and download cache and to store your build products.

$ docker run -i --name buildroot_output advancedclimatesystems/buildroot /bin/echo "Data only."

This container has 2 volumes at /root/buildroot/dl and /buildroot_output. Buildroot downloads al data to the first volume, the last volume is used as build cache, cross compiler and build results.

Usage

A small script has been provided to make using the container a little easier. It's located at scripts/run.sh. Instructions below show how to build a kernel for the Raspberry Pi using the a defconfig provided by Buildroot.

$ ./scripts/run.sh make raspberrypi2_defconfig menuconfig
$ ./scripts/run.sh make

Build products are stored inside the container at /buildroot_output/images. Because run.sh mounts the local folder images/ at this place the build products are also stored on the host.

Build with existing config

It is possible to build from a custom configuration. To demonstrate this, the repository contains a configuration to build a minimal root filesystem, around 25 mb, with Python 2. This config is located at external/configs/docker_python2_defconfig.

The external/ directory contains a set of modifications for Buildroot. The modifications can be apllied with the environment variable BR2_EXTERNAL. Read here more about customizations of Buildroot.

$ ./scripts/run.sh make "BR2_EXTERNAL=/root/buildroot/external docker_python2_defconfig menuconfig"
$ ./scripts/run.sh make

If you've modified the configuration using menuconfig and you want to save those changes run:

$ ./scripts/run.sh make BR2_DEFCONFIG=/root/buildroot/external/configs/docker_python2_defconfig savedefconfig

Docker image from root fileystem

Import the root filesystem in to Docker to create an image run it and start a container.

$ docker import - dietfs < images/rootfs.tar
$ docker run --rm -ti dietfs sh

License

This software is licensed under Mozila Public License. © 2017 Auke Willem Oosterhoff and Advanced Climate Systems.

crankshaft-xl's People

Contributors

htruong avatar orangetux avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.