This is an updated fork of this repository
It contains a Dockerfile to generate a docker image that I use for building the yocto images.
I use the script yocto-build.sh to switch yocto building environment so I can use docker to build the Yocto project instead of install a ubuntu as VM.
First download the yocto-build.sh as ~/bin/yocto-build
curl https://raw.githubusercontent.com/D0tty/docker-yocto/master/yocto-build.sh > ./yocto-build
sudo mv yocto-build /bin/yocto-build
sudo chmod +x ~/bin/yocto-build
The first time you need to specify a working directory.
For example, if I want to build yocto
at /home/dotty/school/lirt/poky
then:
yocto-build --workdir /home/dotty/school/lirt/poky /home/dotty/school/lirt/sdk
If you have a look at the script, this command will create a new container with the working directory mounted as a volume in /yocto
and you will be in the context of the started container.
You can pass an optional argument to specify a sdk directory to the container. This directory will be mounted in /opt/poky
inside the container
If you want to resume (restart) a previously configured container you can use
yocto-build --resume
If you want to spawn a new shell in another terminal, you can use
yocto-build --shell
This script only support ONLY ONE CONTAINER, so If you want to change the working directory, you should remove it first, remove a container is easy, just use following command:
yocto-build --rm
Upgrade this script is easy, just type
yocto-build --upgrade
To pull new docker image, just type
yocto-build --pull
- Add a new mount option for the Xenomai SDK
- Thomas
Dotty
Michelot - thomas.michelot@epita.fr