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
Buildroot downloads al data to the first volume, the last volume is used as
build cache, cross compiler and build results.
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
$ ./scripts/run.sh make raspberrypi2_defconfig menuconfig $ ./scripts/run.sh make
Build products are stored inside the container at
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/ directory contains a set of modifications for Buildroot. The
modifications can be apllied with the environment variable
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
$ docker import - dietfs < images/rootfs.tar $ docker run --rm -ti dietfs sh
This software is licensed under Mozila Public License.
© 2017 Auke Willem Oosterhoff and Advanced Climate Systems.